51 std::vector<std::pair<wxString, int>> tests =
53 {
"skew_within_diff_pairs_drc", 2 },
54 {
"skew_group_matched_drc", 5 }
57 for(
const std::pair<wxString, int>&
test : tests )
62 std::vector<DRC_ITEM> violations;
81 [&](
const std::shared_ptr<DRC_ITEM>& aItem,
VECTOR2I aPos,
int aLayer )
84 violations.push_back( *aItem );
89 if( violations.size() ==
test.second )
91 BOOST_CHECK_EQUAL( 1, 1 );
92 BOOST_TEST_MESSAGE( wxString::Format(
"DRC skew: %s, passed",
test.first ) );
98 std::map<KIID, EDA_ITEM*> itemMap;
99 m_board->FillItemMap( itemMap );
101 for(
const DRC_ITEM& item : violations )
107 BOOST_ERROR( wxString::Format(
"DRC skew: %s, failed (violations found %d expected %d)",
108 test.first, (
int)violations.size(),
test.second ) );
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
SEVERITY GetSeverity(int aDRCErrorCode)
@ DRCE_LIB_FOOTPRINT_ISSUES
@ DRCE_DRILL_OUT_OF_RANGE
@ DRCE_LIB_FOOTPRINT_MISMATCH
void LoadBoard(SETTINGS_MANAGER &aSettingsManager, const wxString &aRelPath, std::unique_ptr< BOARD > &aBoard)
void FillZones(BOARD *m_board)
SETTINGS_MANAGER m_settingsManager
DRC_REGRESSION_TEST_FIXTURE()
std::unique_ptr< BOARD > m_board
BOOST_FIXTURE_TEST_CASE(DRCSkew, DRC_REGRESSION_TEST_FIXTURE)