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

Go to the source code of this file.

Classes

struct  REANNOTATED_REFERENCE
 
class  TEST_SCH_REFERENCE_LIST_FIXTURE
 
struct  REANNOTATION_CASE
 
struct  DUPLICATE_REANNOTATION_CASE
 

Functions

 BOOST_AUTO_TEST_CASE (Reannotate)
 
 BOOST_AUTO_TEST_CASE (ReannotateDuplicates)
 
 BOOST_AUTO_TEST_CASE (ReferenceListDoesNotMutateEmptyValue)
 
 BOOST_AUTO_TEST_CASE (ReannotateSameValueMultiUnitPreservesGrouping)
 Test for issue #23183: multi-unit symbols with the same value should maintain unit grouping when reannotated with reset.
 

Variables

static const std::vector< REANNOTATION_CASEreannotationCases
 
static const std::vector< DUPLICATE_REANNOTATION_CASEreannotateDuplicatesCases
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/4]

BOOST_AUTO_TEST_CASE ( Reannotate )

Definition at line 243 of file test_sch_reference_list.cpp.

References reannotationCases.

◆ BOOST_AUTO_TEST_CASE() [2/4]

BOOST_AUTO_TEST_CASE ( ReannotateDuplicates )

Definition at line 283 of file test_sch_reference_list.cpp.

References INCREMENTAL_BY_REF, and reannotateDuplicatesCases.

◆ BOOST_AUTO_TEST_CASE() [3/4]

BOOST_AUTO_TEST_CASE ( ReannotateSameValueMultiUnitPreservesGrouping )

Test for issue #23183: multi-unit symbols with the same value should maintain unit grouping when reannotated with reset.

When annotations are cleared before building locked groups (old design block placement behavior), the locked groups are empty and units from different symbols can get mixed during annotation. The fix preserves original refs for locked group construction, then resets.

Definition at line 334 of file test_sch_reference_list.cpp.

References SCH_REFERENCE_LIST::Annotate(), SCH_SHEET_PATH::AppendMultiUnitSymbol(), SCH_SHEET_PATH::AppendSymbol(), KIID::AsString(), BOOST_CHECK_EQUAL(), SCH_REFERENCE_LIST::GetCount(), SCH_SCREEN::Items(), SCH_SHEET_PATH::LastScreen(), LoadSchematic(), EDA_ITEM::m_Uuid, EE_RTREE::OfType(), SCH_REFERENCE_LIST::RemoveAnnotation(), SCH_SYMBOL_T, SCH_REFERENCE_LIST::SetRefDesTracker(), SCH_REFERENCE_LIST::SplitReferences(), and SCH_REFERENCE_LIST::UpdateAnnotation().

◆ BOOST_AUTO_TEST_CASE() [4/4]

BOOST_AUTO_TEST_CASE ( ReferenceListDoesNotMutateEmptyValue )

Variable Documentation

◆ reannotateDuplicatesCases

const std::vector<DUPLICATE_REANNOTATION_CASE> reannotateDuplicatesCases
static
Initial value:
= {
{ "Reannotate Duplicates. Simple case",
"test_multiunit_reannotate_5",
{
{ "d43a1d25-d37a-467a-8b09-10cf2e2ace09", "U2A", "U2A", false },
{ "cd562bae-2426-44e6-8196-59eee5439809", "U2B", "U2B", false },
{ "3f20a749-efe3-4804-8fef-435caaa8dacb", "U2C", "U2C", false },
{ "cf058f25-2bad-4c49-a0c4-f059825c427f", "U2A", "U3A", true },
{ "e6c8127f-e282-4128-8744-05f7893bc3ec", "U2B", "U3B", true },
{ "db066797-b21c-4c1c-9591-8c7c549f8087", "U2C", "U3C", true },
} },
}

Definition at line 269 of file test_sch_reference_list.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ reannotationCases

const std::vector<REANNOTATION_CASE> reannotationCases
static

Definition at line 138 of file test_sch_reference_list.cpp.

Referenced by BOOST_AUTO_TEST_CASE().