Harden and fully cover the C++ translation
Add an exhaustive readable-instance sweep and a coverage gate requiring 100% line coverage of the summarised implementation. Delete branches that are unreachable under `Readable`, centralise and assert the 32-bit offset contract at the public entry points, and stop materialising `n` zero bytes when deciding `keyAfterN n k < upper`. Also add the extreme-offset regression test, harden the corpus parsers, remove unused model helpers, document the literal-total / fast-readable split, and refresh the validation and benchmark numbers.
This commit is contained in:
1 parent
e32e42d933
commit
3bb5d062ff
15 files changed
+620
-196
No files matched your search
@@ -28,6 +28,19 @@ target_link_libraries(golden_test PRIVATE cr_literal)
|
||||
add_executable(diff_corpus tests/diff_corpus.cpp)
|
||||
target_link_libraries(diff_corpus PRIVATE cr_literal cr_fast)
|
||||
|
||||
# Regression test for offsets at the extremes of `Int`.
|
||||
add_executable(extreme_test tests/extreme.cpp)
|
||||
target_include_directories(extreme_test PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/tests)
|
||||
target_link_libraries(extreme_test PRIVATE cr_literal cr_fast)
|
||||
|
||||
# Deterministic exhaustive sweep of small readable instances. This is the
|
||||
# driver for the line-coverage check in `run-coverage.sh`.
|
||||
add_executable(exhaustive_test tests/exhaustive.cpp)
|
||||
target_include_directories(exhaustive_test PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/tests)
|
||||
target_link_libraries(exhaustive_test PRIVATE cr_literal cr_fast)
|
||||
|
||||
if(CR_BUILD_BENCH)
|
||||
add_executable(cr_bench tests/bench.cpp)
|
||||
target_include_directories(cr_bench PRIVATE
|
||||
|
||||
Reference in new issue
Block a user