This commit is contained in:
deeaitch committed 2026-10-11 06:30:18 -04:00
1 parent 51fcdb88ac
commit 0708316a37
155 files changed
+5190 -2691

No files matched your search

+18 -2
View File
@@ -24,7 +24,7 @@ make -j
make check
```
Or run `./tests/dbc_tests` directly. Parser, decoder, and additional coverage
Or run `./tests/dbc_tests` directly. Parser, decoder, lifetime, and additional coverage
suites run, and the executable returns nonzero when any suite fails. Decoder cases appear as
individual QtTest data rows; parser checks are grouped into named test slots.
Checks also run in release builds.
@@ -41,7 +41,7 @@ make check
```
`parser_tests.pri` and `decoder_tests.pri` include the original test sources;
`tests.pro` also includes `dbc_coverage_test.cpp`.
`tests.pro` also includes `dbc_coverage_test.cpp` and `dbc_lifetime_test.cpp`.
`../core/core.pri` supplies the library include path and linkage.
## Decoder coverage
@@ -120,3 +120,19 @@ API, verify source locations, and check that ambiguous targets receive no values
All QtTest targets use Qt 6.8.2 and `QVERIFY_THROWS_EXCEPTION`. Exception tests
explicitly discard `nodiscard` results when only the exception is being checked.
The standalone tree test requires only a C++17 compiler.
## Definition lifetime and reload coverage
`dbc_lifetime_test.cpp` checks retained definitions and value-description strings
across reload, clear, and destruction; independently saved signal results;
copied/moved results and database copies; owning lookup handles; and release of
the old snapshot after its final owner is removed. Compile-time checks enforce
const access to runtime metadata. Reload fixtures change ordering, frame names,
scaling, units, and descriptions, remove definitions, and rename signals.
Key tests check equality and hashing, standard/extended separation, the same
signal name in different frames, and missing lookups. Constructor tests reject
duplicate runtime keys, including manually supplied parsed metadata. Failed reload
leaves the active database intact; empty reload clears it. Invalid/unknown results
and insufficient payloads retain their documented ownership and status behavior.
Inactive branches and unavailable selectors also retain definitions across reload.