Name |
Date |
Size |
#Lines |
LOC |
||
---|---|---|---|---|---|---|
.. | - | - | ||||
src/ | 12-May-2024 | - | 870 | 605 | ||
tests/ | 12-May-2024 | - | 97 | 81 | ||
.gitignore | D | 12-May-2024 | 11 | 2 | 1 | |
Cargo.toml | D | 12-May-2024 | 833 | 33 | 26 | |
README.md | D | 12-May-2024 | 1.2 KiB | 40 | 27 |
README.md
1# Property tests for `bindgen` with `quickchecking` 2 3`quickchecking` generates random C headers to test `bindgen` 4using the [`quickcheck`][quickcheck] property testing crate. When testing 5`bindgen` with `quickchecking`, the generated header files are passed to 6`bindgen`'s `csmith-fuzzing/predicate.py` script. If that script fails, 7`quickchecking` panics, and you can report an issue containing the test case! 8 9<!-- START doctoc generated TOC please keep comment here to allow auto update --> 10<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> 11 12 13- [Prerequisites](#prerequisites) 14- [Running](#running) 15 16<!-- END doctoc generated TOC please keep comment here to allow auto update --> 17 18## Prerequisites 19 20Requires `python3` to be in `$PATH`. 21 22Many systems have `python3` by default but if your OS doesn't, its package 23manager may make it available: 24 25``` 26$ sudo apt install python3 27$ brew install python3 28$ # Etc... 29``` 30 31## Running 32 33Run `quickchecking` binary to generate and test fuzzed C headers with 34`cargo run`. Additional configuration is exposed through the binary's CLI. 35 36``` 37$ cargo run --bin=quickchecking -- -h 38``` 39[quickcheck]: https://github.com/BurntSushi/quickcheck 40