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

Test for issue #18299: Bus member falls off bus when also individually renamed at a sheet pin. More...

Go to the source code of this file.

Classes

struct  ISSUE18299_FIXTURE
 

Functions

 BOOST_FIXTURE_TEST_CASE (Issue18299BusMemberRename, ISSUE18299_FIXTURE)
 Test that bus member connections are maintained through hierarchy even when the member is also individually renamed at a sheet pin.
 

Detailed Description

Test for issue #18299: Bus member falls off bus when also individually renamed at a sheet pin.

The test schematic has:

  • Main sheet with two sub-sheet instances (test1, test2) of the same schematic (test.kicad_sch)
  • Bus {a} connects test1 to test2 via sheet pins
  • Bus alias "a" has members: a, b, c
  • Net "b" is a member of bus {a} and is broken out via bus entry in the sub-sheet
  • Net "b" is ALSO individually connected to a sheet pin on test1 (renamed to "bbb" on parent)

Expected: Net "b" inside test1 should be connected to net "b" inside test2 through the bus, even though test1's "b" is also individually renamed at a sheet pin.

The bug: When a bus member net is also individually renamed at a sheet pin, the bus member connection through the bus is lost.

Definition in file test_issue18299_bus_member_rename.cpp.

Function Documentation

◆ BOOST_FIXTURE_TEST_CASE()

BOOST_FIXTURE_TEST_CASE ( Issue18299BusMemberRename ,
ISSUE18299_FIXTURE  )

Test that bus member connections are maintained through hierarchy even when the member is also individually renamed at a sheet pin.

Expected connectivity:

  • Net "b" in test1 sub-sheet should be connected to net "b" in test2 sub-sheet via the bus
  • The individual sheet pin rename ("b" -> "bbb") should not break the bus member connection

Definition at line 72 of file test_issue18299_bus_member_rename.cpp.

References dummy, SCH_SHEET::GetName(), CONNECTION_GRAPH::GetNetMap(), SCH_SHEET_PATH::GetSheet(), EDA_TEXT::GetText(), SCH_SHEET_PATH::Last(), KI_TEST::LoadSchematic(), SCH_LABEL_T, and SCH_SHEET_PATH::size().