|
KiCad PCB EDA Suite
|
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) | |
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.
| BOOST_AUTO_TEST_CASE | ( | NetSettingsResolvesBusMemberToAdi | ) |
Definition at line 64 of file test_issue24220_hierarchical_bus_netclass.cpp.
References BOOST_AUTO_TEST_CASE(), BOOST_REQUIRE(), and KI_TEST::LoadSchematic().
| BOOST_AUTO_TEST_CASE | ( | XmlExportClassMatchesNetSettings | ) |
Definition at line 91 of file test_issue24220_hierarchical_bus_netclass.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOOST_TEST_INFO(), expected, KI_TEST::LoadSchematic(), reporter, and UnescapeString().