|
KiCad PCB EDA Suite
|
#include <boost/test/unit_test.hpp>#include <connection_graph.h>#include <sch_netchain.h>#include <qa_utils/wx_utils/unit_test_utils.h>#include <map>#include <memory>#include <utility>#include <vector>Go to the source code of this file.
Typedefs | |
| using | REF_PIN_KEY = std::pair<wxString, wxString> |
| Regression for [H-5]. | |
| using | REF_PIN_TO_NET = std::map<REF_PIN_KEY, wxString> |
| using | TERM_PAIR = std::pair<REF_PIN_KEY, REF_PIN_KEY> |
Functions | |
| SCH_NETCHAIN * | boost_test_resolve_potential_chain_by_terminals (const std::pair< std::pair< wxString, wxString >, std::pair< wxString, wxString > > &aTerms, const std::map< std::pair< wxString, wxString >, wxString > &aRefPinToNet, const std::vector< std::unique_ptr< SCH_NETCHAIN > > &aPotentials, const wxString &aChainName) |
| static std::unique_ptr< SCH_NETCHAIN > | makePotential (const wxString &aName, std::initializer_list< wxString > aNets) |
| BOOST_AUTO_TEST_CASE (PicksChainContainingBothTerminalNets) | |
| BOOST_AUTO_TEST_CASE (ReturnsNullWhenNoPotentialSpansBothEndpoints) | |
| BOOST_AUTO_TEST_CASE (ReturnsNullWhenEitherTerminalUnresolvable) | |
| BOOST_AUTO_TEST_CASE (SwappedTerminalOrderStillResolves) | |
| BOOST_AUTO_TEST_CASE (ResolvesWhenOneEndpointIsUnnamedSyntheticName) | |
| using REF_PIN_KEY = std::pair<wxString, wxString> |
Regression for [H-5].
The chain restore path used to resolve only the saved 'from' terminal and pick the first potential chain whose net set contained that single net. When two potential chains shared a 'from' net but diverged at the 'to' end, the wrong chain was promoted on reload. The fix resolves both endpoints and requires the candidate to span BOTH endpoint nets.
Definition at line 63 of file test_net_chain_resolve_terminals.cpp.
| using REF_PIN_TO_NET = std::map<REF_PIN_KEY, wxString> |
Definition at line 64 of file test_net_chain_resolve_terminals.cpp.
| using TERM_PAIR = std::pair<REF_PIN_KEY, REF_PIN_KEY> |
Definition at line 65 of file test_net_chain_resolve_terminals.cpp.
| BOOST_AUTO_TEST_CASE | ( | PicksChainContainingBothTerminalNets | ) |
Definition at line 81 of file test_net_chain_resolve_terminals.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), boost_test_resolve_potential_chain_by_terminals(), SCH_NETCHAIN::GetName(), and makePotential().
| BOOST_AUTO_TEST_CASE | ( | ResolvesWhenOneEndpointIsUnnamedSyntheticName | ) |
Definition at line 179 of file test_net_chain_resolve_terminals.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), boost_test_resolve_potential_chain_by_terminals(), SCH_NETCHAIN::GetName(), and makePotential().
| BOOST_AUTO_TEST_CASE | ( | ReturnsNullWhenEitherTerminalUnresolvable | ) |
Definition at line 132 of file test_net_chain_resolve_terminals.cpp.
References boost_test_resolve_potential_chain_by_terminals(), and makePotential().
| BOOST_AUTO_TEST_CASE | ( | ReturnsNullWhenNoPotentialSpansBothEndpoints | ) |
Definition at line 109 of file test_net_chain_resolve_terminals.cpp.
References boost_test_resolve_potential_chain_by_terminals(), and makePotential().
| BOOST_AUTO_TEST_CASE | ( | SwappedTerminalOrderStillResolves | ) |
Definition at line 152 of file test_net_chain_resolve_terminals.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), boost_test_resolve_potential_chain_by_terminals(), SCH_NETCHAIN::GetName(), and makePotential().
| SCH_NETCHAIN * boost_test_resolve_potential_chain_by_terminals | ( | const std::pair< std::pair< wxString, wxString >, std::pair< wxString, wxString > > & | aTerms, |
| const std::map< std::pair< wxString, wxString >, wxString > & | aRefPinToNet, | ||
| const std::vector< std::unique_ptr< SCH_NETCHAIN > > & | aPotentials, | ||
| const wxString & | aChainName ) |
Definition at line 36 of file test_net_chain_resolve_terminals.cpp.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
static |
Definition at line 68 of file test_net_chain_resolve_terminals.cpp.
References makePotential().
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and makePotential().