|
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_item.h>#include <drc/drc_engine.h>#include <widgets/ui_common.h>#include "drc_test_utils.h"Go to the source code of this file.
Classes | |
| struct | COURTYARD_COLLISION |
| struct | COURTYARD_OVERLAP_TEST_CASE |
| A complete courtyard overlap test case: the board fixture to load and the expected collisions. More... | |
Functions | |
| std::ostream & | operator<< (std::ostream &os, const COURTYARD_COLLISION &aColl) |
| static bool | CollisionMatchesExpected (BOARD &aBoard, const PCB_MARKER &aMarker, const COURTYARD_COLLISION &aCollision) |
| Check if a PCB_MARKER is described by a particular COURTYARD_COLLISION object. | |
| static void | CheckCollisionsMatchExpected (BOARD &aBoard, const std::vector< std::unique_ptr< PCB_MARKER > > &aMarkers, const std::vector< COURTYARD_COLLISION > &aExpCollisions) |
| Check that the produced markers match the expected. | |
| static void | DoCourtyardOverlapTest (const COURTYARD_OVERLAP_TEST_CASE &aCase) |
| Run a single courtyard overlap testcase. | |
| BOOST_AUTO_TEST_CASE (OverlapCases) | |
Variables | |
| static std::vector< COURTYARD_OVERLAP_TEST_CASE > | courtyard_cases |
| BOOST_AUTO_TEST_CASE | ( | OverlapCases | ) |
Definition at line 209 of file test_drc_courtyard_overlap.cpp.
References BOOST_TEST_CONTEXT(), courtyard_cases, and DoCourtyardOverlapTest().
|
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 146 of file test_drc_courtyard_overlap.cpp.
References BOOST_CHECK_PREDICATE(), KI_TEST::CheckUnorderedMatches(), CollisionMatchesExpected(), DRCE_OVERLAPPING_FOOTPRINTS, and KI_TEST::IsDrcMarkerOfType().
Referenced by DoCourtyardOverlapTest().
|
static |
Check if a PCB_MARKER is described by a particular COURTYARD_COLLISION object.
Definition at line 116 of file test_drc_courtyard_overlap.cpp.
References MARKER_BASE::GetRCItem(), FOOTPRINT::GetReference(), COURTYARD_COLLISION::m_refdes_a, COURTYARD_COLLISION::m_refdes_b, reporter, and BOARD::ResolveItem().
Referenced by CheckCollisionsMatchExpected().
|
static |
Run a single courtyard overlap testcase.
| aCase | The testcase to run. |
Definition at line 168 of file test_drc_courtyard_overlap.cpp.
References BOOST_REQUIRE(), CheckCollisionsMatchExpected(), DRCE_MALFORMED_COURTYARD, DRCE_MISSING_COURTYARD, DRCE_OVERLAPPING_FOOTPRINTS, KI_TEST::GetPcbnewTestDataDir(), DRC_ENGINE::InitEngine(), COURTYARD_OVERLAP_TEST_CASE::m_board_name, COURTYARD_OVERLAP_TEST_CASE::m_collisions, BOARD_DESIGN_SETTINGS::m_DRCSeverities, MM, path, KI_TEST::ReadBoardFromFileOrStream(), RPT_SEVERITY_ERROR, RPT_SEVERITY_IGNORE, DRC_ENGINE::RunTests(), and DRC_ENGINE::SetViolationHandler().
Referenced by BOOST_AUTO_TEST_CASE().
| std::ostream & operator<< | ( | std::ostream & | os, |
| const COURTYARD_COLLISION & | aColl ) |
Definition at line 45 of file test_drc_courtyard_overlap.cpp.
References COURTYARD_COLLISION::m_refdes_a, and COURTYARD_COLLISION::m_refdes_b.
|
static |
Definition at line 66 of file test_drc_courtyard_overlap.cpp.
Referenced by BOOST_AUTO_TEST_CASE().