47 std::vector<std::pair<wxString, int>> tests =
49 {
"component_classes_drc", 2 }
52 for(
const std::pair<wxString, int>&
test : tests )
57 std::vector<DRC_ITEM> violations;
77 [&](
const std::shared_ptr<DRC_ITEM>& aItem,
VECTOR2I aPos,
int aLayer )
80 violations.push_back( *aItem );
85 if( violations.size() ==
test.second )
87 BOOST_CHECK_EQUAL( 1, 1 );
88 BOOST_TEST_MESSAGE( wxString::Format(
"DRC component classes: %s, passed",
test.first ) );
94 std::map<KIID, EDA_ITEM*> itemMap;
95 m_board->FillItemMap( itemMap );
97 for(
const DRC_ITEM& item : violations )
103 BOOST_ERROR( wxString::Format(
"DRC component classes: %s, failed (violations found %d expected %d)",
104 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(DRCComponentClasses, DRC_REGRESSION_TEST_FIXTURE)