|
KiCad PCB EDA Suite
|
#include <qa_utils/wx_utils/unit_test_utils.h>#include <dialog_sim_model.h>#include <sim/sim_model.h>#include <sim/sim_value.h>#include <sch_field.h>#include <sch_pin.h>#include <lib_symbol.h>#include <reporter.h>Go to the source code of this file.
Functions | |
| static wxString | buildDialogFields (LIB_SYMBOL &aSymbol, std::vector< SCH_FIELD > &aFields) |
| Regression coverage for https://gitlab.com/kicad/code/kicad/-/issues/23687. | |
| BOOST_AUTO_TEST_CASE (ValuePreservedWhenNotStored) | |
| BOOST_AUTO_TEST_CASE (ValueReplacedWhenStored) | |
| BOOST_AUTO_TEST_CASE | ( | ValuePreservedWhenNotStored | ) |
Definition at line 76 of file test_issue23687_sim_value_field.cpp.
References BOOST_CHECK_EQUAL(), buildDialogFields(), SIM_MODEL::Create(), GetFieldValue(), model, reporter, DIALOG_SIM_MODEL< T >::RestoreInferredValue(), and VALUE.
| BOOST_AUTO_TEST_CASE | ( | ValueReplacedWhenStored | ) |
Definition at line 103 of file test_issue23687_sim_value_field.cpp.
References BOOST_CHECK_MESSAGE(), buildDialogFields(), SIM_MODEL::Create(), GetFieldValue(), model, reporter, DIALOG_SIM_MODEL< T >::RestoreInferredValue(), and VALUE.
|
static |
Regression coverage for https://gitlab.com/kicad/code/kicad/-/issues/23687.
Editing an inferred passive in the Simulation Model dialog parks the ${SIM.PARAMS} placeholder in the Value field. If the user does not store the parameters in Value, the Value field must be left exactly as it was, not overwritten by the placeholder (or a normalized value). Build the field set the dialog hands to WriteFields() for an inferred passive, mirroring DIALOG_SIM_MODEL::TransferDataToWindow(). The inferred parameters are written to the Sim.* fields and the Value field is parked with the placeholder. Returns the original Value text the dialog remembers for restoration.
Definition at line 45 of file test_issue23687_sim_value_field.cpp.
References BOOST_REQUIRE(), buildDialogFields(), FindField(), SCH_FIELD::GetText(), SIM_MODEL::InferSimModel(), SetFieldValue(), SCH_FIELD::SetText(), SIM_VALUE_GRAMMAR::SI, SIM_DEVICE_FIELD, SIM_DEVICE_SUBTYPE_FIELD, SIM_PARAMS_FIELD, SIM_PINS_FIELD, and VALUE.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and buildDialogFields().