|
KiCad PCB EDA Suite
|
#include <qa_utils/wx_utils/unit_test_utils.h>#include <pcbnew_utils/board_test_utils.h>#include <board.h>#include <board_design_settings.h>#include <component_classes/component_class.h>#include <component_classes/component_class_manager.h>#include <pad.h>#include <pcb_track.h>#include <pcb_marker.h>#include <footprint.h>#include <drc/drc_item.h>#include <settings/settings_manager.h>Go to the source code of this file.
Classes | |
| struct | PCB_COMPONENT_CLASS_FIXTURE |
Functions | |
| BOOST_FIXTURE_TEST_CASE (ComponentClasses, PCB_COMPONENT_CLASS_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (FinishNetlistUpdateClearsDeletedClassPointers, PCB_COMPONENT_CLASS_FIXTURE) | |
| Test that FinishNetlistUpdate clears footprint static component class pointers when their classes are deleted. | |
| BOOST_FIXTURE_TEST_CASE (FinishNetlistUpdatePreservesActiveClassPointers, PCB_COMPONENT_CLASS_FIXTURE) | |
| Test that FinishNetlistUpdate preserves footprint static component class pointers when their classes are still in use. | |
| BOOST_FIXTURE_TEST_CASE | ( | ComponentClasses | , |
| PCB_COMPONENT_CLASS_FIXTURE | ) |
Definition at line 48 of file test_component_classes.cpp.
References KI_TEST::LoadBoard().
| BOOST_FIXTURE_TEST_CASE | ( | FinishNetlistUpdateClearsDeletedClassPointers | , |
| PCB_COMPONENT_CLASS_FIXTURE | ) |
Test that FinishNetlistUpdate clears footprint static component class pointers when their classes are deleted.
This prevents use-after-free crashes during auto-save serialization. Regression test for GitLab issue #22623.
Definition at line 167 of file test_component_classes.cpp.
References BOOST_REQUIRE(), COMPONENT_CLASS_MANAGER::FinishNetlistUpdate(), FOOTPRINT, COMPONENT_CLASS_MANAGER::GetEffectiveStaticComponentClass(), FOOTPRINT::GetStaticComponentClass(), COMPONENT_CLASS_MANAGER::InitNetlistUpdate(), COMPONENT_CLASS::IsEmpty(), FOOTPRINT::SetReference(), and FOOTPRINT::SetStaticComponentClass().
| BOOST_FIXTURE_TEST_CASE | ( | FinishNetlistUpdatePreservesActiveClassPointers | , |
| PCB_COMPONENT_CLASS_FIXTURE | ) |
Test that FinishNetlistUpdate preserves footprint static component class pointers when their classes are still in use.
Definition at line 208 of file test_component_classes.cpp.
References BOOST_REQUIRE(), COMPONENT_CLASS_MANAGER::FinishNetlistUpdate(), FOOTPRINT, COMPONENT_CLASS_MANAGER::GetEffectiveStaticComponentClass(), FOOTPRINT::GetStaticComponentClass(), COMPONENT_CLASS_MANAGER::InitNetlistUpdate(), FOOTPRINT::SetReference(), and FOOTPRINT::SetStaticComponentClass().