52 std::vector<wxString> tests =
68 "issue17967/issue17967",
70 "unconnected-netnames/unconnected-netnames",
73 for(
const wxString& relPath : tests )
78 std::vector<DRC_ITEM> violations;
92 [&](
const std::shared_ptr<DRC_ITEM>& aItem,
VECTOR2I aPos,
int aLayer,
96 violations.push_back( *aItem );
101 if( violations.empty() )
103 BOOST_CHECK_EQUAL( 1, 1 );
104 BOOST_TEST_MESSAGE( wxString::Format(
"DRC regression: %s, passed", relPath ) );
110 std::map<KIID, EDA_ITEM*> itemMap;
111 m_board->FillItemMap( itemMap );
113 for(
const DRC_ITEM& item : violations )
119 BOOST_ERROR( wxString::Format(
"DRC regression: %s, failed (err: expected 0 found %d",
120 relPath, (
int)violations.size() ) );
130 std::map<int, SEVERITY> issue19325_ignore;
135 {
"issue1358", 2, {} },
136 {
"issue2512", 5, {} },
137 {
"issue2528", 1, {} },
138 {
"issue5750", 4, {} },
139 {
"issue5854", 3, {} },
140 {
"issue6879", 6, {} },
141 {
"issue6945", 2, {} },
142 {
"issue7241", 1, {} },
143 {
"issue7267", 5, {} },
144 {
"issue7325", 4, {} },
145 {
"issue8003", 2, {} },
146 {
"issue9081", 2, {} },
147 {
"issue12109", 8, {} },
148 {
"issue14334", 2, {} },
149 {
"issue16566", 6, {} },
150 {
"issue18142", 1, {} },
151 {
"reverse_via", 3, {} },
152 {
"intersectingzones", 1, {} },
153 {
"fill_bad", 1, {} },
154 {
"issue18878", 9, {} },
155 {
"issue19325/issue19325", 4, issue19325_ignore },
158 for(
const auto& [testName, expectedErrors, customSeverities] : tests )
160 BOOST_TEST_CONTEXT( testName )
165 std::vector<PCB_MARKER> markers;
166 std::vector<DRC_ITEM> violations;
174 for(
const auto [
test, severity] : customSeverities)
178 [&](
const std::shared_ptr<DRC_ITEM>& aItem,
VECTOR2I aPos,
int aLayer,
181 markers.emplace_back(
PCB_MARKER( aItem, aPos ) );
186 violations.push_back( *aItem );
192 if( violations.size() == expectedErrors )
194 BOOST_CHECK_EQUAL( 1, 1 );
195 BOOST_TEST_MESSAGE( wxString::Format(
"DRC regression: %s, passed", testName ) );
201 std::map<KIID, EDA_ITEM*> itemMap;
202 m_board->FillItemMap( itemMap );
204 for(
const DRC_ITEM& item : violations )
210 BOOST_CHECK_EQUAL( violations.size(), expectedErrors );
212 BOOST_ERROR( wxString::Format(
"DRC regression: %s, failed", testName ) );
constexpr EDA_IU_SCALE pcbIUScale
Container for design settings for a BOARD object.
std::map< int, SEVERITY > m_DRCSeverities
std::shared_ptr< DRC_ENGINE > m_DRCEngine
std::set< wxString > m_DrcExclusions
SEVERITY GetSeverity(int aDRCErrorCode)
std::function< void(PCB_MARKER *aMarker)> DRC_CUSTOM_MARKER_HANDLER
@ DRCE_LIB_FOOTPRINT_ISSUES
@ DRCE_DRILLED_HOLES_TOO_CLOSE
@ DRCE_LIB_FOOTPRINT_MISMATCH
void LoadBoard(SETTINGS_MANAGER &aSettingsManager, const wxString &aRelPath, std::unique_ptr< BOARD > &aBoard)
SETTINGS_MANAGER m_settingsManager
DRC_REGRESSION_TEST_FIXTURE()
std::unique_ptr< BOARD > m_board
BOOST_FIXTURE_TEST_CASE(DRCFalsePositiveRegressions, DRC_REGRESSION_TEST_FIXTURE)