74 SCH_SHEET_LIST sheets = m_schematic->BuildSheetListSortedByPageNumbers();
79 std::map<wxString, int> labelNetCodes;
81 for(
const auto& [key, subgraphs] : graph->
GetNetMap() )
87 for(
SCH_ITEM* item : subgraph->GetItems() )
92 wxString labelText = label->
GetText();
97 if( sheetPath.
size() > 1 )
103 sheetName = lastSheet->
GetName();
106 if( !sheetName.IsEmpty() && labelText ==
"b" )
108 wxString mapKey = sheetName +
":" + labelText;
109 labelNetCodes[mapKey] = key.Netcode;
117 BOOST_REQUIRE_MESSAGE( labelNetCodes.count(
"test1:b" ),
118 "Label 'b' should be found in test1 sub-sheet" );
119 BOOST_REQUIRE_MESSAGE( labelNetCodes.count(
"test2:b" ),
120 "Label 'b' should be found in test2 sub-sheet" );
127 "Label 'b' in test1 should be on the same net as label 'b' in test2 "
128 "(connected through bus {a})" );
virtual const wxString & GetText() const
Return the string associated with the text object.