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

Test for issue 18606: net name of shorted nets should be deterministic when part of a higher-level bus definition. More...

Go to the source code of this file.

Classes

struct  BUS_NET_NAME_DETERMINISM_FIXTURE
 

Functions

 BOOST_FIXTURE_TEST_CASE (ShortedBusNetsHaveDeterministicName, BUS_NET_NAME_DETERMINISM_FIXTURE)
 Test that when bus member nets (A0, A1, A2, A3) are shorted together, the resulting net name is deterministic (should be "A0" - alphabetically first).
 

Detailed Description

Test for issue 18606: net name of shorted nets should be deterministic when part of a higher-level bus definition.

When multiple nets from a bus (e.g., A0, A1, A2, A3 from bus A[0..3]) are shorted together, the resulting combined net name should be deterministically chosen (alphabetically first: A0).

Definition in file test_bus_net_name_determinism.cpp.

Function Documentation

◆ BOOST_FIXTURE_TEST_CASE()

BOOST_FIXTURE_TEST_CASE ( ShortedBusNetsHaveDeterministicName ,
BUS_NET_NAME_DETERMINISM_FIXTURE  )

Test that when bus member nets (A0, A1, A2, A3) are shorted together, the resulting net name is deterministic (should be "A0" - alphabetically first).

The test schematic has:

  • Parent sheet with bus A[0..3] connected to a hierarchical sheet
  • Child sheet with hierarchical label A[0..3], bus entries to A0, A1, A2, A3
  • All four nets (A0, A1, A2, A3) are shorted together via junctions
  • A resistor R201 is connected to the shorted nets

Definition at line 66 of file test_bus_net_name_determinism.cpp.

References dummy, SCH_SYMBOL::GetPins(), SCH_SYMBOL::GetRef(), SCH_SCREEN::Items(), KI_TEST::LoadSchematic(), SCH_CONNECTION::Name(), EE_RTREE::OfType(), path, pin, and SCH_SYMBOL_T.