rtic/tests/cfail.rs

18 lines
439 B
Rust
Raw Normal View History

2017-07-18 22:14:39 +02:00
extern crate compiletest_rs as compiletest;
use std::path::PathBuf;
use compiletest::common::Mode;
use compiletest::Config;
2017-07-18 22:14:39 +02:00
#[test]
fn cfail() {
let mut config = Config::default();
2017-07-18 22:14:39 +02:00
config.mode = Mode::CompileFail;
config.src_base = PathBuf::from(format!("tests/cfail"));
2018-04-16 21:32:52 +02:00
config.target_rustcflags =
Some("-C panic=abort -L target/debug -L target/debug/deps ".to_string());
2017-07-18 22:14:39 +02:00
compiletest::run_tests(&config);
}