Remove dead branches from the fast translation
Drop predicate operands and unreachable arms that dispatch and readable invariants fix, and extend the exhaustive sweep to cover every branch side. Gate coverage on branch coverage as well.
This commit is contained in:
1 parent
3bb5d062ff
commit
73e371fb40
4 files changed
+101
-172
No files matched your search
+10
-4
@@ -1,7 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
# Build with Clang source-based coverage and require 100% line coverage of the
|
||||
# summarised implementation (`src/fast.cpp`). `exhaustive_test` enumerates
|
||||
# small readable instances deterministically and is sufficient on its own.
|
||||
# Build with Clang source-based coverage and require 100% line and branch
|
||||
# coverage of the summarised implementation (`src/fast.cpp`). `exhaustive_test`
|
||||
# enumerates small readable instances deterministically and is sufficient on its
|
||||
# own.
|
||||
set -euo pipefail
|
||||
|
||||
here="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
@@ -39,8 +40,13 @@ report() {
|
||||
output="$(report)"
|
||||
printf '%s\n' "$output"
|
||||
line_cover="$(printf '%s\n' "$output" | awk '/fast\.cpp/ { print $10 }')"
|
||||
branch_cover="$(printf '%s\n' "$output" | awk '/fast\.cpp/ { print $13 }')"
|
||||
if [[ "$line_cover" != "100.00%" ]]; then
|
||||
echo "fast.cpp line coverage is $line_cover, expected 100.00%" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "fast.cpp: 100.00% line coverage"
|
||||
if [[ "$branch_cover" != "100.00%" ]]; then
|
||||
echo "fast.cpp branch coverage is $branch_cover, expected 100.00%" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "fast.cpp: 100.00% line and branch coverage"
|
||||
Reference in new issue
Block a user