56 std::unique_ptr<BOARD> board = m_plugin.LoadBoard( dataPath );
67 for(
FOOTPRINT* fp : board->Footprints() )
69 if( fp->GetReference() == wxT(
"R1" ) )
72 if( fp->GetReference() == wxT(
"C1" ) )
76 BOOST_CHECK_MESSAGE( foundR1,
"R1 footprint not found" );
77 BOOST_CHECK_MESSAGE( foundC1,
"C1 footprint not found" );
85 std::unique_ptr<BOARD> board = m_plugin.LoadBoard( dataPath );
90 for(
FOOTPRINT* fp : board->Footprints() )
92 BOOST_CHECK_MESSAGE( fp->Pads().size() == 2,
93 wxString::Format(
"%s should have 2 pads, has %zu",
95 fp->Pads().size() ) );
104 std::unique_ptr<BOARD> board = m_plugin.LoadBoard( dataPath );
118 std::unique_ptr<BOARD> board = m_plugin.LoadBoard( dataPath );
131 std::unique_ptr<BOARD> board = m_plugin.LoadBoard( dataPath );
138 for(
PCB_TRACK* track : board->Tracks() )
152 std::unique_ptr<BOARD> board = m_plugin.LoadBoard( dataPath );
165 std::unique_ptr<BOARD> board = m_plugin.LoadBoard( dataPath );
169 std::vector<FOOTPRINT*> cached = m_plugin.GetImportedCachedLibraryFootprints();
182 std::unique_ptr<BOARD> board = m_plugin.LoadBoard( dataPath );
204 wxFileName fn( txtPath );
205 fn.SetExt( wxT(
"txt" ) );
206 BOOST_CHECK( !m_plugin.CanReadBoard( fn.GetFullPath() ) );
218 std::unique_ptr<BOARD> board = m_plugin.LoadBoard( dataPath );
226 for(
FOOTPRINT* fp : board->Footprints() )
228 if( fp->GetReference() == wxT(
"R1" ) )
230 else if( fp->GetReference() == wxT(
"C1" ) )
238 BOOST_CHECK_MESSAGE( !r1->
IsFlipped(),
"R1 should be on the front side" );
241 BOOST_CHECK_MESSAGE( c1->
IsFlipped(),
"C1 (onsolder) should be flipped to the back side" );
253 std::unique_ptr<BOARD> board = m_plugin.LoadBoard( dataPath );
266 std::unique_ptr<BOARD> board = m_plugin.LoadBoard( dataPath );
270 for(
FOOTPRINT* fp : board->Footprints() )
272 if( fp->GetReference() != wxT(
"U1" ) )
277 for(
PAD*
pad : fp->Pads() )
280 "DIP8 pad " +
pad->GetNumber() +
" should be PTH" );
286 BOOST_FAIL(
"U1 footprint not found" );
294 std::unique_ptr<BOARD> board = m_plugin.LoadBoard( dataPath );
298 bool foundGND =
false;
299 bool foundVCC =
false;
301 for(
int i = 0; i < board->GetNetCount(); i++ )
303 NETINFO_ITEM* net = board->GetNetInfo().GetNetItem( i );
315 BOOST_CHECK_MESSAGE( foundGND,
"Net GND not found" );
316 BOOST_CHECK_MESSAGE( foundVCC,
"Net VCC not found" );
324 std::unique_ptr<BOARD> board = m_plugin.LoadBoard( dataPath );
331 for(
PCB_TRACK* track : board->Tracks() )
352 std::unique_ptr<BOARD> board = m_plugin.LoadBoard( dataPath );
364 std::unique_ptr<BOARD> board = m_plugin.LoadBoard( dataPath );
General utilities for PCB file IO for QA programs.
Handle the data for a net.
const wxString & GetNetname() const
A PCB_IO derivation for saving and loading Geda PCB files.
std::string GetPcbnewTestDataDir()
Utility which returns a path to the data directory where the test board files are stored.
@ PTH
Plated through hole pad.
Geda PCB file plugin definition file.
GEDA_PCB_IMPORT_FIXTURE()
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_CHECK(res.column_datatype(0)==SQL_NUMERIC||res.column_datatype(0)==SQL_DECIMAL)
BOOST_CHECK_EQUAL(std::any_cast< std::string >(rows[0].at("val")), "12345678901234567.89")
BOOST_REQUIRE_MESSAGE(dc.CacheTableInfo(table, { "part_id", "val" }), dc.GetLastError())
BOOST_REQUIRE(res.columns()==1)
BOOST_AUTO_TEST_CASE(CanReadBoard)
BOOST_AUTO_TEST_SUITE_END()
@ PCB_VIA_T
class PCB_VIA, a via (like a track segment on a copper layer)