2011-10-29 17:35:45 -07:00
|
|
|
// compile-flags: --test --cfg ignorecfg
|
|
|
|
// xfail-fast
|
|
|
|
// xfail-pretty
|
|
|
|
|
|
|
|
use std;
|
2011-12-13 16:25:51 -08:00
|
|
|
import option;
|
|
|
|
import vec;
|
2011-10-29 17:35:45 -07:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
#[ignore(cfg(ignorecfg))]
|
|
|
|
fn shouldignore() {
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
#[ignore(cfg(noignorecfg))]
|
|
|
|
fn shouldnotignore() {
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn checktests() {
|
|
|
|
// Pull the tests out of the secret test module
|
|
|
|
let tests = __test::tests();
|
|
|
|
|
|
|
|
let shouldignore = option::get(
|
2012-06-30 16:19:07 -07:00
|
|
|
vec::find(tests, |t| t.name == "shouldignore" ));
|
2011-10-29 17:35:45 -07:00
|
|
|
assert shouldignore.ignore == true;
|
|
|
|
|
|
|
|
let shouldnotignore = option::get(
|
2012-06-30 16:19:07 -07:00
|
|
|
vec::find(tests, |t| t.name == "shouldnotignore" ));
|
2011-10-29 17:35:45 -07:00
|
|
|
assert shouldnotignore.ignore == false;
|
|
|
|
}
|