45 os <<
"COURTYARD_INVALID_INFO[ " << aInvalid.
m_refdes;
67 "single_footprint_no_courtyard",
76 "single_footprint_unclosed_courtyard",
85 "single_footprint_disjoint_courtyard",
94 "two_footprints_one_malformed",
118 BOOST_WARN_MESSAGE(
false,
"Expected no auxiliary item for invalid courtyard DRC." );
122 if( item_a ==
nullptr )
124 BOOST_ERROR(
"Could not get board DRC item." );
146 const std::vector<std::unique_ptr<PCB_MARKER>>& aMarkers,
147 const std::vector<COURTYARD_INVALID_INFO>& aExpInvalids )
151 const std::unique_ptr<PCB_MARKER>& aMarker )
177 std::vector<std::unique_ptr<PCB_MARKER>> markers;
179 DRC_ENGINE drcEngine( board.get(), &board->GetDesignSettings() );
184 [&](
const std::shared_ptr<DRC_ITEM>& aItem,
const VECTOR2I& aPos,
int aLayer,
185 const std::function<
void(
PCB_MARKER* )>& aPathGenerator )
191 markers.push_back( std::make_unique<PCB_MARKER>( aItem, aPos ) );
General utilities for PCB file IO for QA programs.
Container for design settings for a BOARD object.
std::map< int, SEVERITY > m_DRCSeverities
Information pertinent to a Pcbnew printed circuit board.
BOARD_ITEM * ResolveItem(const KIID &aID, bool aAllowNullptrReturn=false) const
Design Rule Checker object that performs all the DRC tests.
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).
void InitEngine(const wxFileName &aRulePath)
Initialize the DRC engine.
std::shared_ptr< RC_ITEM > GetRCItem() const
@ DRCE_OVERLAPPING_FOOTPRINTS
@ DRCE_MALFORMED_COURTYARD
std::string GetPcbnewTestDataDir()
Utility which returns a path to the data directory where the test board files are stored.
void CheckUnorderedMatches(const EXP_CONT &aExpected, const FOUND_CONT &aFound, MATCH_PRED aMatchPredicate)
Check that a container of "found" objects matches a container of "expected" objects.
std::unique_ptr< BOARD > ReadBoardFromFileOrStream(const std::string &aFilename, std::istream &aFallback)
Read a board from a file, or another stream, as appropriate.
std::vector< COURTYARD_INVALID_INFO > m_exp_errors
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
static const std::vector< COURTYARD_INVALID_CASE > courtyard_invalid_cases
static bool InvalidMatchesExpected(BOARD &aBoard, const PCB_MARKER &aMarker, const COURTYARD_INVALID_INFO &aInvalid)
Check if a PCB_MARKER is described by a particular COURTYARD_INVALID_INFO object.
std::ostream & operator<<(std::ostream &os, const COURTYARD_INVALID_INFO &aInvalid)
static void CheckInvalidsMatchExpected(BOARD &aBoard, const std::vector< std::unique_ptr< PCB_MARKER > > &aMarkers, const std::vector< COURTYARD_INVALID_INFO > &aExpInvalids)
Check that the produced markers match the expected.
void DoCourtyardInvalidTest(const COURTYARD_INVALID_CASE &aCase)
BOOST_AUTO_TEST_CASE(InvalidCases)
BOOST_REQUIRE(intersection.has_value()==c.ExpectedIntersection.has_value())
BOOST_AUTO_TEST_SUITE_END()
IbisParser parser & reporter
BOOST_TEST_CONTEXT("Test Clearance")
Functions to provide common constants and other functions to assist in making a consistent UI.
VECTOR2< int32_t > VECTOR2I