roc/crates/compiler/test_syntax/fuzz
Joshua Warner bfeddc470a
Move syntax tests to a dedicated crate
* test_fmt moves out of fmt crate
* test_parse _mostly_ moves out of parse crate and into `test_snapshots.rs` (some simple tests remain)
* now there's only two fuzz targets, fuzz_expr and fuzz_module, that cover both parsing and formatting
* added a system to auto-add new snapshot entries for new test files
* took some commented-out tests in `test_parse` and converted them to snapshot tests
* moved test_fmt's verification of formatting consistency into test_snapshots
* fixed a huge derp on my part where the fmt fuzzer in #4758 was completely useless (broken by refactoring just prior to submitting the PR)
* fixed a formatting bug found by fuzzing (bound_variable.expr.roc) - that I missed earlier due to ^^^ that derp
* no longer have roc_test_utils as a dependency in fmt - which was causing problems for the wasm build
2022-12-26 22:50:24 -08:00
..
fuzz_targets Move syntax tests to a dedicated crate 2022-12-26 22:50:24 -08:00
.gitignore Move syntax tests to a dedicated crate 2022-12-26 22:50:24 -08:00
Cargo.lock Move syntax tests to a dedicated crate 2022-12-26 22:50:24 -08:00
Cargo.toml Move syntax tests to a dedicated crate 2022-12-26 22:50:24 -08:00
dict.txt Move syntax tests to a dedicated crate 2022-12-26 22:50:24 -08:00
README.md Move syntax tests to a dedicated crate 2022-12-26 22:50:24 -08:00

fuzz

To setup fuzzing you will need to install cargo-fuzz and run with rust nightly:

$ cargo install cargo-fuzz
$ cargo +nightly fuzz run -j<cores> <target> -- -dict=../parse/fuzz/dict.txt

The different targets can be found by running cargo fuzz list.

When a bug is found, it will be reported with commands to run it again and look for a minimized version. If you are going to file a bug, please minimize the input before filing the bug.