|
KiCad PCB EDA Suite
|
#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) | |
| BOOST_AUTO_TEST_CASE | ( | BackannotateUnitSwapPlanner_DetectsBAS16TWGateRotation | ) |
Definition at line 202 of file test_backannotate_unit_swap.cpp.
References candidates(), check_final_units(), check_plan(), make_candidate(), make_pin_map(), plan(), and PlanBackannotateUnitSwaps().
| BOOST_AUTO_TEST_CASE | ( | BackannotateUnitSwapPlanner_DetectsIdentityMapping | ) |
Definition at line 162 of file test_backannotate_unit_swap.cpp.
References BOOST_AUTO_TEST_CASE(), candidates(), check_final_units(), check_plan(), make_candidate(), make_pin_map(), plan(), and PlanBackannotateUnitSwaps().
| BOOST_AUTO_TEST_CASE | ( | BackannotateUnitSwapPlanner_DetectsRN1GateRotationWithSharedCommonPin | ) |
Definition at line 220 of file test_backannotate_unit_swap.cpp.
References candidates(), check_final_units(), check_plan(), make_candidate(), make_pin_map(), plan(), and PlanBackannotateUnitSwaps().
| BOOST_AUTO_TEST_CASE | ( | BackannotateUnitSwapPlanner_DetectsSimpleUnitSwap | ) |
Definition at line 182 of file test_backannotate_unit_swap.cpp.
References candidates(), check_final_units(), check_plan(), make_candidate(), make_pin_map(), plan(), and PlanBackannotateUnitSwaps().
| BOOST_AUTO_TEST_CASE | ( | BackannotateUnitSwapPlanner_DoesNotTreatHybridBAS16TWGateAndPinSwapAsPureUnitRotation | ) |
Definition at line 238 of file test_backannotate_unit_swap.cpp.
References candidates(), make_candidate(), make_pin_map(), plan(), and PlanBackannotateUnitSwaps().
| BOOST_AUTO_TEST_CASE | ( | StackedLogicalPinsUseExpandedNumbers | ) |
Definition at line 330 of file test_backannotate_unit_swap.cpp.
References LIB_SYMBOL::AddDrawItem(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), CollectBackannotatePcbNets(), LIB_SYMBOL::GetLibId(), PIN_MAP_INSTANCE_OVERRIDE::m_Edits, make_pin_map(), pin, PT_PASSIVE, and SCH_SYMBOL::SetPinMapOverride().
| BOOST_FIXTURE_TEST_CASE | ( | IdentityOverrideKeepsOriginalPinNumbers | , |
| MAPPED_UNIT_SWAP_FIXTURE | ) |
Definition at line 293 of file test_backannotate_unit_swap.cpp.
References check_final_units(), check_plan(), FORCE_IDENTITY, PIN_MAP_INSTANCE_OVERRIDE::m_Mode, make_pin_map(), and plan().
| BOOST_FIXTURE_TEST_CASE | ( | MappedPadsAlreadyMatch | , |
| MAPPED_UNIT_SWAP_FIXTURE | ) |
Definition at line 271 of file test_backannotate_unit_swap.cpp.
References check_final_units(), check_plan(), make_pin_map(), and plan().
| BOOST_FIXTURE_TEST_CASE | ( | MappedPadsDetectRealSwap | , |
| MAPPED_UNIT_SWAP_FIXTURE | ) |
Definition at line 283 of file test_backannotate_unit_swap.cpp.
References check_final_units(), check_plan(), make_pin_map(), and plan().
| BOOST_FIXTURE_TEST_CASE | ( | StackedPadsMustAgree | , |
| MAPPED_UNIT_SWAP_FIXTURE | ) |
Definition at line 307 of file test_backannotate_unit_swap.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), CollectBackannotatePcbNets(), PIN_MAP_INSTANCE_OVERRIDE::m_Edits, and make_pin_map().
|
static |
Definition at line 83 of file test_backannotate_unit_swap.cpp.
References BOOST_CHECK_EQUAL(), BACKANNOTATE_UNIT_SWAP_STEP::m_firstIndex, BACKANNOTATE_UNIT_SWAP_STEP::m_secondIndex, and BACKANNOTATE_UNIT_SWAP_PLAN::m_steps.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), and BOOST_FIXTURE_TEST_CASE().
|
static |
Definition at line 68 of file test_backannotate_unit_swap.cpp.
References BOOST_CHECK_EQUAL(), BACKANNOTATE_UNIT_SWAP_PLAN::m_identity, BACKANNOTATE_UNIT_SWAP_PLAN::m_mappingOk, and BACKANNOTATE_UNIT_SWAP_PLAN::m_swappedCandidateIndices.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), and BOOST_FIXTURE_TEST_CASE().
|
static |
Definition at line 35 of file test_backannotate_unit_swap.cpp.
References BACKANNOTATE_UNIT_SWAP_CANDIDATE::m_currentUnit, BACKANNOTATE_UNIT_SWAP_CANDIDATE::m_ref, BACKANNOTATE_UNIT_SWAP_CANDIDATE::m_schNetsByPin, BACKANNOTATE_UNIT_SWAP_CANDIDATE::m_unitPinNumbers, and pin.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and MAPPED_UNIT_SWAP_FIXTURE::MAPPED_UNIT_SWAP_FIXTURE().
|
static |
Definition at line 53 of file test_backannotate_unit_swap.cpp.
References pin.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), and BOOST_FIXTURE_TEST_CASE().