|
KiCad PCB EDA Suite
|
Tests for ERC with rule areas, including regression test for issue 22854 (crash when running ERC twice with rule areas and modified items). More...
#include <qa_utils/wx_utils/unit_test_utils.h>#include <schematic_utils/schematic_file_util.h>#include <connection_graph.h>#include <schematic.h>#include <sch_rule_area.h>#include <sch_symbol.h>#include <erc/erc_settings.h>#include <erc/erc.h>#include <settings/settings_manager.h>#include <locale_io.h>Go to the source code of this file.
Classes | |
| struct | ERC_RULE_AREA_TEST_FIXTURE |
Functions | |
| BOOST_FIXTURE_TEST_CASE (ERCRuleAreaItemDeletion, ERC_RULE_AREA_TEST_FIXTURE) | |
| Regression test for issue 22854. | |
Tests for ERC with rule areas, including regression test for issue 22854 (crash when running ERC twice with rule areas and modified items).
Definition in file test_erc_rule_area.cpp.
| BOOST_FIXTURE_TEST_CASE | ( | ERCRuleAreaItemDeletion | , |
| ERC_RULE_AREA_TEST_FIXTURE | ) |
Regression test for issue 22854.
When a schematic has rule areas and items are modified between ERC runs, the second ERC run would crash due to dangling pointers in the rule area's item cache. The fix ensures that items remove themselves from rule areas when destroyed.
Definition at line 59 of file test_erc_rule_area.cpp.
References SCH_SCREEN::Append(), BOOST_REQUIRE(), SCH_SYMBOL::Clone(), dummy, SCH_SCREEN::Items(), KI_TEST::LoadSchematic(), EE_RTREE::OfType(), SCH_SCREEN::Remove(), ERC_TESTER::RunTests(), and SCH_SYMBOL_T.