75 m_schematic->ConnectionGraph()->RunERC();
84 int powerPinErrors = 0;
85 bool allPowerInputAnchors =
true;
86 std::vector<wxString> anchorDescriptions;
88 for(
int ii = 0; ii < errors.
GetCount(); ++ii )
90 std::shared_ptr<RC_ITEM> item = errors.
GetItem( ii );
98 SCH_ITEM* mainItem = m_schematic->ResolveItem( item->GetMainItemID(),
101 BOOST_REQUIRE_MESSAGE( mainItem,
102 "ERCE_POWERPIN_NOT_DRIVEN marker has no main item" );
104 "ERCE_POWERPIN_NOT_DRIVEN marker main item is not a pin" );
108 anchorDescriptions.push_back(
109 wxString::Format(
"ref=%s pin=%s type=%s",
110 pin->GetParentSymbol()->GetRef( &sheetPath ),
115 allPowerInputAnchors =
false;
120 for(
const wxString& s : anchorDescriptions )
121 anchorDump << s << wxS(
"\n" );
124 "Expected at least 1 ERCE_POWERPIN_NOT_DRIVEN error\n"
128 "At least one ERCE_POWERPIN_NOT_DRIVEN marker was anchored on a "
129 "non-PT_POWER_IN pin. The marker should refer to the pin the "
130 "error message is about.\nAnchors seen:\n"
131 << anchorDump.ToStdString()
KICAD_T Type() const
Returns the type of object.
wxString GetTextReport()
Returns the ERC report in "text" (human readable) format in the C-locale.
Container for ERC settings.
std::map< int, SEVERITY > m_ERCSeverities
int TestPinToPin()
Checks the full netlist against the pin-to-pin connectivity requirements.
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,...
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
An implementation of the RC_ITEM_LIST interface which uses the global SHEETLIST to fulfill the contra...
int GetCount(int aSeverity=-1) const override
void SetSeverities(int aSeverities) override
std::shared_ptr< RC_ITEM > GetItem(int aIndex) const override
Retrieve a RC_ITEM by index.
@ ERCE_UNANNOTATED
Symbol has not been annotated.
@ ERCE_POWERPIN_NOT_DRIVEN
Power input pin connected to some others pins but no power out pin to drive it.
@ ERCE_LIB_SYMBOL_MISMATCH
Symbol doesn't match copy in library.
@ ERCE_LIB_SYMBOL_ISSUES
Symbol not found in active libraries.
void LoadSchematic(SETTINGS_MANAGER &aSettingsManager, const wxString &aRelPath, std::unique_ptr< SCHEMATIC > &aSchematic)
@ PT_POWER_IN
power input (GND, VCC for ICs). Must be connected to a power output.
wxString ElectricalPinTypeGetText(ELECTRICAL_PINTYPE)
Definition of the SCH_SHEET_PATH and SCH_SHEET_LIST classes for Eeschema.
std::vector< FAB_LAYER_COLOR > dummy
std::unique_ptr< SCHEMATIC > m_schematic
ERC_POWER_PIN_MARKER_FIXTURE()
SETTINGS_MANAGER m_settingsManager
BOOST_FIXTURE_TEST_CASE(ERCPowerPinNotDrivenMarkerOnPowerInputPin, ERC_POWER_PIN_MARKER_FIXTURE)
BOOST_CHECK_MESSAGE(totalMismatches==0, std::to_string(totalMismatches)+" board(s) with strategy disagreements")