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;
180 for(
const auto [
test, severity] : customSeverities)
184 [&](
const std::shared_ptr<DRC_ITEM>& aItem,
const VECTOR2I& aPos,
int aLayer,
185 const std::function<
void(
PCB_MARKER* )>& aPathGenerator )
187 markers.emplace_back(
PCB_MARKER( aItem, aPos ) );
192 violations.push_back( *aItem );
198 if( violations.size() == expectedErrors )
208 std::map<KIID, EDA_ITEM*> itemMap;
209 m_board->FillItemMap( itemMap );
211 for(
const DRC_ITEM& item : violations )
214 BOOST_ERROR( wxString::Format(
"DRC regression: %s\n"
215 "%d violations found (expected %d)\n"
218 (
int) violations.size(),
231 std::vector<wxString> tests =
233 "issue19090/issue19090",
236 for(
const wxString& relPath : tests )
241 std::vector<DRC_ITEM> violations;
255 [&](
const std::shared_ptr<DRC_ITEM>& aItem,
const VECTOR2I& aPos,
int aLayer,
256 const std::function<
void(
PCB_MARKER* )>& aPathGenerator )
259 violations.push_back( *aItem );
264 if( violations.empty() )
274 std::map<KIID, EDA_ITEM*> itemMap;
275 m_board->FillItemMap( itemMap );
277 for(
const DRC_ITEM& item : violations )
280 BOOST_ERROR( wxString::Format(
"DRC zone regression: %s\n"
281 "%d violations found (expected 0)\n"
284 (
int) violations.size(),
BOOST_CHECK_EQUAL(result, "25.4")