74 BOOST_REQUIRE_MESSAGE( m_board,
"Failed to load board issue24597" );
76 std::vector<std::shared_ptr<DRC_ITEM>> violations;
79 BOOST_REQUIRE_MESSAGE( bds.
m_DRCEngine,
"DRC engine not initialized" );
87 [&](
const std::shared_ptr<DRC_ITEM>& aItem,
const VECTOR2I&,
int,
91 violations.push_back( aItem );
97 BOOST_REQUIRE_MESSAGE( !violations.empty(),
"Expected a creepage violation around the slot" );
102 std::regex actualRe( R
"(actual\s+([0-9]+\.[0-9]+)\s*mm)" );
104 for(
const std::shared_ptr<DRC_ITEM>& v : violations )
106 std::string msg = v->GetErrorMessage(
false ).ToStdString();
109 BOOST_REQUIRE_MESSAGE( std::regex_search( msg, m, actualRe ),
110 "Could not parse creepage distance from: " << msg );
112 double actual = std::stod( m[1].str() );
116 <<
actual <<
" mm <= 2.78 mm); it should wrap both corner arcs" );
SETTINGS_MANAGER m_settingsManager
std::unique_ptr< BOARD > m_board
DRC_CREEPAGE_ISSUE24597_FIXTURE()=default
~DRC_CREEPAGE_ISSUE24597_FIXTURE()
BOOST_FIXTURE_TEST_CASE(CreepageSlotCornerIssue24597, DRC_CREEPAGE_ISSUE24597_FIXTURE)