diff options
author | David Tolnay <dtolnay@gmail.com> | 2019-05-06 10:35:30 -0700 |
---|---|---|
committer | David Tolnay <dtolnay@gmail.com> | 2019-05-06 10:35:30 -0700 |
commit | 320efb2ae98e815be196609d7ba600a78cf6727f (patch) | |
tree | 75aa7f2799f85f994021a74381fd7856de1656d9 /tests/compiletest.rs | |
parent | d06cf4100446bb977ec6c21d491bec604b2fd349 (diff) | |
download | remain-320efb2ae98e815be196609d7ba600a78cf6727f.tar.gz |
Switch ui tests to trybuild
Diffstat (limited to 'tests/compiletest.rs')
-rw-r--r-- | tests/compiletest.rs | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/tests/compiletest.rs b/tests/compiletest.rs index 9c2e4c5..2e861bf 100644 --- a/tests/compiletest.rs +++ b/tests/compiletest.rs @@ -1,25 +1,6 @@ +#[rustc::attr(not(nightly), ignore)] #[test] fn ui() { - if !version_check::is_nightly().unwrap() { - return; - } - - let mut config = compiletest::Config { - mode: compiletest::common::Mode::Ui, - src_base: std::path::PathBuf::from("tests/ui"), - target_rustcflags: Some(String::from( - "\ - --edition=2018 \ - -Z unstable-options \ - --extern remain \ - ", - )), - build_base: std::path::PathBuf::from("target/ui"), - ..Default::default() - }; - - config.link_deps(); - config.clean_rmeta(); - - compiletest::run_tests(&config); + let t = trybuild::TestCases::new(); + t.compile_fail("tests/ui/*.rs"); } |