]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/test-ignore-cfg.rs
Replace all ~"" with "".to_owned()
[rust.git] / src / test / run-pass / test-ignore-cfg.rs
index b045dc3074d598aef475e2de933bc8bfcaa84878..e8d36dad2087749cb185065697aae3009764c568 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -9,9 +9,6 @@
 // except according to those terms.
 
 // compile-flags: --test --cfg ignorecfg
-// xfail-fast
-
-extern mod std;
 
 #[test]
 #[ignore(cfg(ignorecfg))]
@@ -26,13 +23,13 @@ fn shouldnotignore() {
 #[test]
 fn checktests() {
     // Pull the tests out of the secreturn test module
-    let tests = __test::tests;
+    let tests = __test::TESTS;
 
-    assert vec::any(
-        tests,
-        |t| t.desc.name.to_str() == ~"shouldignore" && t.desc.ignore);
+    assert!(
+        tests.iter().any(|t| t.desc.name.to_str() == "shouldignore".to_owned() &&
+                         t.desc.ignore));
 
-    assert vec::any(
-        tests,
-        |t| t.desc.name.to_str() == ~"shouldnotignore" && !t.desc.ignore);
+    assert!(
+        tests.iter().any(|t| t.desc.name.to_str() == "shouldnotignore".to_owned() &&
+                         !t.desc.ignore));
 }