Upgrade to 'compiletest' 0.3.

This commit is contained in:
Sergio Benitez 2017-09-21 17:17:40 -07:00
parent f9f4822941
commit 78cc1bda7e
2 changed files with 5 additions and 7 deletions

View File

@ -20,7 +20,7 @@ ordermap = "0.2"
log = "0.3"
[dev-dependencies]
compiletest_rs = "0.2.9"
compiletest_rs = "0.3.1"
[build-dependencies]
yansi = "0.3"

View File

@ -1,14 +1,12 @@
extern crate compiletest_rs as compiletest;
use std::path::PathBuf;
use compiletest::common::Mode;
fn run_mode(mode: &'static str) {
fn run_mode(mode: Mode) {
let mut config = compiletest::Config::default();
let cfg_mode = mode.parse().expect("Invalid mode");
config.mode = cfg_mode;
config.mode = mode;
config.src_base = PathBuf::from(format!("tests/{}", mode));
// config.link_deps();
let flags = [
"-L crate=../target/debug/",
@ -21,5 +19,5 @@ fn run_mode(mode: &'static str) {
#[test]
fn compile_test() {
run_mode("compile-fail");
run_mode(Mode::CompileFail);
}