summaryrefslogtreecommitdiff
path: root/bindgen-integration/cpp/Test.h
diff options
context:
space:
mode:
authorShea Newton <sheanewt@gmail.com>2017-12-03 18:29:06 -0800
committerShea Newton <sheanewt@gmail.com>2017-12-04 19:39:03 -0800
commitb4ba0923fb00c916584fd2f79455bf179efa1558 (patch)
treeffce515d78d87b4f829ff961eb7333f7e83b950b /bindgen-integration/cpp/Test.h
parentd076b9d5ebc90a6f741e3d94fe108ad4b274b451 (diff)
Quickchecking crate CLI
Prior to this commit the quickchecking crate used for generating proprty tests for bindgen was a [lib] target and had configurations that required commenting/uncommenting code to enable/disable. This meant it was inconvienent/prohibitive to configure the property tests on a per-run basis. This commit reorganizes the `quickchecking` crate to provide both [lib] and [[bin]] targets in order to expose those configurations through a CLI. The configurations that are exposed through the [[bin]] target's CLI are: * Count/number of tests to run. * Directory to provide fuzzed headers * Generation range corresponding to the range quickcheck uses to * generate arbitrary. __Usage from the__ `tests/quickchecking` __directory__ ```bash quickchecking 0.2.0 Bindgen property tests with quickcheck. Generate random valid C code and pass it to the csmith/predicate.py script USAGE: quickchecking [OPTIONS] FLAGS: -h, --help Prints help information -V, --version Prints version information OPTIONS: -c, --count <COUNT> Count / number of tests to run. Running a fuzzed header through the predicate.py script can take a long time, especially if the generation range is large. Increase this number if you're willing to wait a while. [default: 2] -p, --path <PATH> Optional. Preserve generated headers for inspection, provide directory path for header output. [default: None] -r, --range <RANGE> Sets the range quickcheck uses during generation. Corresponds to things like arbitrary usize and arbitrary vector length. This number doesn't have to grow much for that execution time to increase significantly. [default: 32] ``` Because the actual work of running the property tests moved to the [[bin]] target, rather than duplicate that code in the `quickchecking` crate's tests directory, some actual (very basic) tests for the `quickchecking` crate were added. *Note: I'm not attached to any of the option flags, if there are better characters/words for any of the options I've exposed I'll be happy to revise! Thanks for taking a look, looking forward to feedback! Closes #1168 r? @fitzgen
Diffstat (limited to 'bindgen-integration/cpp/Test.h')
0 files changed, 0 insertions, 0 deletions