Commit 82a73f6
committed
Strengthen test suite: coverage, property tests, mutation testing
Add three complementary layers of test-quality tooling and close the
gaps they surfaced. The suite was strong but entirely example-based:
coverage proved lines ran, not that a wrong result would fail a test.
Tooling
- c8 coverage (.c8rc.json) with source-map remapping onto TypeScript;
coverage:ci gate wired into the PR pipeline.
- fast-check property tests (test/prop/) exploring the input space of the
pure parsing/encoding core: LEB128 round-trips + cross-decoder agreement,
Cursor crash-fuzz, readForm/skipByForm byte parity, ScVal full-width
bigint round-trips, wasm-section tiling/strip idempotence, indexForAddress
vs a linear oracle, mnemonic-rendering totality.
- Stryker mutation testing (stryker.conf.json) mutating the TypeScript and
rebuilding once via buildCommand; DAP child-process tests excluded via a
Stryker-specific mocha config. Runs as a non-blocking nightly/on-demand
CI job, not on the PR critical path.
Bugs found and fixed (test-first)
- stripTypedefs looped forever on a cyclic DWARF typedef chain (DoS hang on
malformed debug info); added a visited-set cycle guard.
- ScVal integer encoding accepted invalid values: u32/i32 took floats and
out-of-range values verbatim, and wide ints silently wrapped on overflow
(2^64 -> 0). Added integer + range validation for all integer types.
Coverage gaps closed
- LiveBackend, KometClient failure/timeout paths, the DWARF v5 line-program
path, and ScVal error branches.
- Removed one of three duplicated LEB128 decoders (TypeRegistry now reuses
Cursor); a property test pins the remaining two in agreement.
484 -> 566 tests; lines 89.9% -> 92.9%, branches 85.6% -> 88.0%.1 parent c758afe commit 82a73f6
23 files changed
Lines changed: 3844 additions & 45 deletions
File tree
- .github/workflows
- src
- dwarf
- soroban
- wasm
- test
- prop
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
7 | 11 | | |
8 | 12 | | |
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
| 18 | + | |
| 19 | + | |
14 | 20 | | |
15 | 21 | | |
16 | 22 | | |
| |||
33 | 39 | | |
34 | 40 | | |
35 | 41 | | |
36 | | - | |
37 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
4 | 7 | | |
5 | 8 | | |
6 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
7 | 21 | | |
8 | 22 | | |
9 | 23 | | |
| |||
0 commit comments