51 std::vector<wxString> tests =
67 "issue17967/issue17967",
69 "unconnected-netnames/unconnected-netnames",
73 for(
const wxString& relPath : tests )
78 std::vector<DRC_ITEM> violations;
92 [&](
const std::shared_ptr<DRC_ITEM>& aItem,
const VECTOR2I& aPos,
int aLayer,
93 const std::function<
void(
PCB_MARKER* )>& aPathGenerator )
96 violations.push_back( *aItem );
101 if( violations.empty() )
111 std::map<KIID, EDA_ITEM*> itemMap;
112 m_board->FillItemMap( itemMap );
114 for(
const DRC_ITEM& item : violations )
117 BOOST_ERROR( wxString::Format(
"DRC regression: %s\n"
118 "%d violations found (expected 0)\n"
121 (
int) violations.size(),
132 std::map<int, SEVERITY> issue19325_ignore, issue22102_ignore;
139 {
"issue1358", 2, {} },
140 {
"issue2512", 5, {} },
141 {
"issue2528", 1, {} },
142 {
"issue5750", 4, {} },
143 {
"issue5854", 3, {} },
144 {
"issue6879", 6, {} },
145 {
"issue6945", 2, {} },
146 {
"issue7241", 1, {} },
147 {
"issue7267", 5, {} },
148 {
"issue7325", 2, {} },
149 {
"issue8003", 2, {} },
150 {
"issue9081", 2, {} },
151 {
"issue12109", 8, {} },
152 {
"issue14334", 2, {} },
153 {
"issue16566", 6, {} },
154 {
"issue18142", 1, {} },
155 {
"reverse_via", 3, {} },
156 {
"intersectingzones", 1, {} },
157 {
"fill_bad", 1, {} },
158 {
"issue18878", 9, {} },
159 {
"issue19325/issue19325", 4, issue19325_ignore },
160 {
"issue22102", 2, issue22102_ignore },
163 for(
const auto& [testName, expectedErrors, customSeverities] : tests )
168 std::vector<PCB_MARKER> markers;
169 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(),
BOOST_CHECK_EQUAL(result, "25.4")