51 std::vector<wxString> tests =
67 "issue17967/issue17967",
70 "unconnected-netnames/unconnected-netnames",
74 for(
const wxString& relPath : tests )
79 std::vector<DRC_ITEM> violations;
93 [&](
const std::shared_ptr<DRC_ITEM>& aItem,
const VECTOR2I& aPos,
int aLayer,
94 const std::function<
void(
PCB_MARKER* )>& aPathGenerator )
97 violations.push_back( *aItem );
102 if( violations.empty() )
112 std::map<KIID, EDA_ITEM*> itemMap;
113 m_board->FillItemMap( itemMap );
115 for(
const DRC_ITEM& item : violations )
118 BOOST_ERROR( wxString::Format(
"DRC regression: %s\n"
119 "%d violations found (expected 0)\n"
122 (
int) violations.size(),
133 std::map<int, SEVERITY> issue19325_ignore, issue22102_ignore;
140 {
"issue1358", 2, {} },
141 {
"issue2512", 5, {} },
142 {
"issue2528", 1, {} },
143 {
"issue5750", 4, {} },
144 {
"issue5854", 3, {} },
145 {
"issue6879", 6, {} },
146 {
"issue6945", 2, {} },
147 {
"issue7241", 1, {} },
148 {
"issue7267", 5, {} },
149 {
"issue7325", 2, {} },
150 {
"issue8003", 2, {} },
151 {
"issue9081", 2, {} },
152 {
"issue12109", 8, {} },
153 {
"issue14334", 2, {} },
154 {
"issue16566", 6, {} },
155 {
"issue18142", 1, {} },
156 {
"reverse_via", 3, {} },
157 {
"intersectingzones", 1, {} },
158 {
"fill_bad", 1, {} },
159 {
"issue18878", 12, {} },
160 {
"issue19325/issue19325", 4, issue19325_ignore },
161 {
"issue22102", 2, issue22102_ignore },
164 for(
const auto& [testName, expectedErrors, customSeverities] : tests )
169 std::vector<PCB_MARKER> markers;
170 std::vector<DRC_ITEM> violations;
178 for(
const auto [
test, severity] : customSeverities)
182 [&](
const std::shared_ptr<DRC_ITEM>& aItem,
const VECTOR2I& aPos,
int aLayer,
183 const std::function<
void(
PCB_MARKER* )>& aPathGenerator )
185 markers.emplace_back(
PCB_MARKER( aItem, aPos ) );
190 violations.push_back( *aItem );
196 if( violations.size() == expectedErrors )
206 std::map<KIID, EDA_ITEM*> itemMap;
207 m_board->FillItemMap( itemMap );
209 for(
const DRC_ITEM& item : violations )
212 BOOST_ERROR( wxString::Format(
"DRC regression: %s\n"
213 "%d violations found (expected %d)\n"
216 (
int) violations.size(),
229 std::vector<wxString> tests =
231 "issue19090/issue19090",
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(),
BOOST_CHECK_EQUAL(result, "25.4")