51 std::vector<wxString> tests =
67 "unconnected-netnames/unconnected-netnames",
70 for(
const wxString& relPath : tests )
75 std::vector<DRC_ITEM> violations;
89 [&](
const std::shared_ptr<DRC_ITEM>& aItem,
VECTOR2I aPos,
int aLayer )
92 violations.push_back( *aItem );
97 if( violations.empty() )
99 BOOST_CHECK_EQUAL( 1, 1 );
100 BOOST_TEST_MESSAGE( wxString::Format(
"DRC regression: %s, passed", relPath ) );
106 std::map<KIID, EDA_ITEM*> itemMap;
107 m_board->FillItemMap( itemMap );
109 for(
const DRC_ITEM& item : violations )
115 BOOST_ERROR( wxString::Format(
"DRC regression: %s, failed (err: expected 0 found %d",
116 relPath, (
int)violations.size() ) );
126 std::vector< std::pair<wxString, int> > tests =
144 {
"reverse_via", 3 },
145 {
"intersectingzones", 1 },
147 {
"issue17967/issue17967", 1},
151 for(
const auto& [testName, expectedErrors] : tests )
153 BOOST_TEST_CONTEXT( testName )
158 std::vector<PCB_MARKER> markers;
159 std::vector<DRC_ITEM> violations;
168 [&](
const std::shared_ptr<DRC_ITEM>& aItem,
VECTOR2I aPos,
int aLayer )
170 markers.emplace_back(
PCB_MARKER( aItem, aPos ) );
175 violations.push_back( *aItem );
181 if( violations.size() == expectedErrors )
183 BOOST_CHECK_EQUAL( 1, 1 );
184 BOOST_TEST_MESSAGE( wxString::Format(
"DRC regression: %s, passed", testName ) );
190 std::map<KIID, EDA_ITEM*> itemMap;
191 m_board->FillItemMap( itemMap );
193 for(
const DRC_ITEM& item : violations )
199 BOOST_CHECK_EQUAL( violations.size(), expectedErrors );
201 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)
@ DRCE_LIB_FOOTPRINT_ISSUES
@ 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)