48 if(
name == wxT(
"B" ) ||
name == wxT(
"D" ) )
59 std::shared_ptr<NET_SETTINGS>& netSettings = m_schematic.Prj().GetProjectFile().m_NetSettings;
61 std::shared_ptr<NETCLASS> nc = netSettings->GetEffectiveNetClass(
"/BUS.SIGNAL" );
62 BOOST_CHECK_EQUAL( nc->GetVariableSubstitutionName(),
"CLASS2,CLASS1,Default" );
64 nc = netSettings->GetEffectiveNetClass(
"/BUS.A0" );
65 BOOST_CHECK_EQUAL( nc->GetVariableSubstitutionName(),
"CLASS1,CLASS3,Default" );
67 nc = netSettings->GetEffectiveNetClass(
"/BUS.A1" );
68 BOOST_CHECK_EQUAL( nc->GetVariableSubstitutionName(),
"CLASS1,Default" );
70 nc = netSettings->GetEffectiveNetClass(
"/BUS.A2" );
71 wxString
name = nc->GetName();
72 BOOST_CHECK_EQUAL( nc->GetVariableSubstitutionName(),
"CLASS1,CLASS4,Default" );
74 nc = netSettings->GetEffectiveNetClass(
"/NET_1" );
75 BOOST_CHECK_EQUAL( nc->GetVariableSubstitutionName(),
"CLASS2,CLASS3,Default" );
77 nc = netSettings->GetEffectiveNetClass(
"/NET_2" );
78 BOOST_CHECK_EQUAL( nc->GetVariableSubstitutionName(),
"CLASS_COMPLETE" );
80 nc = netSettings->GetEffectiveNetClass(
"/NET_3" );
81 BOOST_CHECK_EQUAL( nc->GetVariableSubstitutionName(),
"CLASS_COMPLETE,CLASS3,CLASS4" );
83 nc = netSettings->GetEffectiveNetClass(
"/NET_4" );
84 BOOST_CHECK_EQUAL( nc->GetVariableSubstitutionName(),
"CLASS_COMPLETE,CLASS3,CLASS4" );
virtual const wxString & GetText() const
Return the string associated with the text object.
EE_TYPE OfType(KICAD_T aType) const
A generic fixture for loading schematics and associated settings for qa tests.
Base class for any item which can be embedded within the SCHEMATIC container class,...
std::shared_ptr< NETCLASS > GetEffectiveNetClass(const SCH_SHEET_PATH *aSheet=nullptr) const
EE_RTREE & Items()
Gets the full RTree, usually for iterating.
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
static void LoadSchematic(SCHEMATIC *aSchematic, SCH_SHEET *aRootSheet, const wxString &aFileName)
Definition of the SCH_SHEET_PATH and SCH_SHEET_LIST classes for Eeschema.
BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_CASE(TestSubsheetNetclass)