summaryrefslogtreecommitdiff
path: root/lazy-static/compiletest/tests/compile_tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'lazy-static/compiletest/tests/compile_tests.rs')
-rw-r--r--lazy-static/compiletest/tests/compile_tests.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/lazy-static/compiletest/tests/compile_tests.rs b/lazy-static/compiletest/tests/compile_tests.rs
new file mode 100644
index 0000000..d908077
--- /dev/null
+++ b/lazy-static/compiletest/tests/compile_tests.rs
@@ -0,0 +1,19 @@
+extern crate compiletest_rs as compiletest;
+
+fn run_mode(mode: &'static str) {
+ let mut config = compiletest::Config::default();
+ config.mode = mode.parse().expect("Invalid mode");
+ config.src_base = ["tests", mode].iter().collect();
+
+ config.verbose = true;
+
+ config.target_rustcflags = Some("-L target/debug/ -L target/debug/deps/".to_owned());
+ config.clean_rmeta();
+
+ compiletest::run_tests(&config);
+}
+
+#[test]
+fn compile_test() {
+ run_mode("compile-fail");
+}