70 if(
pin->GetNumber() == aNumber )
94 fn.AppendDir( wxS(
"issue22286" ) );
95 fn.SetName( wxS(
"bugtest" ) );
101 SCH_SYMBOL* j1 = FindSymbolByRef( wxS(
"J1" ) );
102 BOOST_REQUIRE_MESSAGE( j1 !=
nullptr,
"Symbol J1 not found in schematic" );
105 SCH_PIN* pin8 = FindPinByNumber( j1, wxS(
"8" ) );
106 BOOST_REQUIRE_MESSAGE( pin8 !=
nullptr,
"Pin 8 not found on symbol J1" );
110 "Pin 8 should have alternate '8.pow' set, but has '"
115 "Pin 8 should have m_libPin set after schematic load" );
122 "Library pin should have alternates populated" );
124 "Library pin should have '8.pow' in alternates map" );
127 if( alternates.count( wxS(
"8.pow" ) ) > 0 )
129 const SCH_PIN::ALT& alt = alternates.at( wxS(
"8.pow" ) );
131 "Library pin alternate '8.pow' should have type PT_POWER_IN" );
138 "Pin 8 GetType() should return PT_POWER_IN (7) for alternate '8.pow', "
139 "but returned " + std::to_string(
static_cast<int>( pinType ) )
144 "Pin 8 GetShownName() should return '8.pow', but returned '"
161 fn.AppendDir( wxS(
"issue22286" ) );
162 fn.SetName( wxS(
"bugtest" ) );
167 SCH_SYMBOL* j1 = FindSymbolByRef( wxS(
"J1" ) );
170 SCH_PIN* pin8 = FindPinByNumber( j1, wxS(
"8" ) );
181 "Pin 8 (power_in) should not get an 'unconnected-(...)' name. "
182 "Got: '" + netName +
"'" );
EE_TYPE OfType(KICAD_T aType) const
A generic fixture for loading schematics and associated settings for qa tests.
std::unique_ptr< SCHEMATIC > m_schematic
Base class for any item which can be embedded within the SCHEMATIC container class,...
const std::map< wxString, ALT > & GetAlternates() const
ALT GetAlt(const wxString &aAlt)
SCH_PIN * GetLibPin() const
const wxString & GetShownName() const
wxString GetDefaultNetName(const SCH_SHEET_PATH &aPath, bool aForceNoConnect=false)
ELECTRICAL_PINTYPE GetType() const
EE_RTREE & Items()
Get 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...
std::vector< const SCH_PIN * > GetPins(const SCH_SHEET_PATH *aSheet) const
Retrieve a list of the SCH_PINs for the given sheet path.
const wxString GetRef(const SCH_SHEET_PATH *aSheet, bool aIncludeUnit=false) const override
SCH_SYMBOL * FindSymbolByRef(const wxString &aRef)
SCH_PIN * FindPinByNumber(SCH_SYMBOL *aSymbol, const wxString &aNumber)
static const std::string KiCadSchematicFileExtension
std::string GetEeschemaTestDataDir()
Get the configured location of Eeschema test data.
ELECTRICAL_PINTYPE
The symbol library pin object electrical types used in ERC tests.
@ PT_POWER_IN
power input (GND, VCC for ICs). Must be connected to a power output.
wxString ElectricalPinTypeGetText(ELECTRICAL_PINTYPE)
static void LoadSchematic(SCHEMATIC *aSchematic, SCH_SHEET *aRootSheet, const wxString &aFileName)
ELECTRICAL_PINTYPE m_Type
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_REQUIRE(intersection.has_value()==c.ExpectedIntersection.has_value())
BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_CASE(PinAlternateTypeAfterSchematicLoad)
Test that pin alternates are correctly applied after loading a schematic from disk.
BOOST_CHECK_MESSAGE(totalMismatches==0, std::to_string(totalMismatches)+" board(s) with strategy disagreements")
Definition of file extensions used in Kicad.