52 m_board->GetDesignSettings().m_DRCEngine->ClearViolationHandler();
66 std::multiset<wxString>
result;
75 [&](
const std::shared_ptr<DRC_ITEM>& aItem,
const VECTOR2I&,
int,
79 result.emplace( aItem->GetErrorMessage(
false ) );
116 "DRC engine not initialized" );
118 std::multiset<wxString>
v1;
119 std::multiset<wxString>
v2;
132 (
int)
v1.size(), (
int)
v2.size() ) );
135 BOOST_CHECK_MESSAGE(
v1 ==
v2,
"V2 engine violation set differs from V1 for " << aBoard );
150 checkParity( *
this,
"creepage/creepage_malformed_edge" );
156 checkParity( *
this,
"creepage_slots/creepage_slots" );
static const ADVANCED_CFG & GetCfg()
Get the singleton instance's config, which is shared by all consumers.
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.
BOARD_DESIGN_SETTINGS & GetDesignSettings()
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).
void ClearViolationHandler()
void LoadBoard(SETTINGS_MANAGER &aSettingsManager, const wxString &aRelPath, std::unique_ptr< BOARD > &aBoard)
ADVANCED_CFG_FLAG_GUARD(bool aValue)
~ADVANCED_CFG_FLAG_GUARD()
CREEPAGE_PARITY_FIXTURE()=default
std::unique_ptr< BOARD > m_board
SETTINGS_MANAGER m_settingsManager
std::multiset< wxString > runCreepage()
Run the creepage DRC and return the multiset of violation messages.
~CREEPAGE_PARITY_FIXTURE()
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_AUTO_TEST_CASE(CreepageBoard)
static void checkParity(CREEPAGE_PARITY_FIXTURE &aFixture, const std::string &aBoard)
BOOST_CHECK_EQUAL(std::any_cast< std::string >(rows[0].at("val")), "12345678901234567.89")
BOOST_REQUIRE_MESSAGE(dc.CacheTableInfo(table, { "part_id", "val" }), dc.GetLastError())
BOOST_AUTO_TEST_SUITE_END()
BOOST_TEST_MESSAGE("Polyline has "<< chain.PointCount()<< " points")
wxString result
Test unit parsing edge cases and error handling.
VECTOR2< int32_t > VECTOR2I