test: proptest property testing + cargo-fuzz fuzzing for donglora-cobs
This commit is contained in:
8 files changed
+567
-9
No files matched your search
@@ -21,11 +21,21 @@ benchmark-optimized for streaming applications.
|
||||
## Testing
|
||||
|
||||
```sh
|
||||
# Unit tests + property tests + interop
|
||||
cargo test -p donglora-cobs
|
||||
|
||||
# Fuzz testing (requires cargo-fuzz: cargo install cargo-fuzz)
|
||||
cd crates/donglora-cobs
|
||||
cargo +nightly fuzz run fuzz_decode -- -max_total_time=60
|
||||
cargo +nightly fuzz run fuzz_roundtrip -- -max_total_time=60
|
||||
```
|
||||
|
||||
Tests include:
|
||||
- 18 canonical COBS vectors (Wikipedia / IEEE/ACM spec)
|
||||
- Round-trip verification for various payload sizes
|
||||
- 8 interop tests cross-validating against `corncobs` (dev-dependency)
|
||||
- 8 interop tests cross-validating against `corncobs`
|
||||
- 500 randomized round-trip payloads verified against `corncobs`
|
||||
- **5 proptest properties** (~1280 random inputs): round-trip, interop
|
||||
encode/decode both directions, length bounds, decode-never-panics
|
||||
- **2 fuzz targets**: `fuzz_decode` (arbitrary bytes → must not panic)
|
||||
and `fuzz_roundtrip` (encode→decode must match)
|
||||
Reference in new issue
Block a user