From 58c7af1f1f49c0f8faa25aeda62b7bb43c72491f Mon Sep 17 00:00:00 2001 From: Perry Kundert Date: Wed, 9 Dec 2020 15:17:55 -0800 Subject: [PATCH] Correct compiletest build issues --- sm/tests/tests.rs | 2 +- .../tests/compile-fail/macros/sm/private-machine-state.rs | 2 +- test_suite/tests/compiletest.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sm/tests/tests.rs b/sm/tests/tests.rs index 6bbb326..0892709 100644 --- a/sm/tests/tests.rs +++ b/sm/tests/tests.rs @@ -15,6 +15,6 @@ fn run_mode(mode: &str) { #[test] fn compile_test() { - run_mode("compile-fail"); run_mode("run-pass"); + run_mode("compile-fail"); } diff --git a/test_suite/tests/compile-fail/macros/sm/private-machine-state.rs b/test_suite/tests/compile-fail/macros/sm/private-machine-state.rs index e331f20..d90f5d2 100644 --- a/test_suite/tests/compile-fail/macros/sm/private-machine-state.rs +++ b/test_suite/tests/compile-fail/macros/sm/private-machine-state.rs @@ -13,5 +13,5 @@ fn main() { use Lock::*; let _sm = Machine(Locked); - //~^ ERROR expected function, found struct `Machine` + //~^ ERROR expected function, tuple struct or tuple variant, found struct `Machine` } diff --git a/test_suite/tests/compiletest.rs b/test_suite/tests/compiletest.rs index 519a146..d2b5da4 100644 --- a/test_suite/tests/compiletest.rs +++ b/test_suite/tests/compiletest.rs @@ -6,7 +6,7 @@ fn run_mode(mode: &'static str) { let mut config = compiletest::Config::default(); config.mode = mode.parse().expect("invalid mode"); - config.target_rustcflags = Some("-L deps/target/debug/deps".to_owned()); + config.target_rustcflags = Some("-L ../target/debug -L deps/target/debug/deps".to_owned()); if let Ok(name) = env::var("TESTNAME") { config.filter = Some(name); } @@ -18,6 +18,6 @@ fn run_mode(mode: &'static str) { #[test] fn compile_fail() { - run_mode("compile-fail"); run_mode("run-pass"); + run_mode("compile-fail"); }