50 std::vector<std::pair<wxString, int>> tests =
52 {
"issue18092/issue18092", 1 }
55 for(
auto&[
name, nets] : tests )
59 SCH_SHEET_LIST sheets = m_schematic->BuildSheetListSortedByPageNumbers();
62 BOOST_CHECK( nets == graph->
GetNetMap().size() );
85 SCH_SHEET_LIST sheets = m_schematic->BuildSheetListSortedByPageNumbers();
91 std::map<wxString, int> tpNetCodes;
93 for(
const auto& [key, subgraphs] : graph->
GetNetMap() )
97 for(
SCH_ITEM* item : subgraph->GetItems() )
106 wxString ref = symbol->
GetRef( &subgraph->GetSheet() );
108 if( ref ==
"TP101" || ref ==
"TP102" ||
109 ref ==
"TP401" || ref ==
"TP402" )
111 tpNetCodes[ref] = key.Netcode;
120 BOOST_REQUIRE_MESSAGE( tpNetCodes.count(
"TP101" ),
121 "TP101 should be found in netlist" );
122 BOOST_REQUIRE_MESSAGE( tpNetCodes.count(
"TP102" ),
123 "TP102 should be found in netlist" );
124 BOOST_REQUIRE_MESSAGE( tpNetCodes.count(
"TP401" ),
125 "TP401 should be found in netlist" );
126 BOOST_REQUIRE_MESSAGE( tpNetCodes.count(
"TP402" ),
127 "TP402 should be found in netlist" );
131 "TP101 and TP401 should be on the same net (m.X.Y.Z1)" );
136 "TP102 and TP402 should be on the same net (m.X.Y.Z2)" );
Calculate the connectivity of a schematic and generates netlists.
const NET_MAP & GetNetMap() const
A subgraph is a set of items that are electrically connected on a single sheet.
Instantiate the current locale within a scope in which you are expecting exceptions to be thrown.
Base class for any item which can be embedded within the SCHEMATIC container class,...
A container for handling SCH_SHEET_PATH objects in a flattened hierarchy.
const wxString GetRef(const SCH_SHEET_PATH *aSheet, bool aIncludeUnit=false) const override
void LoadSchematic(SETTINGS_MANAGER &aSettingsManager, const wxString &aRelPath, std::unique_ptr< SCHEMATIC > &aSchematic)
std::vector< FAB_LAYER_COLOR > dummy
SETTINGS_MANAGER m_settingsManager
CONNECTIVITY_TEST_FIXTURE()
std::unique_ptr< SCHEMATIC > m_schematic
BOOST_FIXTURE_TEST_CASE(CheckNetCounts, CONNECTIVITY_TEST_FIXTURE)
BOOST_CHECK_MESSAGE(totalMismatches==0, std::to_string(totalMismatches)+" board(s) with strategy disagreements")