Closes #32
This commit is contained in:
1 parent
e44529007a
commit
f60faea2e7
35 files changed
+2361
-2145
No files matched your search
@@ -160,6 +160,10 @@ Attribute coverage</h1>
|
||||
<p>Parser slots <code>attributes</code>, <code>invalidAttributes</code>, and <code>attributeWarnings</code> cover all five scopes and types, deferred definitions/defaults/targets, explicit values overriding defaults, repeated assignments, escaped strings, typed range/scope errors, duplicate definitions/defaults, unknown attributes and missing targets. They check source diagnostics and the throwing API, distinct standard/extended targets, frame cycle times and enum labels, unsupported formats and ID conflicts, unchanged J1939 opt-in, and runtime/tree propagation. Existing unsupported-statement checks now use relation forms, which remain unsupported, instead of supported attribute forms.</p>
|
||||
<p>Attribute changes were verified with <code>qmake6 ../dbc.pro</code>, <code>make -j4</code>, and <code>make check</code> in <code>build/</code>: all six QtTest suites and the qmake tree target passed. The standalone C++17 tree test also passed. The existing named comma-decimal C locale test skipped because the locale is not installed.</p>
|
||||
<h1><a class="anchor" id="autotoc_md170"></a>
|
||||
Long signal definitions</h1>
|
||||
<p><code>longSignalDefinitions</code> reproduces the former stack overflow with a 50,000-character unit string. Both parser APIs are exercised with long units, signal names, receivers, decimal numbers, and a list of 10,001 receivers. Valid input must parse without truncating units; malformed input (including missing quotes, delimiters, receiver separators, numeric suffixes, overflow, and trailing receiver commas) must return an empty database and an <code>InvalidStatement</code> diagnostic at the signal's source line, or throw a source-located error through <code>ParseFile()</code>. These cases run as part of the existing parser target and sanitizer builds.</p>
|
||||
<p>Verified with Qt 6.8.2 in separate Release and ASan/UBSan builds, both with <code>CONFIG+=dbc_qt</code>: <code>make check</code> passed 2,409 core QtTest checks, seven model checks, and the qmake tree test in each build. The named comma-decimal C locale test skipped because the required locale is not installed. The sanitizer run used <code>ASAN_OPTIONS=detect_leaks=0:halt_on_error=1</code> and <code>UBSAN_OPTIONS=halt_on_error=1</code>; address and undefined-behavior checks passed, while leak checking was disabled because of the environment's previously documented ptrace restriction.</p>
|
||||
<h1><a class="anchor" id="autotoc_md171"></a>
|
||||
Extended validation</h1>
|
||||
<p><code>attributeNumbers</code> checks signed 64-bit limits, leading plus signs, decimal HEX values, FLOAT fractions/exponents, and default overrides under a comma-decimal C++ locale. Node/environment defaults remain on definitions without becoming database attributes. <code>invalidAttributeNumbers</code> supplies 39 data rows, each checked in both definition bounds, a default, and an explicit assignment. The throwing and diagnostic APIs must reject malformed signs, trailing text, hexadecimal notation, non-finite values, overflow, and underflow with the correct error line. Additional malformed-attribute cases cover token separators, scope/type names, reversed FLOAT bounds, value types/ranges, and invalid CAN references.</p>
|
||||
<p>Run AddressSanitizer and UndefinedBehaviorSanitizer in a separate directory:</p>
|
||||
|
||||
Reference in new issue
Block a user