77 std::map<wxString, int> pinNetCodes;
79 for(
const auto& [key, subgraphs] : graph->
GetNetMap() )
83 for(
SCH_ITEM* item : subgraph->GetItems() )
93 wxString ref = symbol->
GetRef( &subgraph->GetSheet() );
94 wxString pinNum =
pin->GetNumber();
95 wxString pinKey = ref + wxT(
"-" ) + pinNum;
97 pinNetCodes[pinKey] = key.Netcode;
104 BOOST_REQUIRE_MESSAGE( pinNetCodes.count(
"J2-1" ),
"J2 Pin 1 should be in netlist" );
105 BOOST_REQUIRE_MESSAGE( pinNetCodes.count(
"J2-2" ),
"J2 Pin 2 should be in netlist" );
106 BOOST_REQUIRE_MESSAGE( pinNetCodes.count(
"J3-1" ),
"J3 Pin 1 should be in netlist" );
113 "J2-Pin2 and J3-Pin1 should be on the same net "
114 "(connected via HL2 + Global Label)" );
118 "J2-Pin1 (HL1) and J2-Pin2 (HL2) should be on different nets" );
121 for(
int p = 3; p <= 6; p++ )
123 wxString pinKey = wxString::Format(
"J2-%d", p );
125 if( pinNetCodes.count( pinKey ) )
128 wxString::Format(
"J2-Pin2 and J2-Pin%d should be on "
129 "the same net (both via HL2)", p ) );