|
KiCad PCB EDA Suite
|
#include <qa_utils/wx_utils/unit_test_utils.h>#include <algorithm>#include <memory>#include <eeschema_helpers.h>#include <eeschema_test_utils.h>#include <locale_io.h>#include <schematic.h>#include <schematic_text_var_adapter.h>#include <sch_screen.h>#include <sch_sheet.h>#include <sch_symbol.h>#include <sch_text.h>#include <sch_field.h>#include <sch_sheet_pin.h>#include <text_var_dependency.h>#include "sch_table.h"Go to the source code of this file.
Functions | |
| BOOST_AUTO_TEST_CASE (AdapterInstalledOnSchematicConstruction) | |
| SCHEMATIC_TEXT_VAR_ADAPTER exercised at the listener interface. | |
| BOOST_AUTO_TEST_CASE (SchTextItemRegistersOnAdded) | |
| BOOST_AUTO_TEST_CASE (SchSymbolFieldsRegisterAsDependents) | |
| BOOST_AUTO_TEST_CASE (RemovedItemsAreUnregistered) | |
| BOOST_AUTO_TEST_CASE (RetextReRegisters) | |
| BOOST_AUTO_TEST_CASE (SpiceOPTokensAreNotRegistered) | |
| BOOST_AUTO_TEST_CASE (LoadedSchematicIsIndexed) | |
| BOOST_AUTO_TEST_CASE (ReplacedSheetScreenIsUnindexed) | |
| BOOST_AUTO_TEST_CASE (KiidCrossRefInvalidatedBySymbolChange) | |
| BOOST_AUTO_TEST_CASE | ( | AdapterInstalledOnSchematicConstruction | ) |
SCHEMATIC_TEXT_VAR_ADAPTER exercised at the listener interface.
Drives the adapter via direct OnSchItems* calls — this bypasses SCH_COMMIT (which requires TOOL_MANAGER scaffolding) and keeps the tests focused on the adapter's own logic. The commit-driven path is exercised by the pcbnew/BOARD equivalent, which uses the same TEXT_VAR_TRACKER underneath.
Definition at line 50 of file test_schematic_text_var_reactive.cpp.
References BOOST_AUTO_TEST_CASE(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), SCHEMATIC::GetTextVarAdapter(), TEXT_VAR_TRACKER::Index(), TEXT_VAR_DEPENDENCY_INDEX::ItemCount(), and SCHEMATIC_TEXT_VAR_ADAPTER::Tracker().
| BOOST_AUTO_TEST_CASE | ( | KiidCrossRefInvalidatedBySymbolChange | ) |
Definition at line 222 of file test_schematic_text_var_reactive.cpp.
References TEXT_VAR_TRACKER::AddInvalidateListener(), BOOST_REQUIRE(), dummy, KI_TEST::GetEeschemaTestDataDir(), EESCHEMA_HELPERS::LoadSchematic(), SCHEMATIC_TEXT_VAR_ADAPTER::OnSchItemsAdded(), SCHEMATIC_TEXT_VAR_ADAPTER::OnSchItemsChanged(), path, TEXT_VAR_TRACKER::RemoveInvalidateListener(), SCH_SYMBOL_T, text, and SCHEMATIC_TEXT_VAR_ADAPTER::Tracker().
| BOOST_AUTO_TEST_CASE | ( | LoadedSchematicIsIndexed | ) |
Definition at line 169 of file test_schematic_text_var_reactive.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), dummy, TEXT_VAR_REF_KEY::FromToken(), KI_TEST::GetEeschemaTestDataDir(), index, EESCHEMA_HELPERS::LoadSchematic(), and path.
| BOOST_AUTO_TEST_CASE | ( | RemovedItemsAreUnregistered | ) |
Definition at line 88 of file test_schematic_text_var_reactive.cpp.
References BOOST_CHECK_EQUAL(), TEXT_VAR_REF_KEY::FromToken(), SCHEMATIC::GetTextVarAdapter(), TEXT_VAR_TRACKER::Index(), index, SCHEMATIC_TEXT_VAR_ADAPTER::OnSchItemsAdded(), SCHEMATIC_TEXT_VAR_ADAPTER::OnSchItemsRemoved(), text, and SCHEMATIC_TEXT_VAR_ADAPTER::Tracker().
| BOOST_AUTO_TEST_CASE | ( | ReplacedSheetScreenIsUnindexed | ) |
Definition at line 184 of file test_schematic_text_var_reactive.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), dummy, TEXT_VAR_REF_KEY::FromToken(), KI_TEST::GetEeschemaTestDataDir(), SCH_SHEET::GetFileName(), index, EESCHEMA_HELPERS::LoadSchematic(), path, SCH_SHEET_T, and SCH_SHEET::SetScreen().
| BOOST_AUTO_TEST_CASE | ( | RetextReRegisters | ) |
Definition at line 105 of file test_schematic_text_var_reactive.cpp.
References SCH_SHEET::AddPin(), BOOST_CHECK_EQUAL(), TEXT_VAR_REF_KEY::FromToken(), SCHEMATIC::GetTextVarAdapter(), TEXT_VAR_TRACKER::Index(), index, SCHEMATIC_TEXT_VAR_ADAPTER::OnSchItemsAdded(), SCHEMATIC_TEXT_VAR_ADAPTER::OnSchItemsChanged(), pin, EDA_TEXT::SetText(), table, text, and SCHEMATIC_TEXT_VAR_ADAPTER::Tracker().
| BOOST_AUTO_TEST_CASE | ( | SchSymbolFieldsRegisterAsDependents | ) |
Definition at line 72 of file test_schematic_text_var_reactive.cpp.
References BOOST_CHECK_EQUAL(), TEXT_VAR_REF_KEY::FromToken(), SCH_SYMBOL::GetField(), SCHEMATIC::GetTextVarAdapter(), TEXT_VAR_TRACKER::Index(), index, SCHEMATIC_TEXT_VAR_ADAPTER::OnSchItemsAdded(), SCH_FIELD::SetText(), SCHEMATIC_TEXT_VAR_ADAPTER::Tracker(), and VALUE.
| BOOST_AUTO_TEST_CASE | ( | SchTextItemRegistersOnAdded | ) |
Definition at line 58 of file test_schematic_text_var_reactive.cpp.
References BOOST_CHECK_EQUAL(), TEXT_VAR_REF_KEY::FromToken(), SCHEMATIC::GetTextVarAdapter(), TEXT_VAR_TRACKER::Index(), index, SCHEMATIC_TEXT_VAR_ADAPTER::OnSchItemsAdded(), text, and SCHEMATIC_TEXT_VAR_ADAPTER::Tracker().
| BOOST_AUTO_TEST_CASE | ( | SpiceOPTokensAreNotRegistered | ) |