21#include <boost/test/data/test_case.hpp>
55 std::unique_ptr<FOOTPRINT>
CreateFootprint(
const std::vector<std::pair<std::string, VECTOR2I>>& padPositions )
57 std::unique_ptr<FOOTPRINT> fp = std::make_unique<FOOTPRINT>(
nullptr );
59 for(
const auto& [number, pos] : padPositions )
62 pad->SetNumber( number );
63 pad->SetFPRelativePosition( pos );
114static const std::vector<std::pair<std::string, VECTOR2I>>
FpDef_NoPins{
120 {
"2", { 0, 1000 } },
121 {
"3", { 2000, 0 } },
122 {
"4", { 2000, 1000 } },
127 {
"1", { -1000, -500 } },
128 {
"2", { -1000, 500 } },
129 {
"3", { 1000, -500 } },
130 {
"4", { 1000, 500 } },
138 {
"2", { 1000, 0 } },
139 {
"3", { 1000, -2000 } },
140 {
"4", { 0, -2000 } },
145 {
"1", { -500, 1000 } },
146 {
"2", { 500, 1000 } },
147 {
"3", { 500, -1000 } },
148 {
"4", { -500, -1000 } },
154 {
"2", { 0, 1000 } },
155 {
"3", { 2000, 0 } },
161 {
"2", { 0, 1000 } },
162 {
"3", { 2000, 0 } },
163 {
"4", { 2100, 1000 } },
169 {
"2", { 0, 1000 } },
170 {
"3", { 2400, 0 } },
171 {
"4", { 2400, 1000 } },
177 {
"2", { 0, 1000 } },
178 {
"3", { 2000, 0 } },
179 {
"4", { 2000, 1000 } },
180 {
"MP", { -1000, 500 } },
181 {
"MP", { 3000, 500 } },
194 "Origin point change",
208 "Rotation and origin point change",
229 "Footprint widened (all pins moved)",
236 "Ignore same named pads",
252 ExecuteTestCase( testCase );
static constexpr EDA_ANGLE ANGLE_0
static constexpr EDA_ANGLE ANGLE_45
static constexpr EDA_ANGLE ANGLE_270
std::optional< EDA_ANGLE > m_ExpectedAngleShift
std::optional< VECTOR2I > m_ExpectedPosShift
friend std::ostream & operator<<(std::ostream &os, const FP_ALIGNMENT_TEST_CASE &testCase)
const std::vector< std::pair< std::string, VECTOR2I > > & m_OrigPadPositions
const std::vector< std::pair< std::string, VECTOR2I > > & m_NewPadPositions
void ExecuteTestCase(const FP_ALIGNMENT_TEST_CASE &testCase)
std::unique_ptr< FOOTPRINT > CreateFootprint(const std::vector< std::pair< std::string, VECTOR2I > > &padPositions)
BOOST_DATA_TEST_CASE(ConvertToKicadUnit, boost::unit_test::data::make(altium_to_kicad_unit), input_value, expected_result)
Test conversation from Altium internal units into KiCad internal units.
BOOST_REQUIRE(intersection.has_value()==c.ExpectedIntersection.has_value())
BOOST_AUTO_TEST_SUITE_END()
BOOST_TEST(netlist.find("R_G1 ARM_OUT1 DIE_B R='0.001 / ((SW_STATE)") !=std::string::npos)
void RotatePoint(int *pX, int *pY, const EDA_ANGLE &aAngle)
Calculate the new point of coord coord pX, pY, for a rotation center 0, 0.
VECTOR2< int32_t > VECTOR2I