49 std::vector<wxString> tests = {
63 "issue17967/issue17967",
66 "unconnected-netnames/unconnected-netnames",
68 "diff_pair_uncoupled_tuning_drc"
71 for(
const wxString& relPath : tests )
76 std::vector<DRC_ITEM> violations;
90 [&](
const std::shared_ptr<DRC_ITEM>& aItem,
const VECTOR2I& aPos,
int aLayer,
91 const std::function<
void(
PCB_MARKER* )>& aPathGenerator )
94 violations.push_back( *aItem );
99 if( violations.empty() )
109 std::map<KIID, EDA_ITEM*> itemMap;
110 m_board->FillItemMap( itemMap );
112 for(
const DRC_ITEM& item : violations )
115 BOOST_ERROR( wxString::Format(
"DRC regression: %s\n"
116 "%d violations found (expected 0)\n"
119 (
int) violations.size(),
130 std::map<int, SEVERITY> issue19325_ignore, issue22102_ignore;
137 {
"issue1358", 2, {} },
138 {
"issue2512", 5, {} },
139 {
"issue2528", 1, {} },
140 {
"issue5750", 4, {} },
141 {
"issue5854", 3, {} },
142 {
"issue6879", 6, {} },
143 {
"issue6945", 2, {} },
144 {
"issue7241", 1, {} },
145 {
"issue7267", 5, {} },
146 {
"issue7325", 2, {} },
147 {
"issue8003", 2, {} },
148 {
"issue9081", 2, {} },
149 {
"issue12109", 8, {} },
150 {
"issue14334", 2, {} },
151 {
"issue16566", 6, {} },
152 {
"issue18142", 1, {} },
153 {
"reverse_via", 3, {} },
154 {
"intersectingzones", 1, {} },
155 {
"fill_bad", 1, {} },
156 {
"issue18878", 12, {} },
157 {
"issue19325/issue19325", 4, issue19325_ignore },
158 {
"issue22102", 2, issue22102_ignore },
159 {
"issue11814", 2, {} },
162 for(
const auto& [testName, expectedErrors, customSeverities] : tests )
167 std::vector<PCB_MARKER> markers;
168 std::vector<DRC_ITEM> violations;
177 for(
const auto [
test, severity] : customSeverities)
181 [&](
const std::shared_ptr<DRC_ITEM>& aItem,
const VECTOR2I& aPos,
int aLayer,
182 const std::function<
void(
PCB_MARKER* )>& aPathGenerator )
184 markers.emplace_back(
PCB_MARKER( aItem, aPos ) );
189 violations.push_back( *aItem );
195 if( violations.size() == expectedErrors )
205 std::map<KIID, EDA_ITEM*> itemMap;
206 m_board->FillItemMap( itemMap );
208 for(
const DRC_ITEM& item : violations )
211 BOOST_ERROR( wxString::Format(
"DRC regression: %s\n"
212 "%d violations found (expected %d)\n"
215 (
int) violations.size(),
228 std::vector<wxString> tests =
230 "issue19090/issue19090",
231 "issue23467/issue23467",
234 for(
const wxString& relPath : tests )
239 std::vector<DRC_ITEM> violations;
253 [&](
const std::shared_ptr<DRC_ITEM>& aItem,
const VECTOR2I& aPos,
int aLayer,
254 const std::function<
void(
PCB_MARKER* )>& aPathGenerator )
257 violations.push_back( *aItem );
262 if( violations.empty() )
272 std::map<KIID, EDA_ITEM*> itemMap;
273 m_board->FillItemMap( itemMap );
275 for(
const DRC_ITEM& item : violations )
278 BOOST_ERROR( wxString::Format(
"DRC zone regression: %s\n"
279 "%d violations found (expected 0)\n"
282 (
int) violations.size(),
301 std::vector<DRC_ITEM> violations;
313 [&](
const std::shared_ptr<DRC_ITEM>& aItem,
const VECTOR2I&,
int,
316 violations.push_back( *aItem );
321 std::map<KIID, EDA_ITEM*> itemMap;
322 m_board->FillItemMap( itemMap );
324 auto involvesCopperField =
327 for(
const KIID&
id : { aItem.GetMainItemID(), aItem.GetAuxItemID() } )
329 auto it = itemMap.find(
id );
331 if( it != itemMap.end() && it->second->Type() ==
PCB_FIELD_T )
340 for(
const DRC_ITEM& item : violations )
346 if( fieldShorts != 1 )
350 for(
const DRC_ITEM& item : violations )
356 "Expected exactly one shorting-items violation involving a visible "
357 "knockout copper reference field; found "
BOOST_CHECK_EQUAL(result, "25.4")