86 SCH_SHEET_LIST sheets = m_schematic->BuildSheetListSortedByPageNumbers();
90 std::map<wxString, int> connectorNetCodes;
91 std::map<wxString, int> resistorPinNetCodes;
93 for(
const auto& [key, subgraphs] : graph->
GetNetMap() )
97 for(
SCH_ITEM* item : subgraph->GetItems() )
106 wxString ref = symbol->
GetRef( &subgraph->GetSheet() );
109 if( ref ==
"J1" || ref ==
"J2" || ref ==
"J3" || ref ==
"J4" ||
110 ref ==
"#PWR01" || ref ==
"#PWR02" || ref ==
"#PWR03" || ref ==
"#PWR04" )
112 connectorNetCodes[ref] = key.Netcode;
118 wxString pinKey = ref +
"." +
pin->GetNumber();
119 resistorPinNetCodes[pinKey] = key.Netcode;
128 BOOST_REQUIRE_MESSAGE( connectorNetCodes.count(
"J1" ),
"J1 (VCC connector) should be found" );
129 BOOST_REQUIRE_MESSAGE( connectorNetCodes.count(
"J2" ),
"J2 (GND connector) should be found" );
130 BOOST_REQUIRE_MESSAGE( connectorNetCodes.count(
"J3" ),
"J3 (BUS0) should be found" );
131 BOOST_REQUIRE_MESSAGE( connectorNetCodes.count(
"J4" ),
"J4 (BUS1) should be found" );
132 BOOST_REQUIRE_MESSAGE( connectorNetCodes.count(
"#PWR02" ),
"GND power symbol should be found" );
135 BOOST_REQUIRE_MESSAGE( connectorNetCodes.count(
"#PWR01" ),
"VCC power symbol should be found" );
136 BOOST_CHECK_MESSAGE( connectorNetCodes[
"J1"] == connectorNetCodes[
"#PWR01"],
137 "J1 should be on the same net as VCC" );
140 BOOST_CHECK_MESSAGE( connectorNetCodes[
"J2"] == connectorNetCodes[
"#PWR02"],
141 "J2 should be on the same net as GND" );
145 BOOST_REQUIRE_MESSAGE( resistorPinNetCodes.count(
"R1.1" ),
"R1 pin 1 should be found" );
146 BOOST_CHECK_MESSAGE( connectorNetCodes[
"J3"] == resistorPinNetCodes[
"R1.1"],
147 "J3 (BUS0) should be on the same net as R1.1 (via OUT_0)" );
152 BOOST_CHECK_MESSAGE( connectorNetCodes[
"J4"] == connectorNetCodes[
"#PWR02"],
153 "J4 (BUS1) should be on the same net as GND (via OUT_1)" );