mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-16 12:55:23 +01:00
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
This commit is contained in:
parent
72e84cb297
commit
31b392fe3a
12 changed files with 23 additions and 47 deletions
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue