KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_issue24943_variant_unit_sync.cpp File Reference
#include <qa_utils/wx_utils/unit_test_utils.h>
#include <memory>
#include <lib_symbol.h>
#include <sch_commit.h>
#include <sch_pin.h>
#include <sch_symbol.h>
#include <sch_screen.h>
#include <sch_sheet.h>
#include <sch_sheet_path.h>
#include <schematic.h>
#include <settings/settings_manager.h>
#include <tool/tool_manager.h>
#include <wx/filename.h>
#include <wx/stdpaths.h>

Go to the source code of this file.

Classes

struct  ISSUE24943_FIXTURE
 Regression tests for issue 24943, design variant edits on multi-unit symbols. More...
 

Functions

 BOOST_AUTO_TEST_CASE (ValueSyncUnderVariant)
 A value assigned under a variant must reach the sibling unit as the same variant differential, and no base value may change.
 
 BOOST_AUTO_TEST_CASE (UserFieldSyncUnderVariant)
 Same contract for user fields, which take the updateOtherFields branch.
 
 BOOST_AUTO_TEST_CASE (ExcludeFlagSyncUnderVariant)
 Exclude flags set under a variant must sync as variant overrides, base flags stay untouched.
 
 BOOST_AUTO_TEST_CASE (DnpSyncUnderVariantControl)
 Positive control, DNP sync was already variant aware and must stay so.
 
 BOOST_AUTO_TEST_CASE (ValueSyncWithoutVariant)
 Negative control, the no-variant sync path keeps writing base values.
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/5]

BOOST_AUTO_TEST_CASE ( DnpSyncUnderVariantControl )

Positive control, DNP sync was already variant aware and must stay so.

Definition at line 167 of file test_issue24943_variant_unit_sync.cpp.

◆ BOOST_AUTO_TEST_CASE() [2/5]

BOOST_AUTO_TEST_CASE ( ExcludeFlagSyncUnderVariant )

Exclude flags set under a variant must sync as variant overrides, base flags stay untouched.

Definition at line 154 of file test_issue24943_variant_unit_sync.cpp.

◆ BOOST_AUTO_TEST_CASE() [3/5]

BOOST_AUTO_TEST_CASE ( UserFieldSyncUnderVariant )

Same contract for user fields, which take the updateOtherFields branch.

Definition at line 133 of file test_issue24943_variant_unit_sync.cpp.

References BOOST_CHECK_EQUAL(), SCH_FIELD::SetText(), and USER.

◆ BOOST_AUTO_TEST_CASE() [4/5]

BOOST_AUTO_TEST_CASE ( ValueSyncUnderVariant )

A value assigned under a variant must reach the sibling unit as the same variant differential, and no base value may change.

Definition at line 118 of file test_issue24943_variant_unit_sync.cpp.

References BOOST_AUTO_TEST_CASE(), and BOOST_CHECK_EQUAL().

◆ BOOST_AUTO_TEST_CASE() [5/5]

BOOST_AUTO_TEST_CASE ( ValueSyncWithoutVariant )

Negative control, the no-variant sync path keeps writing base values.

Definition at line 180 of file test_issue24943_variant_unit_sync.cpp.

References BOOST_CHECK_EQUAL().