62 std::vector<std::pair<wxString, wxString>> tests = {
63 {
"SparkFun-GPS.lbr",
"SparkFun-GPS.pretty" }
69 for(
const std::pair<wxString, wxString>& libName : tests )
71 wxString eagleLibraryPath = dataPath + libName.first;
72 wxString kicadLibraryPath = dataPath + libName.second;
74 wxArrayString eagleFootprintNames;
75 wxArrayString kicadFootprintNames;
77 eaglePlugin.FootprintEnumerate( eagleFootprintNames, eagleLibraryPath,
true,
nullptr );
78 kicadPlugin.FootprintEnumerate( kicadFootprintNames, kicadLibraryPath,
true,
nullptr );
80 BOOST_CHECK_EQUAL( eagleFootprintNames.GetCount(), kicadFootprintNames.GetCount() );
82 for(
size_t i = 0; i < eagleFootprintNames.GetCount(); i++ )
84 wxString footprintName = eagleFootprintNames[i];
86 BOOST_TEST_CONTEXT( wxString::Format( wxT(
"Import '%s' from '%s'" ), footprintName,
89 FOOTPRINT* eagleFp = eaglePlugin.FootprintLoad( eagleLibraryPath, footprintName,
91 BOOST_CHECK( eagleFp );
94 BOOST_CHECK_EQUAL( footprintName, eagleFp->
GetValue() );
96 FOOTPRINT* kicadFp = kicadPlugin.FootprintLoad( kicadLibraryPath, footprintName,
98 BOOST_CHECK( kicadFp );
General utilities for PCB file IO for QA programs.
Works with Eagle 6.x XML board files and footprints to implement the Pcbnew #PLUGIN API or a portion ...
A #PLUGIN derivation for saving and loading Pcbnew s-expression formatted files.
std::string GetPcbnewTestDataDir()
Utility which returns a path to the data directory where the test board files are stored.
void CheckFootprint(const FOOTPRINT *expected, const FOOTPRINT *fp)
Helper method to check if two footprints are semantically the same.
EAGLE_LBR_IMPORT_FIXTURE()
PCB_IO_KICAD_SEXPR kicadPlugin
BOOST_AUTO_TEST_CASE(EagleLbrLibImport)
Declares the struct as the Boost test fixture.
BOOST_AUTO_TEST_SUITE_END()