|
KiCad PCB EDA Suite
|
#include <qa_utils/wx_utils/unit_test_utils.h>#include <pcbnew_utils/board_file_utils.h>#include <board.h>#include <board_design_settings.h>#include <footprint.h>#include <pcb_marker.h>#include <drc/drc_engine.h>#include <drc/drc_item.h>#include <widgets/ui_common.h>Go to the source code of this file.
Classes | |
| struct | COURTYARD_INVALID_INFO |
| struct | COURTYARD_INVALID_CASE |
Functions | |
| std::ostream & | operator<< (std::ostream &os, const COURTYARD_INVALID_INFO &aInvalid) |
| 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. | |
| 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) | |
Variables | |
| static const std::vector< COURTYARD_INVALID_CASE > | courtyard_invalid_cases |
| BOOST_AUTO_TEST_CASE | ( | InvalidCases | ) |
Definition at line 201 of file test_drc_courtyard_invalid.cpp.
References BOOST_TEST_CONTEXT(), courtyard_invalid_cases, and DoCourtyardInvalidTest().
|
static |
Check that the produced markers match the expected.
This does NOT check ordering, as that is not part of the contract of the DRC function.
| aMarkers | list of markers produced by the DRC |
| aCollisions | list of expected collisions |
Definition at line 145 of file test_drc_courtyard_invalid.cpp.
References KI_TEST::CheckUnorderedMatches(), and InvalidMatchesExpected().
Referenced by DoCourtyardInvalidTest().
| void DoCourtyardInvalidTest | ( | const COURTYARD_INVALID_CASE & | aCase | ) |
Definition at line 158 of file test_drc_courtyard_invalid.cpp.
References BOOST_REQUIRE(), CheckInvalidsMatchExpected(), DRCE_MALFORMED_COURTYARD, DRCE_MISSING_COURTYARD, DRCE_OVERLAPPING_FOOTPRINTS, KI_TEST::GetPcbnewTestDataDir(), DRC_ENGINE::InitEngine(), COURTYARD_INVALID_CASE::m_board_name, BOARD_DESIGN_SETTINGS::m_DRCSeverities, COURTYARD_INVALID_CASE::m_exp_errors, MM, path, KI_TEST::ReadBoardFromFileOrStream(), RPT_SEVERITY_ERROR, DRC_ENGINE::RunTests(), and DRC_ENGINE::SetViolationHandler().
Referenced by BOOST_AUTO_TEST_CASE().
|
static |
Check if a PCB_MARKER is described by a particular COURTYARD_INVALID_INFO object.
Definition at line 109 of file test_drc_courtyard_invalid.cpp.
References MARKER_BASE::GetRCItem(), FOOTPRINT::GetReference(), COURTYARD_INVALID_INFO::m_drc_error_code, COURTYARD_INVALID_INFO::m_refdes, niluuid, reporter, and BOARD::ResolveItem().
Referenced by CheckInvalidsMatchExpected().
| std::ostream & operator<< | ( | std::ostream & | os, |
| const COURTYARD_INVALID_INFO & | aInvalid ) |
Definition at line 43 of file test_drc_courtyard_invalid.cpp.
References COURTYARD_INVALID_INFO::m_drc_error_code, and COURTYARD_INVALID_INFO::m_refdes.
|
static |
Definition at line 59 of file test_drc_courtyard_invalid.cpp.
Referenced by BOOST_AUTO_TEST_CASE().