32struct DRC_REGRESSION_TEST_FIXTURE
34 DRC_REGRESSION_TEST_FIXTURE() :
39 SETTINGS_MANAGER m_settingsManager;
40 std::unique_ptr<BOARD> m_board;
47 std::vector<std::pair<wxString, int>> tests = {
48 {
"drc_net_chain_tuning_profiles/test_drc_net_chain_tuning_profiles", 1 }
51 for(
const std::pair<wxString, int>&
test : tests )
56 std::vector<DRC_ITEM> violations;
70 [&](
const std::shared_ptr<DRC_ITEM>& aItem,
const VECTOR2I& aPos,
int aLayer,
71 const std::function<
void(
PCB_MARKER* )>& aPathGenerator )
74 violations.push_back( *aItem );
79 if( violations.size() ==
test.second )
90 for(
const DRC_ITEM& item : violations )
96 wxString::Format(
"DRC net chain tuning profiles: %s, failed (violations found %d expected %d)",
97 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) const
Return the severity of a given DRC error code.
Implements the RC_ITEM_RESOLVER interface to resolve PCB items by their KIID.
void RunTests(EDA_UNITS aUnits, bool aReportAllTrackErrors, bool aTestFootprints, BOARD_COMMIT *aCommit=nullptr)
Run the DRC tests.
void SetViolationHandler(DRC_VIOLATION_HANDLER aHandler)
Set an optional DRC violation handler (receives DRC_ITEMs and positions).
@ DRCE_LIB_FOOTPRINT_ISSUES
@ DRCE_NET_CHAIN_TUNING_PROFILES
@ DRCE_LIB_FOOTPRINT_MISMATCH
void LoadBoard(SETTINGS_MANAGER &aSettingsManager, const wxString &aRelPath, std::unique_ptr< BOARD > &aBoard)
void FillZones(BOARD *m_board)
BOOST_FIXTURE_TEST_CASE(DRCNetChainTuningProfiles, DRC_REGRESSION_TEST_FIXTURE)
BOOST_TEST_MESSAGE("Polyline has "<< chain.PointCount()<< " points")
BOOST_CHECK_EQUAL(result, "25.4")
VECTOR2< int32_t > VECTOR2I