48 std::vector<std::pair<wxString, int>> tests = { {
"RuleAreaOneNetclassDirective", 0 },
49 {
"RuleAreaTwoNetclassDirectives", 1 },
50 {
"RuleAreaThreeNetclassDirectives", 2 },
51 {
"RuleAreaNetclassConflictOnWire_1", 1 },
52 {
"RuleAreaNetclassConflictOnWire_2", 1 } };
54 for(
const std::pair<wxString, int>&
test : tests )
68 std::unordered_set<SCH_SCREEN*> allScreens;
74 allScreens.insert( screen );
77 m_schematic->ConnectionGraph()->Recalculate( m_schematic->GetSheets(),
true );
78 m_schematic->ConnectionGraph()->RunERC();
85 "Expected " <<
test.second <<
" errors in " <<
test.first.ToStdString()
86 <<
" but got " << errors.
GetCount() <<
"\n"
97 std::vector<std::pair<wxString, int>> tests = { {
"RuleAreaNoOverlap", 0 },
98 {
"RuleAreaOneOverlap", 1 },
99 {
"RuleAreaOneOverlapTwice", 2 },
100 {
"RuleAreaTwoOverlaps", 2 } };
102 for(
const std::pair<wxString, int>&
test : tests )
116 std::unordered_set<SCH_SCREEN*> allScreens;
122 allScreens.insert( screen );
125 m_schematic->ConnectionGraph()->Recalculate( m_schematic->GetSheets(),
true );
135 "Expected " <<
test.second <<
" errors in " <<
test.first.ToStdString()
136 <<
" but got " << errors.
GetCount() <<
"\n"
wxString GetTextReport()
Returns the ERC report in "text" (human readable) format.
Container for ERC settings.
std::map< int, SEVERITY > m_ERCSeverities
int RunRuleAreaERC()
Tests for rule area ERC issues.
Instantiate the current locale within a scope in which you are expecting exceptions to be thrown.
static std::vector< std::pair< SCH_RULE_AREA *, SCH_SCREEN * > > UpdateRuleAreasInScreens(std::unordered_set< SCH_SCREEN * > &screens, KIGFX::SCH_VIEW *view)
Updates all rule area connectvity / caches in the given sheet paths.
Container class that holds multiple SCH_SCREEN objects in a hierarchy.
void BuildClientSheetPathList()
built the list of sheet paths sharing a screen for each screen in use
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
@ ERCE_OVERLAPPING_RULE_AREAS
Rule areas are overlapping.
@ ERCE_NETCLASS_CONFLICT
Multiple labels assign different netclasses to same net.
@ 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)
std::vector< FAB_LAYER_COLOR > dummy
std::unique_ptr< SCHEMATIC > m_schematic
SETTINGS_MANAGER m_settingsManager
ERC_REGRESSION_TEST_FIXTURE()
BOOST_FIXTURE_TEST_CASE(ERCRuleAreaNetClasseDirectives, ERC_REGRESSION_TEST_FIXTURE)