|
KiCad PCB EDA Suite
|
#include <qa_utils/wx_utils/unit_test_utils.h>#include <libraries/symbol_library_adapter.h>#include <libraries/library_manager.h>#include <wx/textfile.h>#include <filesystem>Go to the source code of this file.
Functions | |
| BOOST_AUTO_TEST_CASE (IsSymbolLibWritableHandlesFailedLoad) | |
| Regression test for a null-plugin dereference crash. | |
| BOOST_AUTO_TEST_CASE (GetLibraryNamesSortedRegardlessOfTableOrder) | |
| Regression test for https://gitlab.com/kicad/code/kicad/-/issues/23066. | |
| BOOST_AUTO_TEST_CASE | ( | GetLibraryNamesSortedRegardlessOfTableOrder | ) |
Regression test for https://gitlab.com/kicad/code/kicad/-/issues/23066.
The library browsers list nicknames straight from GetLibraryNames(). When personal libraries were appended to the table after the default ones, the raw table order left them grouped at the bottom instead of interleaved alphabetically. GetLibraryNames() must return the available nicknames in case-insensitive natural order regardless of table order.
Definition at line 133 of file test_symbol_library_adapter.cpp.
References expected, and LIBRARY_MANAGER::LoadProjectTables().
| BOOST_AUTO_TEST_CASE | ( | IsSymbolLibWritableHandlesFailedLoad | ) |
Regression test for a null-plugin dereference crash.
A symbol library that fails to load leaves a LOAD_ERROR sentinel with a null plugin in the adapter's map. IsSymbolLibWritable() is called for every table row by the symbol editor and chooser, so it must report such a library as not writable instead of dereferencing the null plugin.
Definition at line 111 of file test_symbol_library_adapter.cpp.
References BOOST_AUTO_TEST_CASE(), and BOOST_CHECK_EQUAL().