KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_issue22694_global_hier_label.cpp File Reference

Go to the source code of this file.

Classes

struct  ISSUE_22694_FIXTURE
 

Functions

 BOOST_FIXTURE_TEST_CASE (Issue22694, ISSUE_22694_FIXTURE)
 Test for issue #22694: Global labels and hierarchical labels not connected.
 

Function Documentation

◆ BOOST_FIXTURE_TEST_CASE()

BOOST_FIXTURE_TEST_CASE ( Issue22694 ,
ISSUE_22694_FIXTURE  )

Test for issue #22694: Global labels and hierarchical labels not connected.

When a hierarchical label in a sub-sheet is connected to a global label on the same sub-sheet, items connected through that hierarchical pin on the parent sheet should also be part of the global net.

Schematic structure: Root sheet:

  • Sheet "Subsheet 1" (S1.kicad_sch) with pins HL1, HL2
  • Sheet "Untitled Sheet" (untitled.kicad_sch) with no pins
  • Wire connecting HL1 sheet pin
  • Wire connecting HL2 sheet pin
  • Global label "Glob_Lab_Main" (floating, not connected to sheet pins) Subsheet S1:
  • J2 connector (8 pins), pins 1-6 connected to hierarchical labels
  • HL1 hierarchical label on J2-Pin1
  • HL2 hierarchical labels on J2-Pin2..Pin6
  • Additional HL2 hierarchical label connected to "Global Label" Subsheet untitled:
  • J3 connector, Pin1 connected to "Global Label"

Expected: J2-Pin2..Pin6 (in S1) should be on the same net as J3-Pin1 (in untitled sheet), because HL2 is connected to "Global Label" in S1, and "Global Label" connects globally to J3-Pin1 in the untitled sheet.

Definition at line 72 of file test_issue22694_global_hier_label.cpp.

References BOOST_CHECK_MESSAGE(), dummy, CONNECTION_GRAPH::GetNetMap(), SCH_SYMBOL::GetRef(), KI_TEST::LoadSchematic(), pin, and SCH_PIN_T.