Remove needless pushd that was causing trouble with `set -e`
Remove old osx workaround for rvm
Add shebang line
Fix target descriptor
Support LLVM versions 9.0.1+
The changes reflected in this PR include the logic to test the
`quickcheking` crate itself. Rather that just validate that the
`quickchecking` crate builds in CI with `cargo check`, we can run
now `cargo test`.
- Remove `whitelistable` and `blacklistable` types.
- Rename test crate directory from `property_test` to `quickchecking`.
- Add new CI job that checks that this crate continues to build.
- Revise matching logic to be more idomatic.
- Phase out modular arithmetic in favor of `gen_range`.
- Incorporate `unreachable!` into match statements.
- Revise logic for accessing random element of vector, favor `choose`
over `nth`.
- Proper punctuation and capitalization in comments.
- Using actual structures rather than converting everything to strings
in order to leverage type system.
- Add `#![deny(missing_docs)]` and filled in documentation required for
the project to build again.
- Add special case logic so we don't generate structs with `long double`
fields as it will cause tests to fail unitl issue \#550 is resolved
Note on making sure we don't lose test cases we're interested in
preserving:
We're copying the directories `TempDir` makes so we get things like
this:
```
├── bindgen_prop.1WYe3F5HZU1c
│ └── prop_test.h
├── bindgen_prop.H4SLI1JX0jd8
│ └── prop_test.h
```
I'm not sure that `TempDir` makes any claims about uniqueness, so
collisions
probably aren't impossible. I'm up for any suggestions on a more
bulletproof
solution.
_Tasks not addressed by this PR:_
* TODO: Add `cargo features` logic to allow generating problematic code.
* TODO: Make a [bin] target with CLI to manage test settings.
* TODO: Whitelisting and opaque types.
* TODO: Generate bitfields, C++, I-bogus-codegen cases.
Figured this would be a good point to update the PR but if any of the
above TODO
items should be incorporated before moving forward I'm up for it!
Thanks for taking another look!
r? @fitzgen
Our CI is performing multiple different jobs:
* For every libclang version we support:
* With both debug and release profiles:
* Generating bindings from our test headers, with and without extra
assertions, and asserting there is no diff from the expectations.
* Compiling and testing the generated bindings.
* Compiling and testing the bindgen-integration crate.
* Testing the md book.
* Asserting that there aren't any system includes in any of the test headers.
* Asserting that all the pub functions have doc comments.
We were previously doing these things sequentially for each libclang
version. This commit breaks these jobs up explicitly and runs each of them one
at a time so that they can each be run in parallel, on different Travis CI
machines.
There is no guarantee that the system running the tests has the header file, let
alone the same version of it that you have. Any test with such an include
directive won't reliably produce the consistent bindings across systems.
This commit adds a Users Guide, built with [mdbook][] (the same tool used
by *The Rust Book*).
It moves all the user documentation from the README.md into the Users Guide. It
leaves the README.md as a splash page featuring an example of what `bindgen` is
and does, a link to the Users Guide, a link to the docs.rs/bindgen API reference
documentation, and a link to CONTRIBUTING.md.
It ensures that the Users Guide builds with `mdbook`, and all code snippets
within it build as doctests and pass, on every CI run.
Finally, it builds and uploads the Users Guide every time CI passes on the
master branch.
[mdbook]: https://github.com/azerupi/mdBook
This commit defines a new set of assertion macros that are only checked in
testing/CI when the `testing_only_extra_assertions` feature is enabled. This
makes it so that *users* of bindgen that happen to be making a debug build don't
enable all these extra and expensive assertions.
Additionally, this removes the `testing_only_assert_no_dangling_items` feature,
and runs the assertions that were previously gated on that feature when the new
`testing_only_extra_assertions` feature is enabled.
This commit ensures that all of the cargo features we have that only exist for
CI/testing purposes, and aren't for external consumption, have a "testing_only_"
prefix.
First, update our existing 3.8.X and 3.9.X libclang testing versions to their
latest point releases. Second, add testing on the latest 3.7.X release and the
latest 4.0.X release.
This commit makes Travis CI reject code which has not been run through the
latest version of `rustfmt`.
Additionally, it refactors our CI testing out into a couple little scripts.
The wait time to get OSX machines on Travis CI is *way* too long at the
moment. We'll be able to revert this commit in the future, once Travis
CI adds more OSX machines to their cluster, hopefully.