Commit b1689aa
test: Add comprehensive CRG C test suite
- Add property-based tests (14 tests) validating invariants:
* Language detection idempotence
* Kanren logic engine correctness (unification, forward chaining)
* Weak point consistency and location validity
* Report statistics coherence
* Error recovery on edge cases
- Add E2E tests (12 tests) covering full pipeline:
* Self-scan dogfooding: analyze panic-attack source itself
* Vulnerable examples scanning
* Full analysis pipeline: file → language → rules → report
* Report serialization (JSON/YAML)
* Deterministic analysis verification
* Directory vs file consistency
- Add aspect tests (18 tests) for cross-cutting concerns:
* Error handling: malformed code, deeply nested, long lines, mixed encodings, NUL bytes, UTF-8 BOM
* Performance scaling: file count, memory bounded behavior
* Concurrency: parallel analysis thread safety
* Security evasion: comment/string/encoding evasion resilience
- Enhance benchmarks (7 criterion benchmarks):
* Add taint analysis, rule evaluation, location extraction, stats calculation
* Maintain existing language detection and family classification
* Self-scan dogfooding baseline
- Remove fake fuzz: Delete tests/fuzz/placeholder.txt (rsr-template residue, 0 real fuzz logic)
- Add proptest v1.4 as dev dependency for future advanced property testing
Test status: All 202+ tests passing, cargo test + cargo bench --no-run verified
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 308c29b commit b1689aa
10 files changed
Lines changed: 1359 additions & 68 deletions
File tree
- .machine_readable/6a2
- benches
- tests
- fixtures
- fuzz
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
| 7 | + | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
15 | 27 | | |
16 | 28 | | |
17 | 29 | | |
18 | 30 | | |
19 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
0 commit comments