21#include <boost/test/unit_test.hpp>
47 SCH_SHEET_LIST sheets = m_schematic->BuildSheetListSortedByPageNumbers();
55 if( sig && sig->GetNets().size() == 4 )
62 BOOST_REQUIRE_MESSAGE( fourCount >= 1,
"Expected initial 4-net signal present" );
64 wxString firstNet = *four->
GetNets().begin();
65 SCH_SCREEN* screen = m_schematic->CurrentSheet().LastScreen();
67 auto effectiveNetNameForPin = [&](
SCH_PIN* aPin ) -> wxString {
70 wxString n = sg->GetNetName();
74 return aPin->GetDefaultNetName( m_schematic->CurrentSheet() );
77 int disabledCount = 0;
81 auto pins = sym->
GetPins( &m_schematic->CurrentSheet() );
82 if( pins.size() != 2 )
85 wxString nameA = effectiveNetNameForPin( pins[0] );
86 wxString nameB = effectiveNetNameForPin( pins[1] );
88 if( ( nameA == firstNet && nameB != firstNet ) || ( nameB == firstNet && nameA != firstNet ) )
95 BOOST_REQUIRE_MESSAGE( disabledCount > 0,
"Test did not find any bridging 2-pin symbol to disable" );
99 bool stillHasFour =
false;
102 if( sig && sig->GetNets().size() == 4 )
Calculate the connectivity of a schematic and generates netlists.
void Recalculate(const SCH_SHEET_LIST &aSheetList, bool aUnconditional=false, std::function< void(SCH_ITEM *)> *aChangedItemHandler=nullptr, PROGRESS_REPORTER *aProgressReporter=nullptr)
Update the connection graph for the given list of sheets.
const std::vector< std::unique_ptr< SCH_NETCHAIN > > & GetPotentialNetChains() const
Potential net chains are inferred groupings produced by RebuildNetChains() but not yet user-committed...
CONNECTION_SUBGRAPH * GetSubgraphForItem(SCH_ITEM *aItem) const
A subgraph is a set of items that are electrically connected on a single sheet.
EE_TYPE OfType(KICAD_T aType) const
Instantiate the current locale within a scope in which you are expecting exceptions to be thrown.
Base class for any item which can be embedded within the SCHEMATIC container class,...
A net chain is a collection of nets that are connected together through passive components.
const std::set< wxString > & GetNets() const
EE_RTREE & Items()
Get the full RTree, usually for iterating.
A container for handling SCH_SHEET_PATH objects in a flattened hierarchy.
std::vector< const SCH_PIN * > GetPins(const SCH_SHEET_PATH *aSheet) const
Retrieve a list of the SCH_PINs for the given sheet path.
void SetPassthrough(bool aEnable)
void LoadSchematic(SETTINGS_MANAGER &aSettingsManager, const wxString &aRelPath, std::unique_ptr< SCHEMATIC > &aSchematic)
std::vector< FAB_LAYER_COLOR > dummy
SETTINGS_MANAGER m_settingsManager
SIGNALS_REMOVE_TEST_FIXTURE()
std::unique_ptr< SCHEMATIC > m_schematic
BOOST_FIXTURE_TEST_CASE(RemoveFromSignal_DisablesPropagationAndSplitsGroup, SIGNALS_REMOVE_TEST_FIXTURE)
BOOST_CHECK_MESSAGE(totalMismatches==0, std::to_string(totalMismatches)+" board(s) with strategy disagreements")