|
KiCad PCB EDA Suite
|
Regression test for https://gitlab.com/kicad/code/kicad/-/issues/25209. More...
#include <qa_utils/wx_utils/unit_test_utils.h>#include <lib_symbol.h>#include <sch_io/sch_io_mgr.h>#include <sch_io/kicad_sexpr/sch_io_kicad_sexpr.h>#include <wx/filename.h>Go to the source code of this file.
Classes | |
| class | DERIVED_BODY_STYLES_FIXTURE |
Functions | |
| BOOST_AUTO_TEST_CASE (BodyStylesResolveThroughParent) | |
| A derived symbol owns no drawings, so its body styles are its root symbol's. | |
| BOOST_AUTO_TEST_CASE (UnitMetadataResolvesThroughParent) | |
| Everything the disabled Units & Body Styles controls display has to resolve to the root symbol's value, or a derived symbol is shown settings it does not have and can no longer correct. | |
| BOOST_AUTO_TEST_CASE (BodyStylesSurviveRoundTrip) | |
| The in-memory state of a derived symbol must survive a save/reload, which it cannot do if it reports body styles the file format has no way to store for it. | |
Regression test for https://gitlab.com/kicad/code/kicad/-/issues/25209.
Definition in file test_issue25209_derived_body_styles.cpp.
| BOOST_AUTO_TEST_CASE | ( | BodyStylesResolveThroughParent | ) |
A derived symbol owns no drawings, so its body styles are its root symbol's.
The symbol properties dialog let the user set De Morgan on a derived symbol; the body style select box then offered a second style with nothing in it, and the change silently evaporated on save because the derived symbol is written as a bare (extends ...) with no body_styles token.
Definition at line 69 of file test_issue25209_derived_body_styles.cpp.
References BOOST_AUTO_TEST_CASE(), BOOST_CHECK_EQUAL(), LIB_SYMBOL::GetBodyStyleCount(), LIB_SYMBOL::GetBodyStyleDescription(), LIB_SYMBOL::HasDeMorganBodyStyles(), LIB_SYMBOL::IsMultiBodyStyle(), LIB_SYMBOL::SetBodyStyleCount(), LIB_SYMBOL::SetBodyStyleNames(), LIB_SYMBOL::SetHasDeMorganBodyStyles(), and LIB_SYMBOL::SetParent().
| BOOST_AUTO_TEST_CASE | ( | BodyStylesSurviveRoundTrip | ) |
The in-memory state of a derived symbol must survive a save/reload, which it cannot do if it reports body styles the file format has no way to store for it.
Definition at line 142 of file test_issue25209_derived_body_styles.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), LIB_SYMBOL::GetBodyStyleCount(), LIB_SYMBOL::HasDeMorganBodyStyles(), LIB_SYMBOL::SetBodyStyleCount(), LIB_SYMBOL::SetBodyStyleNames(), LIB_SYMBOL::SetHasDeMorganBodyStyles(), and LIB_SYMBOL::SetParent().
| BOOST_AUTO_TEST_CASE | ( | UnitMetadataResolvesThroughParent | ) |
Everything the disabled Units & Body Styles controls display has to resolve to the root symbol's value, or a derived symbol is shown settings it does not have and can no longer correct.
Definition at line 116 of file test_issue25209_derived_body_styles.cpp.
References BOOST_CHECK_EQUAL(), LIB_SYMBOL::GetUnitCount(), LIB_SYMBOL::GetUnitDisplayName(), LIB_SYMBOL::GetUnitDisplayNames(), LIB_SYMBOL::IsMultiUnit(), LIB_SYMBOL::LockUnits(), LIB_SYMBOL::SetParent(), LIB_SYMBOL::SetUnitCount(), and LIB_SYMBOL::UnitsLocked().