40#include <wx/filename.h>
50 +
"issue24211/issue24211.kicad_pro" );
55 BOOST_REQUIRE_MESSAGE(
project,
"Could not load project" );
62 +
"issue24211/issue24211.kicad_pcb";
85 FOOTPRINT* l1 = board->FindFootprintByReference( wxT(
"L1" ) );
87 BOOST_REQUIRE_MESSAGE( l1,
"Reference L1 not present in test board" );
91 BOOST_REQUIRE_MESSAGE( compClass,
"L1 has no component class after BOARD_LOADER::Load" );
121 std::set<wxString> firedRules;
124 [&](
const std::shared_ptr<DRC_ITEM>& aItem,
const VECTOR2I&,
int,
127 if( aItem->GetViolatingRule() )
128 firedRules.insert( aItem->GetViolatingRule()->m_Name );
135 for(
const wxString& r : firedRules )
138 BOOST_CHECK_MESSAGE( firedRules.count( wxT(
"pcblint_buck_feedback_away_from_switch_node" ) ),
139 "Netclass-based custom rule did not fire" );
142 firedRules.count( wxT(
"pcblint_inductor_sensitive_trace_keepout_no_track" ) ),
143 "Component-class-based custom rule did not fire after BOARD_LOADER::Load" );
General utilities for PCB file IO for QA programs.
Container for design settings for a BOARD object.
std::map< int, SEVERITY > m_DRCSeverities
std::shared_ptr< DRC_ENGINE > m_DRCEngine
static std::unique_ptr< BOARD > Load(const wxString &aFileName, PCB_IO_MGR::PCB_FILE_T aFormat, PROJECT *aProject, const OPTIONS &aOptions)
A lightweight representation of a component class.
bool ContainsClassName(const wxString &className) const
Determines if this (effective) component class contains a specific constituent class.
const wxString & GetName() const
Fetches the full name of this component class.
void RunTests(EDA_UNITS aUnits, bool aReportAllTrackErrors, bool aTestFootprints, BOARD_COMMIT *aCommit=nullptr)
Run the DRC tests.
void SetViolationHandler(DRC_VIOLATION_HANDLER aHandler)
Set an optional DRC violation handler (receives DRC_ITEMs and positions).
@ KICAD_SEXP
S-expression Pcbnew file format.
Container for project specific data.
std::string GetPcbnewTestDataDir()
Utility which returns a path to the data directory where the test board files are stored.
wxString boardPath() const
SETTINGS_MANAGER m_settingsManager
BOOST_FIXTURE_TEST_CASE(DRCIssue24211ComponentClassesAfterLoad, DRC_ISSUE_24211_FIXTURE)
BOOST_REQUIRE(intersection.has_value()==c.ExpectedIntersection.has_value())
BOOST_CHECK_MESSAGE(totalMismatches==0, std::to_string(totalMismatches)+" board(s) with strategy disagreements")
BOOST_TEST_MESSAGE("\n=== Real-World Polygon PIP Benchmark ===\n"<< formatTable(table))
VECTOR2< int32_t > VECTOR2I