32#include <boost/test/data/test_case.hpp>
58 {
"Tracks.v5.PcbLib",
"Tracks.pretty" },
59 {
"Tracks.v6.PcbLib",
"Tracks.pretty" },
60 {
"Espressif ESP32-WROOM-32.PcbLib",
"Espressif ESP32-WROOM-32.pretty" }
73 wxString altiumLibraryPath = dataPath + altiumLibraryName;
74 wxString kicadLibraryPath = dataPath + kicadLibraryName;
76 wxArrayString altiumFootprintNames;
77 wxArrayString kicadFootprintNames;
79 altiumPlugin.FootprintEnumerate( altiumFootprintNames, altiumLibraryPath,
true,
nullptr );
80 kicadPlugin.FootprintEnumerate( kicadFootprintNames, kicadLibraryPath,
true,
nullptr );
82 BOOST_CHECK_EQUAL( altiumFootprintNames.GetCount(), kicadFootprintNames.GetCount() );
84 for(
size_t i = 0; i < altiumFootprintNames.GetCount(); i++ )
86 wxString footprintName = altiumFootprintNames[i];
88 BOOST_TEST_CONTEXT( wxString::Format( wxT(
"Import '%s' from '%s'" ), footprintName,
91 FOOTPRINT* altiumFp = altiumPlugin.FootprintLoad( altiumLibraryPath, footprintName,
93 BOOST_CHECK( altiumFp );
96 BOOST_CHECK_EQUAL( footprintName, altiumFp->
GetValue() );
98 FOOTPRINT* kicadFp = kicadPlugin.FootprintLoad( kicadLibraryPath, footprintName,
100 BOOST_CHECK( kicadFp );
General utilities for PCB file IO for QA programs.
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.
ALTIUM_PCBLIB_IMPORT_FIXTURE()
PCB_IO_ALTIUM_DESIGNER altiumPlugin
PCB_IO_KICAD_SEXPR kicadPlugin
BOOST_DATA_TEST_CASE(AltiumPcbLibImport2, boost::unit_test::data::make(altium_to_kicad_footprint_property), altiumLibraryName, kicadLibraryName)
Compare all footprints declared in a *.PcbLib file with their KiCad reference footprint.
static const std::vector< std::tuple< wxString, wxString > > altium_to_kicad_footprint_property
Declares the struct as the Boost test fixture.
BOOST_AUTO_TEST_SUITE_END()