74 m_schematic->ConnectionGraph()->RunERC();
83 int powerPinErrors = 0;
84 bool allPowerInputAnchors =
true;
85 std::vector<wxString> anchorDescriptions;
87 for(
int ii = 0; ii < errors.
GetCount(); ++ii )
89 std::shared_ptr<RC_ITEM> item = errors.
GetItem( ii );
97 SCH_ITEM* mainItem = m_schematic->ResolveItem( item->GetMainItemID(),
100 BOOST_REQUIRE_MESSAGE( mainItem,
101 "ERCE_POWERPIN_NOT_DRIVEN marker has no main item" );
103 "ERCE_POWERPIN_NOT_DRIVEN marker main item is not a pin" );
107 anchorDescriptions.push_back(
108 wxString::Format(
"ref=%s pin=%s type=%s",
109 pin->GetParentSymbol()->GetRef( &sheetPath ),
114 allPowerInputAnchors =
false;
119 for(
const wxString& s : anchorDescriptions )
120 anchorDump << s << wxS(
"\n" );
123 "Expected at least 1 ERCE_POWERPIN_NOT_DRIVEN error\n"
127 "At least one ERCE_POWERPIN_NOT_DRIVEN marker was anchored on a "
128 "non-PT_POWER_IN pin. The marker should refer to the pin the "
129 "error message is about.\nAnchors seen:\n"
130 << 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")