KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_backannotate_unit_swap.cpp File Reference
#include <qa_utils/wx_utils/unit_test_utils.h>
#include <tools/backannotate.h>
#include <map>
#include <vector>

Go to the source code of this file.

Functions

static BACKANNOTATE_UNIT_SWAP_CANDIDATE make_candidate (const char *aRef, int aUnit, const std::vector< const char * > &aPins, const std::initializer_list< std::pair< const char *, const char * > > &aNets)
 
static std::map< wxString, wxString > make_pin_map (const std::initializer_list< std::pair< const char *, const char * > > &aNets)
 
static void check_plan (const BACKANNOTATE_UNIT_SWAP_PLAN &aPlan, bool aMappingOk, bool aIdentity, std::initializer_list< size_t > aExpectedSwappedCandidateIndices)
 
static void check_final_units (const std::vector< BACKANNOTATE_UNIT_SWAP_CANDIDATE > &aCandidates, const BACKANNOTATE_UNIT_SWAP_PLAN &aPlan, std::initializer_list< int > aExpectedUnits)
 
 BOOST_AUTO_TEST_CASE (BackannotateUnitSwapPlanner_DetectsIdentityMapping)
 
 BOOST_AUTO_TEST_CASE (BackannotateUnitSwapPlanner_DetectsSimpleUnitSwap)
 
 BOOST_AUTO_TEST_CASE (BackannotateUnitSwapPlanner_DetectsBAS16TWGateRotation)
 
 BOOST_AUTO_TEST_CASE (BackannotateUnitSwapPlanner_DetectsRN1GateRotationWithSharedCommonPin)
 
 BOOST_AUTO_TEST_CASE (BackannotateUnitSwapPlanner_DoesNotTreatHybridBAS16TWGateAndPinSwapAsPureUnitRotation)
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/5]

BOOST_AUTO_TEST_CASE ( BackannotateUnitSwapPlanner_DetectsBAS16TWGateRotation )

◆ BOOST_AUTO_TEST_CASE() [2/5]

BOOST_AUTO_TEST_CASE ( BackannotateUnitSwapPlanner_DetectsIdentityMapping )

◆ BOOST_AUTO_TEST_CASE() [3/5]

BOOST_AUTO_TEST_CASE ( BackannotateUnitSwapPlanner_DetectsRN1GateRotationWithSharedCommonPin )

◆ BOOST_AUTO_TEST_CASE() [4/5]

BOOST_AUTO_TEST_CASE ( BackannotateUnitSwapPlanner_DetectsSimpleUnitSwap )

◆ BOOST_AUTO_TEST_CASE() [5/5]

BOOST_AUTO_TEST_CASE ( BackannotateUnitSwapPlanner_DoesNotTreatHybridBAS16TWGateAndPinSwapAsPureUnitRotation )

◆ check_final_units()

static void check_final_units ( const std::vector< BACKANNOTATE_UNIT_SWAP_CANDIDATE > & aCandidates,
const BACKANNOTATE_UNIT_SWAP_PLAN & aPlan,
std::initializer_list< int > aExpectedUnits )
static

◆ check_plan()

static void check_plan ( const BACKANNOTATE_UNIT_SWAP_PLAN & aPlan,
bool aMappingOk,
bool aIdentity,
std::initializer_list< size_t > aExpectedSwappedCandidateIndices )
static

◆ make_candidate()

static BACKANNOTATE_UNIT_SWAP_CANDIDATE make_candidate ( const char * aRef,
int aUnit,
const std::vector< const char * > & aPins,
const std::initializer_list< std::pair< const char *, const char * > > & aNets )
static

◆ make_pin_map()

static std::map< wxString, wxString > make_pin_map ( const std::initializer_list< std::pair< const char *, const char * > > & aNets)
static