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 );
104 BOOST_CHECK_MESSAGE( it->second == netName,
105 pin + wxT(
" resolved to " ) + it->second + wxT(
" instead of " )
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,...
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
std::unique_ptr< SCHEMATIC > m_schematic
BOOST_REQUIRE_MESSAGE(dc.CacheTableInfo(table, { "part_id", "val" }), dc.GetLastError())
BOOST_FIXTURE_TEST_CASE(HierarchyDriverRanking, HIERARCHY_DRIVER_RANKING_FIXTURE)
VECTOR3I expected(15, 30, 45)