66 SCH_SCREEN* screen = m_schematic->RootScreen();
68 path.push_back( &m_schematic->Root() );
73 pin1->SetNumber(
"1" );
93 SCH_SHEET_LIST sheets = m_schematic->BuildSheetListSortedByPageNumbers();
94 BOOST_CHECK_NO_THROW( m_schematic->ConnectionGraph()->Recalculate( sheets,
true ) );
102 SCH_SCREEN* screen = m_schematic->RootScreen();
104 path.push_back( &m_schematic->Root() );
109 pin1->SetNumber(
"1" );
122 SCH_SHEET_LIST sheets = m_schematic->BuildSheetListSortedByPageNumbers();
123 BOOST_CHECK_NO_THROW( m_schematic->ConnectionGraph()->Recalculate( sheets,
true ) );
131 SCH_SCREEN* screen = m_schematic->RootScreen();
133 path.push_back( &m_schematic->Root() );
138 pin1->SetNumber(
"1" );
150 pin3->SetNumber(
"3" );
163 SCH_SHEET_LIST sheets = m_schematic->BuildSheetListSortedByPageNumbers();
164 m_schematic->ConnectionGraph()->Recalculate( sheets,
true );
175 bool connected =
false;
179 if( item == schPin3 )
186 BOOST_CHECK_MESSAGE( connected,
"Pins 1 and 3 should be connected via jumper pin group" );
194 SCH_SCREEN* screen = m_schematic->RootScreen();
196 path.push_back( &m_schematic->Root() );
219 SCH_SHEET_LIST sheets = m_schematic->BuildSheetListSortedByPageNumbers();
220 m_schematic->ConnectionGraph()->Recalculate( sheets,
true );
230 bool connected =
false;
234 if( item == schShield )
241 BOOST_CHECK_MESSAGE( connected,
"Stacked pin [A1,A12] and pin S1 should be connected via jumper pin group" );
249 SCH_SCREEN* screen = m_schematic->RootScreen();
251 path.push_back( &m_schematic->Root() );
263 JUMPER_GROUP::Make( { wxT(
"A1" ), wxT(
"A12" ), wxT(
"B1" ), wxT(
"B12" ) } ).value() );
269 SCH_SHEET_LIST sheets = m_schematic->BuildSheetListSortedByPageNumbers();
270 BOOST_CHECK_NO_THROW( m_schematic->ConnectionGraph()->Recalculate( sheets,
true ) );
277 bool selfLinked =
false;
288 BOOST_CHECK_MESSAGE( !selfLinked,
"A pin must not be connected to itself" );
300 SCH_SHEET_LIST sheets = m_schematic->BuildSheetListSortedByPageNumbers();
304 BOOST_CHECK_NO_THROW( m_schematic->ConnectionGraph()->Recalculate( sheets,
true ) );
void Add(JUMPER_GROUP aGroup)
Add a JUMPER_GROUP to the set.
static std::optional< JUMPER_GROUP > Make(std::set< wxString > aNames)
Factory method to create a JUMPER_GROUP from a set of names.
Define a library symbol object.
const LIB_ID & GetLibId() const override
JUMPER_GROUP_SET & JumperPinGroups()
Each jumper pin group is a set of pin numbers that should be treated as internally connected.
void AddDrawItem(SCH_ITEM *aItem, bool aSort=true)
Add a new draw aItem to the draw object list and sort according to aSort.
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,...
const std::vector< SCH_ITEM * > & ConnectedItems(const SCH_SHEET_PATH &aPath) const
Retrieve the set of items connected to this item on the given sheet.
void SetNumber(const wxString &aNumber)
void SetPosition(const VECTOR2I &aPos) override
void SetType(ELECTRICAL_PINTYPE aType)
void Append(SCH_ITEM *aItem, bool aUpdateLibSymbol=true)
A container for handling SCH_SHEET_PATH objects in a flattened hierarchy.
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
void SetScreen(SCH_SCREEN *aScreen)
Set the SCH_SCREEN associated with this sheet to aScreen.
void UpdatePins()
Updates the cache of SCH_PIN objects for each pin.
SCH_PIN * GetPin(const wxString &number) const
Find a symbol pin by number.
void LoadSchematic(SETTINGS_MANAGER &aSettingsManager, const wxString &aRelPath, std::unique_ptr< SCHEMATIC > &aSchematic)
@ PT_PASSIVE
pin for passive symbols: must be connected, and can be connected to any pin.
std::vector< FAB_LAYER_COLOR > dummy
Test for issue #23058: Jumper pin groups with out-of-bounds pin numbers cause crash.
std::unique_ptr< SCHEMATIC > m_schematic
SETTINGS_MANAGER m_settingsManager
JUMPER_PIN_GROUP_FIXTURE()
BOOST_REQUIRE(intersection.has_value()==c.ExpectedIntersection.has_value())
BOOST_FIXTURE_TEST_CASE(JumperPinGroupOutOfBounds, JUMPER_PIN_GROUP_FIXTURE)
VECTOR2< int32_t > VECTOR2I