]>
git.proxmox.com Git - rustc.git/blob - vendor/rayon/src/test.rs
2 #![cfg(not(all(windows, target_env = "gnu")))]
4 extern crate compiletest_rs
as compiletest
;
6 use std
::path
::PathBuf
;
8 fn run_compiletest(mode
: &str, path
: &str) {
9 let mut config
= compiletest
::Config
::default();
10 config
.mode
= mode
.parse().ok().expect("Invalid mode");
11 config
.src_base
= PathBuf
::from(path
);
12 config
.target_rustcflags
= Some("-L target/debug/ -L target/debug/deps/".to_owned());
14 compiletest
::run_tests(&config
);
18 fn negative_tests_compile_fail() {
19 run_compiletest("compile-fail", "tests/compile-fail");
23 #[cfg(rayon_unstable)]
24 fn negative_tests_compile_fail_unstable() {
25 run_compiletest("compile-fail", "tests/compile-fail-unstable");
29 fn negative_tests_run_fail() {
30 run_compiletest("run-fail", "tests/run-fail");
34 #[cfg(rayon_unstable)]
35 fn negative_tests_run_fail_unstable() {
36 run_compiletest("run-fail", "tests/run-fail-unstable");
40 fn positive_test_run_pass() {
41 run_compiletest("run-pass", "tests/run-pass");
45 #[cfg(rayon_unstable)]
46 fn positive_test_run_pass_unstable() {
47 run_compiletest("run-pass", "tests/run-pass-unstable");