78 SCH_SHEET_LIST sheets = m_schematic->BuildSheetListSortedByPageNumbers();
83 std::map<wxString, int> labelNetCodes;
85 for(
const auto& [key, subgraphs] : graph->
GetNetMap() )
91 for(
SCH_ITEM* item : subgraph->GetItems() )
96 wxString labelText = label->
GetText();
101 if( sheetPath.
size() > 1 )
107 sheetName = lastSheet->
GetName();
110 if( !sheetName.IsEmpty() && labelText ==
"b" )
112 wxString mapKey = sheetName +
":" + labelText;
113 labelNetCodes[mapKey] = key.Netcode;
121 BOOST_REQUIRE_MESSAGE( labelNetCodes.count(
"test1:b" ),
122 "Label 'b' should be found in test1 sub-sheet" );
123 BOOST_REQUIRE_MESSAGE( labelNetCodes.count(
"test2:b" ),
124 "Label 'b' should be found in test2 sub-sheet" );
130 BOOST_CHECK_MESSAGE( labelNetCodes[
"test1:b"] == labelNetCodes[
"test2:b"],
131 "Label 'b' in test1 should be on the same net as label 'b' in test2 "
132 "(connected through bus {a})" );
virtual const wxString & GetText() const
Return the string associated with the text object.