Test harness for ui tests of compiler diagnostics
APACHE-2.0 License
Allow later globs to override pass/fail status of earlier globs (#174)
t.compile_fail("tests/ui/*.rs");
t.pass("tests/ui/ok.rs");
This will test tests/ui/ok.rs
expecting it to pass, and all the rest of the contents of tests/ui
expecting them to fail. Previous versions of trybuild would test tests/ui/ok.rs
expecting it to fail and again expecting it to pass, which can't both be true.
Greatly reduce test execution time by compiling test cases in parallel on toolchains which support https://github.com/rust-lang/cargo/issues/10496. Example from the serde crate's test suite, which becomes 16x faster on my machine:
$ time cargo test --test compiletest
real 0m21.442s
user 0m15.288s
sys 0m6.317s
$ time cargo test --test compiletest
real 0m1.290s
user 0m20.761s
sys 0m6.962s