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

Tests for issue 24220: Inconsistency between schematic netclass coloring and XML netlist export in hierarchical buses. More...

#include <qa_utils/wx_utils/unit_test_utils.h>
#include <schematic_utils/schematic_file_util.h>
#include <wx/filename.h>
#include <wx/xml/xml.h>
#include <netlist_exporter_xml.h>
#include <project/net_settings.h>
#include <project/project_file.h>
#include <schematic.h>
#include <settings/settings_manager.h>
#include <string_utils.h>

Go to the source code of this file.

Classes

struct  ISSUE24220_FIXTURE
 

Functions

 BOOST_AUTO_TEST_CASE (NetSettingsResolvesBusMemberToAdi)
 
 BOOST_AUTO_TEST_CASE (XmlExportClassMatchesNetSettings)
 

Detailed Description

Tests for issue 24220: Inconsistency between schematic netclass coloring and XML netlist export in hierarchical buses.

When a netclass pattern matches a bus member net (e.g. pattern "*AD.1*" against net "/AD.1"), the schematic editor uses NET_SETTINGS::GetEffectiveNetClass() and sees the matching netclass. The XML netlist exporter previously resolved the netclass via subgraph->GetDriver()->GetEffectiveNetClass(), which fails for bus-member subgraphs (no driver SCH_ITEM is set) and silently falls back to the default netclass. The exporter should produce the same netclass that the painter shows.

Definition in file test_issue24220_hierarchical_bus_netclass.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/2]

BOOST_AUTO_TEST_CASE ( NetSettingsResolvesBusMemberToAdi )

◆ BOOST_AUTO_TEST_CASE() [2/2]

BOOST_AUTO_TEST_CASE ( XmlExportClassMatchesNetSettings )