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, 80 },
73 {
"issue10916",
false,
false,
true,
false,
false,
false, 0 }
80 m_board->GetConnectivity()->RecalculateRatsnest();
81 m_board->UpdateRatsnestExclusions();
84 toolMgr.
SetEnvironment( m_board.get(),
nullptr,
nullptr,
nullptr,
nullptr );
91 std::vector< std::shared_ptr<CLEANUP_ITEM> > dryRunItems;
92 std::vector< std::shared_ptr<CLEANUP_ITEM> > realRunItems;
94 cleaner.
CleanupBoard(
true, &dryRunItems, entry.m_Shorts,
95 entry.m_RedundantVias,
96 entry.m_RedundantTracks,
97 entry.m_DanglingTracks,
99 entry.m_DanglingVias );
101 cleaner.
CleanupBoard(
true, &realRunItems, entry.m_Shorts,
102 entry.m_RedundantVias,
103 entry.m_RedundantTracks,
104 entry.m_DanglingTracks,
105 entry.m_TracksInPads,
106 entry.m_DanglingVias );
108 if( dryRunItems.size() == entry.m_Expected && realRunItems.size() == entry.m_Expected )
110 BOOST_CHECK_EQUAL( 1, 1 );
111 BOOST_TEST_MESSAGE( wxString::Format(
"Track cleaner regression: %s, passed",
116 BOOST_CHECK_EQUAL( dryRunItems.size(), entry.m_Expected );
117 BOOST_CHECK_EQUAL( realRunItems.size(), entry.m_Expected );
121 std::map<KIID, EDA_ITEM*> itemMap;
122 m_board->FillItemMap( itemMap );
124 for(
const std::shared_ptr<CLEANUP_ITEM>& item : realRunItems )
130 BOOST_ERROR( wxString::Format(
"Track cleaner regression: %s, failed",
143 std::vector<wxString> tests = {
148 for(
const wxString& relPath : tests )
152 m_board->GetConnectivity()->RecalculateRatsnest();
153 m_board->UpdateRatsnestExclusions();
156 toolMgr.
SetEnvironment( m_board.get(),
nullptr,
nullptr,
nullptr,
nullptr );
163 std::vector< std::shared_ptr<CLEANUP_ITEM> > dryRunItems;
164 std::vector< std::shared_ptr<CLEANUP_ITEM> > realRunItems;
180 BOOST_CHECK_EQUAL( dryRunItems.size(), realRunItems.size() );
182 std::vector<DRC_ITEM> violations;
195 [&](
const std::shared_ptr<DRC_ITEM>& aItem,
VECTOR2I aPos,
int aLayer )
198 violations.push_back( *aItem );
203 if( violations.empty() )
205 BOOST_TEST_MESSAGE( wxString::Format(
"Track cleaner regression: %s, passed",
212 std::map<KIID, EDA_ITEM*> itemMap;
213 m_board->FillItemMap( itemMap );
215 for(
const DRC_ITEM& item : violations )
221 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.
@ 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)