89 BOOST_REQUIRE_MESSAGE( m_board,
"Failed to load board issue24541" );
90 BOOST_REQUIRE_EQUAL( m_board->Footprints().size(), 2 );
95 int npthSlotCount = 0;
97 for(
FOOTPRINT* fp : m_board->Footprints() )
99 for(
PAD*
pad : fp->Pads() )
102 &&
pad->GetDrillSize().x !=
pad->GetDrillSize().y )
109 BOOST_REQUIRE_MESSAGE( npthSlotCount == 2,
110 "Fixture changed: expected two NPTH oval slots." );
114 BOOST_REQUIRE_MESSAGE( bds.
m_DRCEngine,
"DRC engine not initialized" );
125 int holeToHoleCount = 0;
126 std::set<std::pair<KIID, KIID>> npthSlotPairs;
131 const PAD*
pad =
dynamic_cast<const PAD*
>( aItem );
134 &&
pad->GetDrillSize().x !=
pad->GetDrillSize().y;
138 [&](
const std::shared_ptr<DRC_ITEM>& aItem,
const VECTOR2I& ,
int ,
141 int code = aItem->GetErrorCode();
148 BOARD_ITEM* itemA = m_board->ResolveItem( aItem->GetMainItemID(),
true );
149 BOARD_ITEM* itemB = m_board->ResolveItem( aItem->GetAuxItemID(),
true );
151 if( isNpthSlot( itemA ) && isNpthSlot( itemB ) )
152 npthSlotPairs.emplace( std::minmax( itemA->
m_Uuid, itemB->
m_Uuid ) );
159 BOOST_TEST_MESSAGE( wxString::Format(
"Hole-to-hole violations: %d; NPTH slot pairs: %d",
160 holeToHoleCount, (
int) npthSlotPairs.size() ) );
BOOST_CHECK_EQUAL(result, "25.4")