64 std::string dataPath =
67 std::unique_ptr<BOARD> board = std::make_unique<BOARD>();
69 m_fabmasterPlugin.LoadBoard( dataPath, board.get(),
nullptr );
74 BOOST_REQUIRE_GT( board->Footprints().size(), 0 );
80 for(
const FOOTPRINT* fp : board->Footprints() )
82 totalPads += fp->Pads().size();
86 "Footprints should have pads when REFDES is empty in PIN section" );
103 std::string dataPath =
106 std::unique_ptr<BOARD> board = std::make_unique<BOARD>();
108 m_fabmasterPlugin.LoadBoard( dataPath, board.get(),
nullptr );
113 int zonesWithNets = 0;
115 for(
ZONE* zone : board->Zones() )
117 if( zone->GetNetCode() > 0 )
125 "Static shape zones with nets should be preserved" );
136 if(
pad->GetNumber() == aNumber )
155 std::string dataPath =
158 std::unique_ptr<BOARD> board = std::make_unique<BOARD>();
160 m_fabmasterPlugin.LoadBoard( dataPath, board.get(),
nullptr );
163 BOOST_REQUIRE_GT( board->Footprints().size(), 0 );
165 const FOOTPRINT* fp = board->Footprints().front();
166 BOOST_REQUIRE_EQUAL( fp->
Pads().size(), 3 );
181 BOOST_CHECK_GT( pad1_front_size.
x, 0 );
186 BOOST_CHECK_GT( pad1_back_size.
x, 0 );
187 BOOST_CHECK_GT( pad1_back_size.
y, pad1_back_size.
x );
201 std::string dataPath =
204 std::unique_ptr<BOARD> board = std::make_unique<BOARD>();
206 m_fabmasterPlugin.LoadBoard( dataPath, board.get(),
nullptr );
209 BOOST_REQUIRE_GT( board->Footprints().size(), 0 );
211 const FOOTPRINT* fp = board->Footprints().front();
229 std::string dataPath =
232 std::unique_ptr<BOARD> board = std::make_unique<BOARD>();
234 m_fabmasterPlugin.LoadBoard( dataPath, board.get(),
nullptr );
237 BOOST_REQUIRE_GT( board->Footprints().size(), 0 );
239 const FOOTPRINT* fp = board->Footprints().front();
General utilities for PCB file IO for QA programs.
@ NORMAL
Shape is the same on all layers.
@ FRONT_INNER_BACK
Up to three shapes can be defined (F_Cu, inner copper layers, B_Cu)
PAD_ATTRIB GetAttribute() const
int GetDrillSizeX() const
PAD_SHAPE GetShape(PCB_LAYER_ID aLayer) const
const PADSTACK & Padstack() const
const VECTOR2I & GetSize(PCB_LAYER_ID aLayer) const
Handle a list of polygons defining a copper zone.
std::string GetPcbnewTestDataDir()
Utility which returns a path to the data directory where the test board files are stored.
@ SMD
Smd pad, appears on the solder paste layer (default)
@ PTH
Plated through hole pad.
PCB_IO_FABMASTER m_fabmasterPlugin
FABMASTER_IMPORT_FIXTURE()
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
static const PAD * findPadByNumber(const FOOTPRINT *aFp, const wxString &aNumber)
Helper to find a pad by its number within a footprint.
BOOST_AUTO_TEST_CASE(EmptyRefdesInPins)
Test that footprints with pads are properly imported when the REFDES column is empty in the PIN secti...
BOOST_REQUIRE(intersection.has_value()==c.ExpectedIntersection.has_value())
BOOST_AUTO_TEST_SUITE_END()
BOOST_CHECK_MESSAGE(totalMismatches==0, std::to_string(totalMismatches)+" board(s) with strategy disagreements")
BOOST_CHECK_EQUAL(result, "25.4")
VECTOR2< int32_t > VECTOR2I