65 std::vector<TEST_DESCRIPTION> tests =
69 {
"issue2904",
false,
false,
false,
true,
false,
false, 9 },
70 {
"issue5093",
false,
false,
false,
false,
true,
false, 117 },
71 {
"issue7004",
false,
true,
false,
false,
false,
true, 25 },
72 {
"issue8883",
true,
true,
true,
true,
false,
true, 81 },
73 {
"issue10916",
false,
false,
true,
false,
false,
false, 0 },
74 {
"issue19574",
false,
false,
true,
false,
false,
false, 2 }
81 m_board->GetConnectivity()->RecalculateRatsnest();
82 m_board->UpdateRatsnestExclusions();
85 toolMgr.
SetEnvironment( m_board.get(),
nullptr,
nullptr,
nullptr,
nullptr );
92 std::vector< std::shared_ptr<CLEANUP_ITEM> > dryRunItems;
93 std::vector< std::shared_ptr<CLEANUP_ITEM> > realRunItems;
95 cleaner.
CleanupBoard(
true, &dryRunItems, entry.m_Shorts,
96 entry.m_RedundantVias,
97 entry.m_RedundantTracks,
98 entry.m_DanglingTracks,
100 entry.m_DanglingVias );
102 cleaner.
CleanupBoard(
true, &realRunItems, entry.m_Shorts,
103 entry.m_RedundantVias,
104 entry.m_RedundantTracks,
105 entry.m_DanglingTracks,
106 entry.m_TracksInPads,
107 entry.m_DanglingVias );
109 if( dryRunItems.size() == entry.m_Expected && realRunItems.size() == entry.m_Expected )
111 BOOST_CHECK_EQUAL( 1, 1 );
112 BOOST_TEST_MESSAGE( wxString::Format(
"Track cleaner regression: %s, passed",
117 BOOST_CHECK_EQUAL( dryRunItems.size(), entry.m_Expected );
118 BOOST_CHECK_EQUAL( realRunItems.size(), entry.m_Expected );
122 std::map<KIID, EDA_ITEM*> itemMap;
123 m_board->FillItemMap( itemMap );
125 for(
const std::shared_ptr<CLEANUP_ITEM>& item : realRunItems )
131 BOOST_ERROR( wxString::Format(
"Track cleaner regression: %s, failed",
144 std::vector<wxString> tests = {
149 for(
const wxString& relPath : tests )
153 m_board->GetConnectivity()->RecalculateRatsnest();
154 m_board->UpdateRatsnestExclusions();
157 toolMgr.
SetEnvironment( m_board.get(),
nullptr,
nullptr,
nullptr,
nullptr );
164 std::vector< std::shared_ptr<CLEANUP_ITEM> > dryRunItems;
165 std::vector< std::shared_ptr<CLEANUP_ITEM> > realRunItems;
181 BOOST_CHECK_EQUAL( dryRunItems.size(), realRunItems.size() );
183 std::vector<DRC_ITEM> violations;
196 [&](
const std::shared_ptr<DRC_ITEM>& aItem,
VECTOR2I aPos,
int aLayer,
200 violations.push_back( *aItem );
205 if( violations.empty() )
207 BOOST_TEST_MESSAGE( wxString::Format(
"Track cleaner regression: %s, passed",
214 std::map<KIID, EDA_ITEM*> itemMap;
215 m_board->FillItemMap( itemMap );
217 for(
const DRC_ITEM& item : violations )
223 BOOST_ERROR( wxString::Format(
"Track cleaner regression: %s, failed",
constexpr EDA_IU_SCALE pcbIUScale
Container for design settings for a BOARD object.
std::map< int, SEVERITY > m_DRCSeverities
std::shared_ptr< DRC_ENGINE > m_DRCEngine
void CleanupBoard(bool aDryRun, std::vector< std::shared_ptr< CLEANUP_ITEM > > *aItemsList, bool aCleanVias, bool aRemoveMisConnected, bool aMergeSegments, bool aDeleteUnconnected, bool aDeleteTracksinPad, bool aDeleteDanglingVias, REPORTER *aReporter=nullptr)
the cleanup function.
std::function< void(PCB_MARKER *aMarker)> DRC_CUSTOM_MARKER_HANDLER
@ DRCE_LIB_FOOTPRINT_ISSUES
@ DRCE_LIB_FOOTPRINT_MISMATCH
void LoadBoard(SETTINGS_MANAGER &aSettingsManager, const wxString &aRelPath, std::unique_ptr< BOARD > &aBoard)
void FillZones(BOARD *m_board)
SETTINGS_MANAGER m_settingsManager
TRACK_CLEANER_TEST_FIXTURE()
std::unique_ptr< BOARD > m_board
BOOST_FIXTURE_TEST_CASE(FailedToCleanRegressionTests, TRACK_CLEANER_TEST_FIXTURE)