]> git.proxmox.com Git - cargo.git/blob - vendor/lazy_static-1.0.0/tests/compile_tests.rs
New upstream version 0.24.0
[cargo.git] / vendor / lazy_static-1.0.0 / tests / compile_tests.rs
1 #![cfg(feature="compiletest")]
2 extern crate compiletest_rs as compiletest;
3
4 fn run_mode(mode: &'static str) {
5 let mut config = compiletest::Config::default();
6 config.mode = mode.parse().expect("Invalid mode");
7 config.src_base = ["tests", mode].iter().collect();
8 config.target_rustcflags = Some("-L target/debug/ -L target/debug/deps/".to_owned());
9
10 config.verbose = true;
11
12 compiletest::run_tests(&config);
13 }
14
15 #[test]
16 fn compile_test() {
17 run_mode("compile-fail");
18 }