53 std::vector<wxString> tests =
69 "issue17967/issue17967",
72 "unconnected-netnames/unconnected-netnames",
76 for(
const wxString& relPath : tests )
81 std::vector<DRC_ITEM> violations;
95 [&](
const std::shared_ptr<DRC_ITEM>& aItem,
const VECTOR2I& aPos,
int aLayer,
96 const std::function<
void(
PCB_MARKER* )>& aPathGenerator )
99 violations.push_back( *aItem );
104 if( violations.empty() )
114 std::map<KIID, EDA_ITEM*> itemMap;
115 m_board->FillItemMap( itemMap );
117 for(
const DRC_ITEM& item : violations )
120 BOOST_ERROR( wxString::Format(
"DRC regression: %s\n"
121 "%d violations found (expected 0)\n"
124 (
int) violations.size(),
135 std::map<int, SEVERITY> issue19325_ignore, issue22102_ignore;
142 {
"issue1358", 2, {} },
143 {
"issue2512", 5, {} },
144 {
"issue2528", 1, {} },
145 {
"issue5750", 4, {} },
146 {
"issue5854", 3, {} },
147 {
"issue6879", 6, {} },
148 {
"issue6945", 2, {} },
149 {
"issue7241", 1, {} },
150 {
"issue7267", 5, {} },
151 {
"issue7325", 2, {} },
152 {
"issue8003", 2, {} },
153 {
"issue9081", 2, {} },
154 {
"issue12109", 8, {} },
155 {
"issue14334", 2, {} },
156 {
"issue16566", 6, {} },
157 {
"issue18142", 1, {} },
158 {
"reverse_via", 3, {} },
159 {
"intersectingzones", 1, {} },
160 {
"fill_bad", 1, {} },
161 {
"issue18878", 12, {} },
162 {
"issue19325/issue19325", 4, issue19325_ignore },
163 {
"issue22102", 2, issue22102_ignore },
166 for(
const auto& [testName, expectedErrors, customSeverities] : tests )
171 std::vector<PCB_MARKER> markers;
172 std::vector<DRC_ITEM> violations;
181 for(
const auto [
test, severity] : customSeverities)
185 [&](
const std::shared_ptr<DRC_ITEM>& aItem,
const VECTOR2I& aPos,
int aLayer,
186 const std::function<
void(
PCB_MARKER* )>& aPathGenerator )
188 markers.emplace_back(
PCB_MARKER( aItem, aPos ) );
193 violations.push_back( *aItem );
199 if( violations.size() == expectedErrors )
209 std::map<KIID, EDA_ITEM*> itemMap;
210 m_board->FillItemMap( itemMap );
212 for(
const DRC_ITEM& item : violations )
215 BOOST_ERROR( wxString::Format(
"DRC regression: %s\n"
216 "%d violations found (expected %d)\n"
219 (
int) violations.size(),
232 std::vector<wxString> tests =
234 "issue19090/issue19090",
237 for(
const wxString& relPath : tests )
242 std::vector<DRC_ITEM> violations;
256 [&](
const std::shared_ptr<DRC_ITEM>& aItem,
const VECTOR2I& aPos,
int aLayer,
257 const std::function<
void(
PCB_MARKER* )>& aPathGenerator )
260 violations.push_back( *aItem );
265 if( violations.empty() )
275 std::map<KIID, EDA_ITEM*> itemMap;
276 m_board->FillItemMap( itemMap );
278 for(
const DRC_ITEM& item : violations )
281 BOOST_ERROR( wxString::Format(
"DRC zone regression: %s\n"
282 "%d violations found (expected 0)\n"
285 (
int) violations.size(),
BOOST_CHECK_EQUAL(result, "25.4")