58 std::vector<DRC_ITEM> edgeViolations;
59 std::vector<DRC_ITEM> holeViolations;
70 [&](
const std::shared_ptr<DRC_ITEM>& aItem,
const VECTOR2I&,
int,
74 edgeViolations.push_back( *aItem );
76 holeViolations.push_back( *aItem );
86 auto countViolationsForRef =
87 [&](
const std::vector<DRC_ITEM>& aViolations,
const wxString& aRef,
bool aRequireBothItems )
91 for(
const DRC_ITEM& item : aViolations )
95 for(
KIID uuid : { item.GetMainItemID(), item.GetAuxItemID() } )
116 if( aRequireBothItems ? hits >= 2 : hits > 0 )
125 BOOST_CHECK_EQUAL( countViolationsForRef( edgeViolations, wxString(
"J1" ),
false ), 0 );
130 BOOST_CHECK_EQUAL( countViolationsForRef( holeViolations, wxString(
"J1" ),
true ), 0 );
132 if( countViolationsForRef( edgeViolations, wxString(
"J1" ),
false ) != 0
133 || countViolationsForRef( holeViolations, wxString(
"J1" ),
true ) != 0 )
137 for(
const DRC_ITEM& item : edgeViolations )
140 for(
const DRC_ITEM& item : holeViolations )
146 edgeViolations.clear();
147 holeViolations.clear();
152 BOOST_REQUIRE_GT( countViolationsForRef( edgeViolations, wxString(
"J1" ),
false ), 0 );
153 BOOST_REQUIRE_GT( countViolationsForRef( holeViolations, wxString(
"J1" ),
true ), 0 );
BOOST_CHECK_EQUAL(result, "25.4")