59 std::map<wxString, wxString> pinNets;
61 for(
const auto& [key, subgraphs] : m_schematic->ConnectionGraph()->GetNetMap() )
65 for(
SCH_ITEM* item : subgraph->GetItems() )
76 wxString ref = symbol->
GetRef( &subgraph->GetSheet() );
77 pinNets[ref + wxT(
"-" ) +
pin->GetNumber()] = key.Name;
82 const std::vector<std::pair<wxString, wxString>>
expected = {
83 { wxT(
"R1-1" ), wxT(
"EXT_RST" ) },
84 { wxT(
"R11-1" ), wxT(
"EXT_RST" ) },
85 { wxT(
"R21-1" ), wxT(
"EXT_RST" ) },
87 { wxT(
"R2-1" ), wxT(
"+5V" ) },
88 { wxT(
"R12-1" ), wxT(
"+5V" ) },
90 { wxT(
"R3-1" ), wxT(
"VBUS" ) },
91 { wxT(
"R13-1" ), wxT(
"VBUS" ) },
92 { wxT(
"R22-1" ), wxT(
"VBUS" ) },
94 { wxT(
"R4-1" ), wxT(
"ZZZ_SHALLOW" ) },
95 { wxT(
"R31-1" ), wxT(
"ZZZ_SHALLOW" ) },
96 { wxT(
"R41-1" ), wxT(
"ZZZ_SHALLOW" ) },
101 auto it = pinNets.find(
pin );
103 BOOST_REQUIRE_MESSAGE( it != pinNets.end(),
pin + wxT(
" is missing from the netlist" ) );
104 BOOST_CHECK_MESSAGE( it->second == netName,
105 pin + wxT(
" resolved to " ) + it->second + wxT(
" instead of " )