summaryrefslogtreecommitdiff
path: root/tests/stylo_sanity.rs
AgeCommit message (Collapse)Author
2022-03-15tests: Remove testing_only_libclang_4 and expectationsDarren Kulp
2022-02-18tests: Remove clang-3.9 expectationsDarren Kulp
2021-12-29Remove deprecation and ReplaceMikuroXina
2021-12-29Replace generate with gen in testMikuroXina
2021-10-27Fix warningsMikuroXina
2021-02-18Rename whitelist -> allowlist and blacklist -> blocklistMarcel Hlopko
For the commandline arguments I added undocumented aliases to old flags, to stay backwards compatible.
2020-07-20Remove testing_only_libclang_3_8 and expectationsDarren Kulp
2020-06-29Disable generated comment in expectations testDarren Kulp
2019-10-14Add llvm 9.0 to CI.Emilio Cobos Álvarez
2019-09-17Rustfmt.Emilio Cobos Álvarez
2017-11-02The stylo sanity test should use `blacklist_type`Nick Fitzgerald
...instead of the deprecated `hide_type`.
2017-09-07Print time phases for the stylo sanity testNick Fitzgerald
2017-09-07Use `quote` instead of `syntex` for Rust code generationNick Fitzgerald
The `syntex` crate is unmaintained. It is slow to build, and additionally it requires that we pre-process `src/codegen/mod.rs` before we build the `bindgen` crate. The `quote` crate provides similar quasi-quoting functionality, is maintained, and builds faster. It doesn't have a typed API or builders, however; it only deals with tokens. Before this commit: ``` $ cargo clean; cargo build <snip> Finished dev [unoptimized + debuginfo] target(s) in 98.75 secs ``` After this commit: ``` $ cargo clean; cargo build <snip> Finished dev [unoptimized + debuginfo] target(s) in 46.26 secs ``` Build time is cut in half! But what about run time? Before this commit: ``` Generated Stylo bindings in: Duration { secs: 3, nanos: 521105668 } ``` After this commit: ``` Generated Stylo bindings in: Duration { secs: 3, nanos: 548797242 } ``` So it appears to be about 20ms slower at generating Stylo bindings, but I suspect this is well within the noise. Finally, this also lets us remove that nasty `mem::transmute` inside `bindgen::ir::BindgenContext::gen` that was used for the old `syntex` context. Now `BindgenContext` doesn't have a lifetime parameter either. This should make it easier to revisit doing our analyses in parallel with `rayon`, since that context was one of the things that made it hard for `BindgenContext` to implement `Sync`. Fixes #925
2017-08-21Rename `TypeKind::Named` to `TypeKind::TypeParam`Anna Liao
Also renames a bunch of other things referring to named types to refer to type parameters. Fixes #915
2017-05-25Allow asserting expectations across different libclang versionsNick Fitzgerald
Rather than having a tests that we only run if libclang >= 3.9, this makes the test suite dynamically detect when we have different expectations for different libclang versions. It does this by adding `tests/expectations/tests/libclang-$VERSION` directories, and `testing_only_libclang_$VERSION` features that are consulted when the usual expectation file does not exist. Fixes #697
2017-05-05Emit `PhantomData<UnsafeCell<T>>` members for all generic parametersKowasaki
This makes generated generic structs lifetime invariant, since we cannot know the C++ type's true variance. Fixes #506
2017-04-12Add a Stylo bindings sanity testNick Fitzgerald
This commit adds a sanity test that we can generate bindings for Stylo without any errors. I tried to make this a `#[bench]` but each iteration takes 36 seconds on my machine, which made the `#[bench]` take *way* too long. Instead, there is a commented out `panic!` that can be uncommented to get a log of how long it took.