From 31b392fe3a6961596a0bd4e1bb24c0da2a9b7b42 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Wed, 6 Nov 2019 19:05:37 -0500 Subject: CI: replace compiletest-rs with trybuild We use compiletest to run compile-fail tests but compiletest depends on compiler internals so it breaks every now and then and requires nightly. With trybuild we can also run compile-fail tests but it works on stable and it already has reached version 1.0 --- tests/single.rs | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'tests') diff --git a/tests/single.rs b/tests/single.rs index 01b8031..b5d480c 100644 --- a/tests/single.rs +++ b/tests/single.rs @@ -1,19 +1,7 @@ -use std::path::PathBuf; - -use compiletest_rs::{common::Mode, Config}; +use trybuild::TestCases; #[test] fn ui() { - let mut config = Config::default(); - - config.mode = Mode::Ui; - config.src_base = PathBuf::from("ui/single"); - config.target_rustcflags = Some( - "--edition=2018 -L target/debug/deps -Z unstable-options --extern rtfm --extern lm3s6965" - .to_owned(), - ); - config.link_deps(); - config.clean_rmeta(); - - compiletest_rs::run_tests(&config); + let t = TestCases::new(); + t.compile_fail("ui/single/*.rs"); } -- cgit v1.2.3