|
KiCad PCB EDA Suite
|
#include <qa_utils/wx_utils/unit_test_utils.h>#include <memory>#include <set>#include <eeschema_helpers.h>#include <lib_fields_data_model.h>#include <lib_symbol.h>#include <symbol_fields_data_model.h>#include <locale_io.h>#include <richio.h>#include <sch_commit.h>#include <sch_field.h>#include <sch_io/kicad_sexpr/sch_io_kicad_sexpr.h>#include <sch_reference_list.h>#include <sch_sheet.h>#include <sch_sheet_path.h>#include <sch_symbol.h>#include <schematic.h>#include <template_fieldnames.h>#include <tool/tool_manager.h>Go to the source code of this file.
Classes | |
| struct | ISSUE25112_FIXTURE |
| struct | LIB_FIELDS_TABLE_TEXT_VARS_FIXTURE |
Functions | |
| BOOST_FIXTURE_TEST_CASE (SheetScopedFieldEditSurvivesApply, ISSUE25112_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (SheetScopedFieldClearCanBeReverted, ISSUE25112_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (GroupedEditStateChecksEveryItem, ISSUE25112_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (SheetScopedVariantEditStaysOnItsPath, ISSUE25112_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (CopyVariantToDefaultReachesHiddenSharedSheetPaths, ISSUE25112_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (CopyUsesSourceVariantsInheritedAttributes, ISSUE25112_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (SheetScopedBoardExclusionSurvivesApply, ISSUE25112_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (UntouchedMissingPresetFieldRemainsAbsent, ISSUE25112_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (ExplicitEmptyValueCreatesField, ISSUE25112_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (ExistingEmptyFieldCanBeCleared, ISSUE25112_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (UserAddedColumnCreatesEmptyField, ISSUE25112_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (RevertingVariantFieldCreationRestoresAbsence, ISSUE25112_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (RefreshPreservesStagedFieldsAcrossSharedSheetPaths, ISSUE25112_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (RefreshPreservesFieldPresenceEditsAcrossVariantsAndPaths, ISSUE25112_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (NewlyAddedVariantDoesNotReceivePreviousVariantsValues, ISSUE25112_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (VariantRoundTripRetainsEditsAndCancelLeavesSchematicAlone, ISSUE25112_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (RenamingAndDeletingVariantsRetargetsPendingEdits, ISSUE25112_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (RevertingVariantKeepsBaseEditsConsistentAcrossPaths, ISSUE25112_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (MixedVariablesResolveStagedVariantFieldsBeforeApply, ISSUE25112_FIXTURE) | |
| BOOST_AUTO_TEST_CASE (DerivedFieldsDisplayPendingInheritanceWithoutCreatingOverrides) | |
| BOOST_AUTO_TEST_CASE (MixedVariablesResolveStagedFieldsAndLiveFallbacks) | |
| BOOST_AUTO_TEST_CASE (StagedVariableCyclesRemainBounded) | |
| BOOST_AUTO_TEST_CASE | ( | DerivedFieldsDisplayPendingInheritanceWithoutCreatingOverrides | ) |
Definition at line 656 of file test_issue25112_shared_sheet_field_scope.cpp.
References FIELDS_TABLE_DATA_MODEL< ITEM_TYPE >::AddColumn(), BOOST_AUTO_TEST_CASE(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), DESCRIPTION, LIB_SYMBOL::Flatten(), FOOTPRINT, SCH_IO_KICAD_SEXPR::FormatLibSymbol(), GetDefaultFieldName(), LIB_SYMBOL::GetDescription(), LIB_SYMBOL::GetDescriptionField(), LIB_SYMBOL::GetFootprintField(), LIB_SYMBOL::GetKeyWords(), LIB_SYMBOL::GetRawKeyWords(), STRING_FORMATTER::GetString(), SCH_FIELD::GetText(), LIB_SYMBOL::GetValueField(), model, name, LIB_SYMBOL::SetParent(), SCH_FIELD::SetText(), LIB_FIELDS_EDITOR_GRID_DATA_MODEL::SYMBOL_KEYWORDS, LIB_FIELDS_EDITOR_GRID_DATA_MODEL::SYMBOL_NAME, UNTRANSLATED, and VALUE.
| BOOST_AUTO_TEST_CASE | ( | MixedVariablesResolveStagedFieldsAndLiveFallbacks | ) |
Definition at line 794 of file test_issue25112_shared_sheet_field_scope.cpp.
References BOOST_CHECK_EQUAL(), and expected.
| BOOST_AUTO_TEST_CASE | ( | StagedVariableCyclesRemainBounded | ) |
Definition at line 808 of file test_issue25112_shared_sheet_field_scope.cpp.
References BOOST_CHECK_EQUAL().
| BOOST_FIXTURE_TEST_CASE | ( | CopyUsesSourceVariantsInheritedAttributes | , |
| ISSUE25112_FIXTURE | ) |
Definition at line 301 of file test_issue25112_shared_sheet_field_scope.cpp.
References SCH_SHEET::AddVariant(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), SCH_SHEET_PATH::Last(), VARIANT::m_DNP, model, and SCH_SHEET_PATH::pop_back().
| BOOST_FIXTURE_TEST_CASE | ( | CopyVariantToDefaultReachesHiddenSharedSheetPaths | , |
| ISSUE25112_FIXTURE | ) |
Definition at line 284 of file test_issue25112_shared_sheet_field_scope.cpp.
References BOOST_CHECK_EQUAL(), copied, FOOTPRINT, GetDefaultFieldName(), model, and UNTRANSLATED.
| BOOST_FIXTURE_TEST_CASE | ( | ExistingEmptyFieldCanBeCleared | , |
| ISSUE25112_FIXTURE | ) |
Definition at line 382 of file test_issue25112_shared_sheet_field_scope.cpp.
References BOOST_REQUIRE(), model, and USER.
| BOOST_FIXTURE_TEST_CASE | ( | ExplicitEmptyValueCreatesField | , |
| ISSUE25112_FIXTURE | ) |
Definition at line 360 of file test_issue25112_shared_sheet_field_scope.cpp.
References BOOST_REQUIRE(), SCH_FIELD::GetText(), and model.
| BOOST_FIXTURE_TEST_CASE | ( | GroupedEditStateChecksEveryItem | , |
| ISSUE25112_FIXTURE | ) |
Definition at line 198 of file test_issue25112_shared_sheet_field_scope.cpp.
References SCH_SYMBOL::AddField(), BOOST_REQUIRE(), GetDefaultFieldName(), SCH_SYMBOL::GetField(), model, REFERENCE, SCH_FIELD::SetText(), UNTRANSLATED, and USER.
| BOOST_FIXTURE_TEST_CASE | ( | MixedVariablesResolveStagedVariantFieldsBeforeApply | , |
| ISSUE25112_FIXTURE | ) |
Definition at line 592 of file test_issue25112_shared_sheet_field_scope.cpp.
References BOOST_CHECK_EQUAL(), GetDefaultFieldName(), SCH_FIELD::GetText(), model, SCH_FIELD::SetText(), UNTRANSLATED, and VALUE.
| BOOST_FIXTURE_TEST_CASE | ( | NewlyAddedVariantDoesNotReceivePreviousVariantsValues | , |
| ISSUE25112_FIXTURE | ) |
Definition at line 493 of file test_issue25112_shared_sheet_field_scope.cpp.
References BOOST_CHECK_EQUAL(), GetDefaultFieldName(), SCH_FIELD::GetText(), model, name, SCH_FIELD::SetText(), UNTRANSLATED, and VALUE.
| BOOST_FIXTURE_TEST_CASE | ( | RefreshPreservesFieldPresenceEditsAcrossVariantsAndPaths | , |
| ISSUE25112_FIXTURE | ) |
Definition at line 470 of file test_issue25112_shared_sheet_field_scope.cpp.
References BOOST_REQUIRE(), model, name, and USER.
| BOOST_FIXTURE_TEST_CASE | ( | RefreshPreservesStagedFieldsAcrossSharedSheetPaths | , |
| ISSUE25112_FIXTURE | ) |
Definition at line 446 of file test_issue25112_shared_sheet_field_scope.cpp.
References BOOST_CHECK_EQUAL(), GetDefaultFieldName(), model, name, UNTRANSLATED, and VALUE.
| BOOST_FIXTURE_TEST_CASE | ( | RenamingAndDeletingVariantsRetargetsPendingEdits | , |
| ISSUE25112_FIXTURE | ) |
Definition at line 540 of file test_issue25112_shared_sheet_field_scope.cpp.
References BOOST_CHECK_EQUAL(), GetDefaultFieldName(), SCH_FIELD::GetText(), model, name, SCH_FIELD::SetText(), UNTRANSLATED, and VALUE.
| BOOST_FIXTURE_TEST_CASE | ( | RevertingVariantFieldCreationRestoresAbsence | , |
| ISSUE25112_FIXTURE | ) |
Definition at line 424 of file test_issue25112_shared_sheet_field_scope.cpp.
References BOOST_REQUIRE(), and model.
| BOOST_FIXTURE_TEST_CASE | ( | RevertingVariantKeepsBaseEditsConsistentAcrossPaths | , |
| ISSUE25112_FIXTURE | ) |
Definition at line 568 of file test_issue25112_shared_sheet_field_scope.cpp.
References BOOST_CHECK_EQUAL(), GetDefaultFieldName(), SCH_FIELD::GetText(), model, name, SCH_FIELD::SetText(), UNTRANSLATED, and VALUE.
| BOOST_FIXTURE_TEST_CASE | ( | SheetScopedBoardExclusionSurvivesApply | , |
| ISSUE25112_FIXTURE | ) |
Definition at line 329 of file test_issue25112_shared_sheet_field_scope.cpp.
References BOOST_REQUIRE(), and model.
| BOOST_FIXTURE_TEST_CASE | ( | SheetScopedFieldClearCanBeReverted | , |
| ISSUE25112_FIXTURE | ) |
Definition at line 169 of file test_issue25112_shared_sheet_field_scope.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), SCH_FIELD::GetText(), model, SCH_FIELD::SetText(), and USER.
| BOOST_FIXTURE_TEST_CASE | ( | SheetScopedFieldEditSurvivesApply | , |
| ISSUE25112_FIXTURE | ) |
Definition at line 155 of file test_issue25112_shared_sheet_field_scope.cpp.
References BOOST_CHECK_EQUAL(), FOOTPRINT, GetDefaultFieldName(), model, and UNTRANSLATED.
| BOOST_FIXTURE_TEST_CASE | ( | SheetScopedVariantEditStaysOnItsPath | , |
| ISSUE25112_FIXTURE | ) |
Definition at line 263 of file test_issue25112_shared_sheet_field_scope.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), FOOTPRINT, GetDefaultFieldName(), model, and UNTRANSLATED.
| BOOST_FIXTURE_TEST_CASE | ( | UntouchedMissingPresetFieldRemainsAbsent | , |
| ISSUE25112_FIXTURE | ) |
Definition at line 345 of file test_issue25112_shared_sheet_field_scope.cpp.
References BOOST_REQUIRE(), and model.
| BOOST_FIXTURE_TEST_CASE | ( | UserAddedColumnCreatesEmptyField | , |
| ISSUE25112_FIXTURE | ) |
Definition at line 406 of file test_issue25112_shared_sheet_field_scope.cpp.
References BOOST_REQUIRE(), SCH_FIELD::GetText(), and model.
| BOOST_FIXTURE_TEST_CASE | ( | VariantRoundTripRetainsEditsAndCancelLeavesSchematicAlone | , |
| ISSUE25112_FIXTURE | ) |
Definition at line 519 of file test_issue25112_shared_sheet_field_scope.cpp.
References BOOST_CHECK_EQUAL(), GetDefaultFieldName(), SCH_FIELD::GetText(), model, name, SCH_FIELD::SetText(), UNTRANSLATED, and VALUE.