65 std::vector<std::pair<wxString, wxString>> tests = {
66 {
"footprint-with-thermal-pad.cpa",
"footprint-with-thermal-pad.pretty" }
71 for(
const std::pair<wxString, wxString>& libName : tests )
73 wxString cstarLibraryPath = dataPath + libName.first;
74 wxString kicadLibraryPath = dataPath + libName.second;
76 wxArrayString cstarFootprintNames;
77 wxArrayString kicadFootprintNames;
79 BOOST_REQUIRE_NO_THROW(
80 cstarPlugin.FootprintEnumerate( cstarFootprintNames, cstarLibraryPath,
true,
nullptr ) );
81 BOOST_REQUIRE_NO_THROW(
82 kicadPlugin.FootprintEnumerate( kicadFootprintNames, kicadLibraryPath,
true,
nullptr ) );
84 BOOST_CHECK_EQUAL( cstarFootprintNames.GetCount(), kicadFootprintNames.GetCount() );
86 for(
size_t i = 0; i < cstarFootprintNames.GetCount(); i++ )
88 wxString footprintName = cstarFootprintNames[i];
94 std::unique_ptr<FOOTPRINT> eagleFp =
95 cstarPlugin.FootprintLoad( cstarLibraryPath, footprintName,
false,
nullptr );
101 std::unique_ptr<FOOTPRINT> kicadFp =
102 kicadPlugin.FootprintLoad( kicadLibraryPath, footprintName,
true,
nullptr );
119 wxString filePath = dataPath +
"revision7_format_no_routewidth.cpa";
121 std::unique_ptr<BOARD> board;
123 BOOST_CHECK_NO_THROW( board = cstarPlugin.LoadBoard( filePath ) );
128 std::vector<PCB_TRACK*> tracks;
130 for(
PCB_TRACK* track : board->Tracks() )
131 tracks.push_back( track );
138 const int expectedWidth =
pcbIUScale.mmToIU( 1.0 );
139 bool foundRouteCodeWidth =
false;
146 if( track->GetWidth() == expectedWidth )
147 foundRouteCodeWidth =
true;
193 XNODE padReassign( wxXML_ELEMENT_NODE, wxT(
"PADREASSIGN" ) );
194 padReassign.
AddAttribute( wxT(
"attr0" ), wxT(
"TOP" ) );
195 padReassign.AddChild(
new XNODE( wxXML_ELEMENT_NODE, wxT(
"FUTURE_SHAPE" ) ) );
200 BOOST_CHECK_NO_THROW( padParser.
Parse( &padReassign, &ctx ) );
203 XNODE viaReassign( wxXML_ELEMENT_NODE, wxT(
"VIAREASSIGN" ) );
204 viaReassign.
AddAttribute( wxT(
"attr0" ), wxT(
"TOP" ) );
205 viaReassign.AddChild(
new XNODE( wxXML_ELEMENT_NODE, wxT(
"FUTURE_SHAPE" ) ) );
209 BOOST_CHECK_NO_THROW( viaParser.
Parse( &viaReassign, &ctx ) );
213 XNODE emptyReassign( wxXML_ELEMENT_NODE, wxT(
"PADREASSIGN" ) );
214 emptyReassign.
AddAttribute( wxT(
"attr0" ), wxT(
"TOP" ) );
218 BOOST_CHECK_NO_THROW( emptyParser.
Parse( &emptyReassign, &ctx ) );