51 std::vector<std::pair<wxString, int>> tests =
54 {
"connection_width_rules", 3 },
59 for(
const std::pair<wxString, int>&
test : tests )
64 std::vector<DRC_ITEM> violations;
83 [&](
const std::shared_ptr<DRC_ITEM>& aItem,
VECTOR2I aPos,
int aLayer )
86 violations.push_back( *aItem );
91 if( violations.size() ==
test.second )
93 BOOST_CHECK_EQUAL( 1, 1 );
94 BOOST_TEST_MESSAGE( wxString::Format(
"DRC connection width: %s, passed",
test.first ) );
100 std::map<KIID, EDA_ITEM*> itemMap;
101 m_board->FillItemMap( itemMap );
103 for(
const DRC_ITEM& item : violations )
109 BOOST_ERROR( wxString::Format(
"DRC connection width: %s, failed (violations found %d expected %d)",
110 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(DRCCopperConn, DRC_REGRESSION_TEST_FIXTURE)