-
Notifications
You must be signed in to change notification settings - Fork 700
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable Cargo features for quickchecking crate #1180
Enable Cargo features for quickchecking crate #1180
Conversation
Logic to enable/disable special casing (due to known issues #550, #684, and #1153) has been exposed as features in the `quickchecking` crate's Cargo.toml file and corresponding `cfg` attributes in the source. In addition to adding Cargo features, this PR represents the following: - Documentation in `bindgen`'s CONTRIBUTING.md that points to a new README.md located in the `quickchecking` crate's directory. - The Debug trait was implemented for the `HeaderC` type. This enables failing property tests to be reported as C source code rather than a Rust data structure. - The ArrayDimensionC type is now used in header generation for union, struct, and basic declarations. Thanks for taking a look and for any feedback! Closes #1169 r? @fitzgen
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me with a couple nitpicks below -- thanks @Snewt !
CONTRIBUTING.md
Outdated
@@ -224,6 +225,14 @@ uncover hidden bugs is by running `csmith` to generate random headers to test | |||
|
|||
See [./csmith-fuzzing/README.md](./csmith-fuzzing/README.md) for details. | |||
|
|||
### Property tests for `bindgen` with `quickchecking` | |||
|
|||
The `tests/quickchecking` crate genertates property tests for `bindgen`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
genertates -> generates
`cargo run`. Additional configuration is exposed through the binary's CLI. | ||
|
||
``` | ||
$ cargo run --bin=quickchecking -- -h |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it makes sense to only show the -h
or --help
command invocation, and leave out the command's output. As we add more options/flags the output will change and it is likely we will forget to update this code block.
@bors-servo delegate+ |
✌️ @Snewt can now approve this pull request |
- Fixed misspelling introduced in CONTRIBUTING.md - Remove `quickchecking -h` output from README.md
@bors-servo r=fitzgen |
📌 Commit 2778fe5 has been approved by |
Enable Cargo features for quickchecking crate Logic to enable/disable special casing (due to known issues #550, #684, and #1153) has been exposed as features in the `quickchecking` crate's Cargo.toml file and corresponding `cfg` attributes in the source. In addition to adding Cargo features, this PR represents the following: - Documentation in `bindgen`'s CONTRIBUTING.md that points to a new README.md located in the `quickchecking` crate's directory. - The Debug trait was implemented for the `HeaderC` type. This enables failing property tests to be reported as C source code rather than a Rust data structure. - The ArrayDimensionC type is now used in header generation for union, struct, and basic declarations. Thanks for taking a look and for any feedback! Closes #1169 r? @fitzgen
☀️ Test successful - status-travis |
Logic to enable/disable special casing (due to known issues #550, #684, and #1153) has been exposed as features in the
quickchecking
crate's Cargo.toml file and correspondingcfg
attributes in the source.In addition to adding Cargo features, this PR represents the following:
bindgen
's CONTRIBUTING.md that points to a new README.md located in thequickchecking
crate's directory.HeaderC
type. This enables failing property tests to be reported as C source code rather than a Rust data structure.Thanks for taking a look and for any feedback!
Closes #1169
r? @fitzgen