36struct DRC_REGRESSION_TEST_FIXTURE
38 DRC_REGRESSION_TEST_FIXTURE()
41 SETTINGS_MANAGER m_settingsManager;
42 std::unique_ptr<BOARD> m_board;
51 std::vector<std::pair<wxString, int>> tests =
53 {
"orientation_drc", 1 },
56 for(
const std::pair<wxString, int>&
test : tests )
61 std::vector<DRC_ITEM> violations;
80 [&](
const std::shared_ptr<DRC_ITEM>& aItem,
const VECTOR2I& aPos,
int aLayer,
81 const std::function<
void(
PCB_MARKER* )>& aPathGenerator )
84 violations.push_back( *aItem );
89 if( violations.size() ==
test.second )
101 for(
const DRC_ITEM& item : violations )
104 BOOST_ERROR( wxString::Format(
"DRC orientation: %s\n"
105 "%d violations found (expected %d)\n"
108 (
int) violations.size(),
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_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)
BOOST_CHECK_EQUAL(std::any_cast< std::string >(rows[0].at("val")), "12345678901234567.89")
BOOST_FIXTURE_TEST_CASE(DRCOrientation, DRC_REGRESSION_TEST_FIXTURE)
BOOST_TEST_MESSAGE("Polyline has "<< chain.PointCount()<< " points")
VECTOR2< int32_t > VECTOR2I