Closes #3 Validate DBC frame definitions and report error locations
This commit is contained in:
1 parent
69074e3321
commit
3bd9339baf
6 files changed
+213
-36
No files matched your search
@@ -26,3 +26,22 @@ signals, signed values, scaling, 64-bit extraction, signed/unsigned boundary val
|
||||
(including `INT64_MIN`, `INT64_MAX`, and `UINT64_MAX`), numeric output, invalid lengths, insufficient
|
||||
payloads, and Intel regression cases. Frame validity means the definition was
|
||||
found; insufficient payloads are checked through signal validity.
|
||||
|
||||
## Parser regression tests
|
||||
|
||||
Run from the repository root:
|
||||
|
||||
```sh
|
||||
g++ -std=c++17 -Wall -Wextra -Wpedantic -Werror -I. \
|
||||
tests/dbc_parser_test.cpp dbc_parser.cpp -o /tmp/dbc_parser_test
|
||||
/tmp/dbc_parser_test
|
||||
```
|
||||
|
||||
For qmake, use `tests/dbc_parser_test.pro` in a separate build directory,
|
||||
following the decoder instructions above, then run `./dbc_parser_test`.
|
||||
|
||||
Parser tests cover standard and extended CAN IDs, whitespace, payload storage
|
||||
boundaries, missing fields, malformed and overflowing numbers, reserved ID bits,
|
||||
error paths and line numbers, and integration with signals and comments.
|
||||
Temporary DBC fixtures are created in the system temporary directory and removed
|
||||
automatically.
|
||||
Reference in new issue
Block a user