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 <lib_symbol.h>
#include <pin_map.h>
#include <sch_pin.h>
#include <sch_symbol.h>
#include <sch_sheet_path.h>
#include <map>
#include <memory>
#include <vector>

Go to the source code of this file.

Classes

struct  MAPPED_UNIT_SWAP_FIXTURE
 

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)
 
 BOOST_FIXTURE_TEST_CASE (MappedPadsAlreadyMatch, MAPPED_UNIT_SWAP_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (MappedPadsDetectRealSwap, MAPPED_UNIT_SWAP_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (IdentityOverrideKeepsOriginalPinNumbers, MAPPED_UNIT_SWAP_FIXTURE)
 
 BOOST_FIXTURE_TEST_CASE (StackedPadsMustAgree, MAPPED_UNIT_SWAP_FIXTURE)
 
 BOOST_AUTO_TEST_CASE (StackedLogicalPinsUseExpandedNumbers)
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/6]

BOOST_AUTO_TEST_CASE ( BackannotateUnitSwapPlanner_DetectsBAS16TWGateRotation )

◆ BOOST_AUTO_TEST_CASE() [2/6]

BOOST_AUTO_TEST_CASE ( BackannotateUnitSwapPlanner_DetectsIdentityMapping )

◆ BOOST_AUTO_TEST_CASE() [3/6]

BOOST_AUTO_TEST_CASE ( BackannotateUnitSwapPlanner_DetectsRN1GateRotationWithSharedCommonPin )

◆ BOOST_AUTO_TEST_CASE() [4/6]

BOOST_AUTO_TEST_CASE ( BackannotateUnitSwapPlanner_DetectsSimpleUnitSwap )

◆ BOOST_AUTO_TEST_CASE() [5/6]

BOOST_AUTO_TEST_CASE ( BackannotateUnitSwapPlanner_DoesNotTreatHybridBAS16TWGateAndPinSwapAsPureUnitRotation )

◆ BOOST_AUTO_TEST_CASE() [6/6]

◆ BOOST_FIXTURE_TEST_CASE() [1/4]

BOOST_FIXTURE_TEST_CASE ( IdentityOverrideKeepsOriginalPinNumbers ,
MAPPED_UNIT_SWAP_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [2/4]

BOOST_FIXTURE_TEST_CASE ( MappedPadsAlreadyMatch ,
MAPPED_UNIT_SWAP_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [3/4]

BOOST_FIXTURE_TEST_CASE ( MappedPadsDetectRealSwap ,
MAPPED_UNIT_SWAP_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [4/4]

◆ check_final_units()

◆ check_plan()

◆ make_candidate()

◆ make_pin_map()

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