KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_drc_courtyard_invalid.cpp File Reference

Go to the source code of this file.

Classes

struct  COURTYARD_TEST_FIXTURE
 
struct  COURTYARD_INVALID_TEST_FP
 
struct  COURTYARD_INVALID_INFO
 
struct  COURTYARD_INVALID_CASE
 

Functions

std::ostream & operator<< (std::ostream &os, const COURTYARD_INVALID_INFO &aInvalid)
 
std::unique_ptr< FOOTPRINTMakeInvalidCourtyardTestFP (BOARD &aBoard, const COURTYARD_INVALID_TEST_FP &aFPDef)
 Construct a FOOTPRINT to use in a courtyard test from a COURTYARD_TEST_FP definition.
 
std::unique_ptr< BOARDMakeBoard (const std::vector< COURTYARD_INVALID_TEST_FP > &aTestFPDefs)
 
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, const KI_TEST::BOARD_DUMPER &aDumper)
 
 BOOST_AUTO_TEST_CASE (InvalidCases)
 

Variables

static const std::vector< COURTYARD_INVALID_CASEcourtyard_invalid_cases
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE()

BOOST_AUTO_TEST_CASE ( InvalidCases  )

◆ CheckInvalidsMatchExpected()

static void CheckInvalidsMatchExpected ( BOARD aBoard,
const std::vector< std::unique_ptr< PCB_MARKER > > &  aMarkers,
const std::vector< COURTYARD_INVALID_INFO > &  aExpInvalids 
)
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.

Parameters
aMarkerslist of markers produced by the DRC
aCollisionslist of expected collisions

Definition at line 269 of file test_drc_courtyard_invalid.cpp.

References KI_TEST::CheckUnorderedMatches(), and InvalidMatchesExpected().

Referenced by DoCourtyardInvalidTest().

◆ DoCourtyardInvalidTest()

◆ InvalidMatchesExpected()

static bool InvalidMatchesExpected ( BOARD aBoard,
const PCB_MARKER aMarker,
const COURTYARD_INVALID_INFO aInvalid 
)
static

◆ MakeBoard()

std::unique_ptr< BOARD > MakeBoard ( const std::vector< COURTYARD_INVALID_TEST_FP > &  aTestFPDefs)

Definition at line 215 of file test_drc_courtyard_invalid.cpp.

References MakeInvalidCourtyardTestFP().

Referenced by DoCourtyardInvalidTest().

◆ MakeInvalidCourtyardTestFP()

std::unique_ptr< FOOTPRINT > MakeInvalidCourtyardTestFP ( BOARD aBoard,
const COURTYARD_INVALID_TEST_FP aFPDef 
)

◆ operator<<()

std::ostream & operator<< ( std::ostream &  os,
const COURTYARD_INVALID_INFO aInvalid 
)

Variable Documentation

◆ courtyard_invalid_cases

const std::vector<COURTYARD_INVALID_CASE> courtyard_invalid_cases
static

Definition at line 83 of file test_drc_courtyard_invalid.cpp.

Referenced by BOOST_AUTO_TEST_CASE().