|
KiCad PCB EDA Suite
|
#include <qa_utils/wx_utils/unit_test_utils.h>#include <boost/test/unit_test.hpp>#include <lib_id.h>#include <name_validation.h>Go to the source code of this file.
Functions | |
| BOOST_AUTO_TEST_CASE (ParseFullyQualified) | |
| BOOST_AUTO_TEST_CASE (ParseLegacy) | |
| BOOST_AUTO_TEST_CASE (EqualityFullyQualified) | |
| BOOST_AUTO_TEST_CASE (EqualityLegacyVsFullyQualified) | |
| BOOST_AUTO_TEST_CASE (FormatRoundTrip) | |
| BOOST_AUTO_TEST_CASE (EmptyId) | |
| BOOST_AUTO_TEST_CASE (SharedForbiddenListDrivesLibIdValidation) | |
| The shared LIB_ID forbidden-character list must actually drive LIB_ID validation. | |
| BOOST_AUTO_TEST_CASE (FilenameRulesSupersetOfLibId) | |
| Filename rules are a strict superset of LIB_ID rules. | |
| BOOST_AUTO_TEST_CASE | ( | EmptyId | ) |
Definition at line 102 of file test_lib_id.cpp.
References empty().
| BOOST_AUTO_TEST_CASE | ( | EqualityFullyQualified | ) |
Definition at line 54 of file test_lib_id.cpp.
| BOOST_AUTO_TEST_CASE | ( | EqualityLegacyVsFullyQualified | ) |
Definition at line 65 of file test_lib_id.cpp.
References BOOST_CHECK_EQUAL(), LIB_ID::GetLibItemName(), LIB_ID::IsLegacy(), and LIB_ID::Parse().
| BOOST_AUTO_TEST_CASE | ( | FilenameRulesSupersetOfLibId | ) |
Filename rules are a strict superset of LIB_ID rules.
This pins the deliberate asymmetry the old TODOs warned about: '', '$' and '/' are legal in a LIB_ID item name but illegal in a library filename.
Definition at line 147 of file test_lib_id.cpp.
References BOOST_CHECK_EQUAL(), GetLibFilenameForbiddenChars(), GetLibIdForbiddenChars(), LIB_ID::HasIllegalChars(), and name.
| BOOST_AUTO_TEST_CASE | ( | FormatRoundTrip | ) |
Definition at line 81 of file test_lib_id.cpp.
References BOOST_CHECK_EQUAL(), LIB_ID::Format(), LIB_ID::GetLibItemName(), LIB_ID::IsLegacy(), LIB_ID::Parse(), and UTF8::wx_str().
| BOOST_AUTO_TEST_CASE | ( | ParseFullyQualified | ) |
Definition at line 30 of file test_lib_id.cpp.
References BOOST_AUTO_TEST_CASE(), BOOST_CHECK_EQUAL(), and empty().
| BOOST_AUTO_TEST_CASE | ( | ParseLegacy | ) |
Definition at line 42 of file test_lib_id.cpp.
References BOOST_CHECK_EQUAL(), and empty().
| BOOST_AUTO_TEST_CASE | ( | SharedForbiddenListDrivesLibIdValidation | ) |
The shared LIB_ID forbidden-character list must actually drive LIB_ID validation.
Emptying or corrupting the list breaks these checks (revert guard for the dedup).
Definition at line 115 of file test_lib_id.cpp.
References BOOST_CHECK_MESSAGE(), BOOST_REQUIRE(), GetLibFilenameForbiddenChars(), GetLibIdForbiddenChars(), LIB_ID::HasIllegalChars(), and name.