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

Test for issue #18605: Changing a label from non-bus to bus does not enable bus unfolding until the label is moved. More...

#include <qa_utils/wx_utils/unit_test_utils.h>
#include <connection_graph.h>
#include <schematic.h>
#include <sch_label.h>
#include <sch_line.h>
#include <sch_screen.h>
#include <sch_sheet.h>
#include <settings/settings_manager.h>

Go to the source code of this file.

Classes

struct  LABEL_BUS_CONNECTIVITY_FIXTURE
 

Functions

 BOOST_FIXTURE_TEST_CASE (LabelNetToBusConnectivity, LABEL_BUS_CONNECTIVITY_FIXTURE)
 Test that changing a label from a net name to a bus name properly updates the connected bus wire's connection members.
 
 BOOST_FIXTURE_TEST_CASE (BusLabelFullRecalculation, LABEL_BUS_CONNECTIVITY_FIXTURE)
 Test that a bus label properly provides members to a connected bus wire in a full recalculation scenario.
 

Detailed Description

Test for issue #18605: Changing a label from non-bus to bus does not enable bus unfolding until the label is moved.

This test verifies that when a label's text changes from a net name to a bus name, the connectivity is properly recalculated so that the connected bus wire gets the correct bus members.

Definition in file test_label_bus_connectivity.cpp.

Function Documentation

◆ BOOST_FIXTURE_TEST_CASE() [1/2]

BOOST_FIXTURE_TEST_CASE ( BusLabelFullRecalculation ,
LABEL_BUS_CONNECTIVITY_FIXTURE  )

Test that a bus label properly provides members to a connected bus wire in a full recalculation scenario.

Definition at line 133 of file test_label_bus_connectivity.cpp.

References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), SCH_ITEM::Connection(), SCH_CONNECTION::IsBus(), LAYER_BUS, SCH_CONNECTION::Members(), path, and SCH_LINE::SetEndPoint().

◆ BOOST_FIXTURE_TEST_CASE() [2/2]

BOOST_FIXTURE_TEST_CASE ( LabelNetToBusConnectivity ,
LABEL_BUS_CONNECTIVITY_FIXTURE  )

Test that changing a label from a net name to a bus name properly updates the connected bus wire's connection members.

Issue #18605: When a label attached to a bus wire is edited from a non-bus name (like "test") to a bus name (like "test[0..7]"), the bus unfolding menu should work and the bus wire should have the correct members.

Definition at line 81 of file test_label_bus_connectivity.cpp.

References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), SCH_ITEM::Connection(), SCH_CONNECTION::IsBus(), LAYER_BUS, SCH_CONNECTION::Members(), path, SCH_ITEM::SetConnectivityDirty(), SCH_LINE::SetEndPoint(), and EDA_TEXT::SetText().