71 BOOST_REQUIRE_MESSAGE( m_board,
"Failed to load board issue23389" );
73 std::vector<std::shared_ptr<DRC_ITEM>> violations;
76 BOOST_REQUIRE_MESSAGE( bds.
m_DRCEngine,
"DRC engine not initialized" );
84 [&](
const std::shared_ptr<DRC_ITEM>& aItem,
const VECTOR2I& aPos,
int aLayer,
85 const std::function<
void(
PCB_MARKER* )>& aPathGenerator )
88 violations.push_back( aItem );
95 BOOST_TEST_MESSAGE( wxString::Format(
"Found %d creepage violations", (
int) violations.size() ) );
97 double maxActual = 0.0;
99 for(
const auto& v : violations )
101 wxString msg = v->GetErrorMessage(
false );
105 int pos = msg.Find(
"actual " );
107 if( pos != wxNOT_FOUND )
110 wxString tail = msg.Mid( pos + 7 );
111 int spacePos = tail.Find(
' ' );
113 if( spacePos != wxNOT_FOUND )
114 tail = tail.Left( spacePos );
116 if( tail.ToDouble( &val ) )
117 maxActual = std::max( maxActual, val );
131 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")