summaryrefslogtreecommitdiff
path: root/tests/tests.rs
AgeCommit message (Collapse)Author
2022-03-15tests: Remove testing_only_libclang_4 and expectationsDarren Kulp
2022-02-18Put vtable generation behind a flag for now.Emilio Cobos Álvarez
2022-02-18tests: Remove clang-3.9 expectationsDarren Kulp
2021-12-29Remove deprecation and ReplaceMikuroXina
2021-12-29Replace generate with gen in testMikuroXina
2021-12-07Fix warnings on testsMikuroXina
2021-07-26docs: Fix rustfmt install steps.Emilio Cobos Álvarez
Fixes #2080
2021-04-24Support emitting Makefile-syntax depfiles like gcc/clang/rustc.Adam Perry
Needed to auto-bindgen with a ninja build without the build graph going stale.
2021-03-22Add test infrastructure for ParseCallbacksJethro Beekman
2021-03-11Fix typo in roundtrip test error messageJethro Beekman
2021-02-15tests: Guess modern libclang version when we fail to parse a version.Emilio Cobos Álvarez
Should fix the test failures described in #1991 and #1975 on modern Mac.
2021-01-10Use absolute paths for unsaved files passed to clang and prepend -include ↵Andrey Pushkar
directives to them. Fixes #1771 Closes #1857
2020-11-25tests: Added option to hand check test differences.Volker Weißmann
2020-07-20Remove testing_only_libclang_3_8 and expectationsDarren Kulp
2020-07-01tests: Check that command_line_args round-trips.Emilio Cobos Álvarez
Fixes #1818.
2020-07-01tests: Minor simplification of test harness.Emilio Cobos Álvarez
We were never returning Ok(None), so not sure why this was ever there.
2020-06-29Emit bindgen version in generated headerDarren Kulp
Update expectations
2020-06-29Disable generated comment in expectations testDarren Kulp
2020-06-15tests: Fix rustfmt check to allow for RUSTFMT env vars.Emilio Cobos Álvarez
2020-04-27Run `cargo fix --edition`Joshua Nelson
2020-02-17var: Constant arrays of const elements should not generate `static mut`s.Emilio Cobos Álvarez
Fixes #1727
2019-12-11tests: Minor rustc warning fixes.Emilio Cobos Álvarez
2019-10-14tests: Remove support for test directive that is no longer used.Emilio Cobos Álvarez
ae0fdf7a5519a175d887389c80399234637bdc29 changed the setup for the only test that actually used this.
2019-10-14Run `cargo fmt` on the main crate.Emilio Cobos Álvarez
2019-10-14tests: Fix some warning in the test crate.Emilio Cobos Álvarez
2019-10-14Add llvm 9.0 to CI.Emilio Cobos Álvarez
2019-10-14tests: Look at expectations/tests/libclang-9 expectations.Emilio Cobos Álvarez
2019-10-14tests: Look at the more specific tests first, but don't require specific ↵Emilio Cobos Álvarez
expectations for all llvm versions.
2019-09-17Rustfmt.Emilio Cobos Álvarez
2019-05-15Update tests to account for changed #[link_name] attribute emission.Michael Woerister
2019-03-20Enable logging in test suiteJethro Beekman
2019-03-13Add BINDGEN_EXTRA_CLANG_ARGS env variablejhwgh1968
2019-02-03ir: Ignore constructors with bogus spellings.Emilio Cobos Álvarez
2019-01-16Add `BINDGEN_OVERWRITE_EXPECTED` for recording testsChristian Legnitto
Currently when tests are run all expectations are overwritten. This makes it hard to debug a failing test, as every time one reruns `cargo test` the expectation is updated and subsequently passes. With this change we now check the `BINDGEN_OVERWRITE_EXPECTED` env variable. If set, we overwrite the expectation. If not, the contents stay the same and the test continues to fail.
2018-04-03Now that we have stuff that depends on libclang-5 we need to do this.Emilio Cobos Álvarez
2018-03-04Untry.Emilio Cobos Álvarez
Use the ? operator instead of try, and add some more uses of it on Option<> that were straight-forward.
2017-10-27lib: rustfmt output to stdoutManas Karekar
Simplify the rustfmt and write mechanism. Use rustfmt generated string to allow writing to stdout or to rustfmt a file.
2017-10-11Give explicit target to builder tests.Sergey Pepyakin
2017-10-11Make the default target for expectation files as x86_64-unknown-linuxLiran Ringel
2017-09-07Just check for `rustfmt`; don't install itNick Fitzgerald
2017-09-07Also print rustfmt's stderr for expectationsNick 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-09-07Run `rustfmt` on the test actual output and expectationsNick Fitzgerald
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-07-20Use a platform-neutral header for test_multiple_header_calls_in_builderXidorn Quan
2017-07-20Skip no_system_header_includes test for WindowsXidorn Quan
2017-07-20Have tests targetting Linux by default on WindowsXidorn Quan
2017-07-13Add the ability to dump preprocessed input headersNick Fitzgerald
This is useful when debugging bindgen, using C-Reduce on an input to bindgen, or for constructing portable test cases when filing issues against bindgen. Fixes #811
2017-07-07Auto merge of #796 - tz70s:master, r=fitzgenbors-servo
Automatically detect libclang version when testing Automatically detect libclang version when testing and use approppriate expectation files. Ref to issue #794.
2017-07-08Automatically detect libclang version when testingtz70s
Automatically detect libclang version when testing and use approppriate expectation files. Ref issue #794.