67 BOOST_REQUIRE_MESSAGE( m_board,
"Failed to load board issue23389" );
69 std::vector<std::shared_ptr<DRC_ITEM>> violations;
72 BOOST_REQUIRE_MESSAGE( bds.
m_DRCEngine,
"DRC engine not initialized" );
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 );
91 BOOST_TEST_MESSAGE( wxString::Format(
"Found %d creepage violations", (
int) violations.size() ) );
93 double maxActual = 0.0;
95 for(
const auto& v : violations )
97 wxString msg = v->GetErrorMessage(
false );
101 int pos = msg.Find(
"actual " );
103 if( pos != wxNOT_FOUND )
106 wxString tail = msg.Mid( pos + 7 );
107 int spacePos = tail.Find(
' ' );
109 if( spacePos != wxNOT_FOUND )
110 tail = tail.Left( spacePos );
112 if( tail.ToDouble( &val ) )
113 maxActual = std::max( maxActual, val );
127 BOOST_CHECK_GT( maxActual, 4.0 );
DRC_CREEPAGE_NPTH_SLOT_FIXTURE()=default
std::unique_ptr< BOARD > m_board
~DRC_CREEPAGE_NPTH_SLOT_FIXTURE()
SETTINGS_MANAGER m_settingsManager
BOOST_FIXTURE_TEST_CASE(CreepageNPTHSlotIssue23389, DRC_CREEPAGE_NPTH_SLOT_FIXTURE)
BOOST_CHECK_EQUAL(result, "25.4")