82 SCH_SHEET_LIST sheets = m_schematic->BuildSheetListSortedByPageNumbers();
86 std::map<wxString, int> connectorNetCodes;
87 std::map<wxString, int> resistorPinNetCodes;
89 for(
const auto& [key, subgraphs] : graph->
GetNetMap() )
93 for(
SCH_ITEM* item : subgraph->GetItems() )
102 wxString ref = symbol->
GetRef( &subgraph->GetSheet() );
105 if( ref ==
"J1" || ref ==
"J2" || ref ==
"J3" || ref ==
"J4" ||
106 ref ==
"#PWR01" || ref ==
"#PWR02" || ref ==
"#PWR03" || ref ==
"#PWR04" )
108 connectorNetCodes[ref] = key.Netcode;
114 wxString pinKey = ref +
"." +
pin->GetNumber();
115 resistorPinNetCodes[pinKey] = key.Netcode;
124 BOOST_REQUIRE_MESSAGE( connectorNetCodes.count(
"J1" ),
"J1 (VCC connector) should be found" );
125 BOOST_REQUIRE_MESSAGE( connectorNetCodes.count(
"J2" ),
"J2 (GND connector) should be found" );
126 BOOST_REQUIRE_MESSAGE( connectorNetCodes.count(
"J3" ),
"J3 (BUS0) should be found" );
127 BOOST_REQUIRE_MESSAGE( connectorNetCodes.count(
"J4" ),
"J4 (BUS1) should be found" );
128 BOOST_REQUIRE_MESSAGE( connectorNetCodes.count(
"#PWR02" ),
"GND power symbol should be found" );
131 BOOST_REQUIRE_MESSAGE( connectorNetCodes.count(
"#PWR01" ),
"VCC power symbol should be found" );
133 "J1 should be on the same net as VCC" );
137 "J2 should be on the same net as GND" );
141 BOOST_REQUIRE_MESSAGE( resistorPinNetCodes.count(
"R1.1" ),
"R1 pin 1 should be found" );
143 "J3 (BUS0) should be on the same net as R1.1 (via OUT_0)" );
149 "J4 (BUS1) should be on the same net as GND (via OUT_1)" );