Open Laeeth opened 5 years ago
Note that it's just rust code that generates random headers. So we could use directly just by creating relevant dpp file in a bash script.
bindgen with quickchecking quickchecking generates random C headers to test bindgen using the quickcheck property testing crate. When testing bindgen with quickchecking, the generated header files are passed to bindgen's csmith-fuzzing/predicate.py script. If that script fails, quickchecking panics, and you can report an issue containing the test case!
Prerequisites Running Prerequisites
Also they have a driver for csmith. https://github.com/rust-lang/rust-bindgen/blob/master/csmith-fuzzing/README.md
To start with you could just check dpp doesn't choke on their headers, linked here:
https://github.com/rust-lang/rust-bindgen
Someday we can check the D declaration is right but it's not urgent.
They have a cool fuzzer here:
https://github.com/rust-lang/rust-bindgen/blob/master/tests/quickchecking/src/fuzzers.rs