81 std::map<wxString, int> pinNetCodes;
83 for(
const auto& [key, subgraphs] : graph->
GetNetMap() )
87 for(
SCH_ITEM* item : subgraph->GetItems() )
97 wxString ref = symbol->
GetRef( &subgraph->GetSheet() );
98 wxString pinNum =
pin->GetNumber();
99 wxString pinKey = ref + wxT(
"-" ) + pinNum;
101 pinNetCodes[pinKey] = key.Netcode;
108 BOOST_REQUIRE_MESSAGE( pinNetCodes.count(
"J2-1" ),
"J2 Pin 1 should be in netlist" );
109 BOOST_REQUIRE_MESSAGE( pinNetCodes.count(
"J2-2" ),
"J2 Pin 2 should be in netlist" );
110 BOOST_REQUIRE_MESSAGE( pinNetCodes.count(
"J3-1" ),
"J3 Pin 1 should be in netlist" );
117 "J2-Pin2 and J3-Pin1 should be on the same net "
118 "(connected via HL2 + Global Label)" );
122 "J2-Pin1 (HL1) and J2-Pin2 (HL2) should be on different nets" );
125 for(
int p = 3; p <= 6; p++ )
127 wxString pinKey = wxString::Format(
"J2-%d", p );
129 if( pinNetCodes.count( pinKey ) )
132 wxString::Format(
"J2-Pin2 and J2-Pin%d should be on "
133 "the same net (both via HL2)", p ) );