|
KiCad PCB EDA Suite
|
Test for issue #22060: Multiple identical design blocks break connections. More...
#include <boost/test/unit_test.hpp>#include <eeschema_test_utils.h>#include <sch_io/kicad_sexpr/sch_io_kicad_sexpr.h>#include <sch_screen.h>#include <sch_sheet.h>#include <sch_group.h>#include <sch_line.h>#include <sch_junction.h>#include <schematic.h>#include <kiid.h>#include <qa_utils/wx_utils/unit_test_utils.h>#include <wx/filename.h>#include <wx/stdpaths.h>Go to the source code of this file.
Classes | |
| struct | DESIGN_BLOCK_FIXTURE |
Functions | |
| BOOST_AUTO_TEST_CASE (TestMultipleDesignBlocksGroupIntegrity) | |
| Test that multiple design block instances maintain correct group membership after save/reload This is a regression test for issue #22060. | |
| BOOST_AUTO_TEST_CASE (TestDesignBlockDuplicateUuidHandling) | |
| Test that ReplaceDuplicateTimeStamps correctly handles ALL item types (wires, junctions, groups), not just hierarchical items (symbols, sheets, labels). | |
Test for issue #22060: Multiple identical design blocks break connections.
When placing multiple instances of the same design block in the same sheet, connections should be preserved after save/reload. This test verifies that groups and their members maintain correct associations.
Definition in file test_design_block_duplicate.cpp.
| BOOST_AUTO_TEST_CASE | ( | TestDesignBlockDuplicateUuidHandling | ) |
Test that ReplaceDuplicateTimeStamps correctly handles ALL item types (wires, junctions, groups), not just hierarchical items (symbols, sheets, labels).
This is the core fix for issue #22060.
Definition at line 246 of file test_design_block_duplicate.cpp.
References EDA_GROUP::AddItem(), SCH_SCREEN::Append(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOOST_TEST_MESSAGE(), SCH_SHEET::GetScreen(), group, SCH_SCREEN::Items(), LAYER_WIRE, SCH_IO_KICAD_SEXPR::LoadSchematicFile(), EDA_ITEM::m_Uuid, EE_RTREE::OfType(), SCH_SCREENS::ReplaceDuplicateTimeStamps(), SCH_IO_KICAD_SEXPR::SaveSchematicFile(), SCH_GROUP_T, SCH_LINE::SetEndPoint(), SCH_SCREEN::SetFileName(), and EDA_GROUP::SetName().
| BOOST_AUTO_TEST_CASE | ( | TestMultipleDesignBlocksGroupIntegrity | ) |
Test that multiple design block instances maintain correct group membership after save/reload This is a regression test for issue #22060.
Definition at line 126 of file test_design_block_duplicate.cpp.
References BOOST_AUTO_TEST_CASE(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOOST_TEST_MESSAGE(), EDA_GROUP::GetItems(), SCH_SHEET::GetScreen(), group, SCH_SCREEN::Items(), SCH_IO_KICAD_SEXPR::LoadSchematicFile(), EDA_ITEM::m_Uuid, EE_RTREE::OfType(), SCH_IO_KICAD_SEXPR::SaveSchematicFile(), SCH_GROUP_T, and SCH_SCREEN::SetFileName().