]> git.lizzy.rs Git - rust.git/commitdiff
test: Clean up xfail-{fast,win32} tests
authorklutzy <klutzytheklutzy@gmail.com>
Wed, 13 Nov 2013 04:58:17 +0000 (13:58 +0900)
committerklutzy <klutzytheklutzy@gmail.com>
Thu, 14 Nov 2013 05:25:44 +0000 (14:25 +0900)
Rename {struct-update,fsu}-moves-and-copies, since win32
failed to run the test since UAC prevents any executable whose
name contaning "update". (#10452)

Some tests related to #9205 are expected to fail on gcc 4.8,
so they are marked as `xfail-win32` instead of `xfail-fast`.

Some tests using `extra::tempfile` fail on win32 due to #10462.
Mark them as `xfail-win32`.

25 files changed:
src/test/run-pass/deriving-global.rs
src/test/run-pass/extern-pass-TwoU64s-ref.rs [deleted file]
src/test/run-pass/extern-pass-TwoU64s.rs
src/test/run-pass/extern-return-TwoU64s.rs
src/test/run-pass/fsu-moves-and-copies.rs [new file with mode: 0644]
src/test/run-pass/glob-std.rs
src/test/run-pass/issue-4208.rs
src/test/run-pass/issue-4545.rs
src/test/run-pass/issue-8044.rs
src/test/run-pass/issue-9123.rs
src/test/run-pass/issue-9188.rs
src/test/run-pass/issue-9906.rs
src/test/run-pass/issue-9968.rs
src/test/run-pass/issue_9155.rs
src/test/run-pass/linkage-visibility.rs
src/test/run-pass/logging_before_rt_started.rs
src/test/run-pass/macro-with-attrs1.rs
src/test/run-pass/reexport-should-still-link.rs
src/test/run-pass/rt-run-twice.rs
src/test/run-pass/smallest-hello-world.rs
src/test/run-pass/struct-return.rs
src/test/run-pass/struct-update-moves-and-copies.rs [deleted file]
src/test/run-pass/tempfile.rs
src/test/run-pass/typeid-intrinsic.rs
src/test/run-pass/xcrate-address-insignificant.rs

index 7804ce48c7053206bf6c4d7adc8a1cbd40745b06..37487c1b6d79f87dae6b80b1cbf9f9e753716f46 100644 (file)
@@ -1,4 +1,4 @@
-// xfail-fast #7103 `extern mod` does not work on windows
+// xfail-fast #7103 `extern mod` does not work on check-fast
 // xfail-pretty - does not converge
 
 // Copyright 2013 The Rust Project Developers. See the COPYRIGHT
diff --git a/src/test/run-pass/extern-pass-TwoU64s-ref.rs b/src/test/run-pass/extern-pass-TwoU64s-ref.rs
deleted file mode 100644 (file)
index caba29a..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// Test that we ignore modes when calling extern functions.
-// xfail-fast #9205
-
-#[deriving(Eq)]
-struct TwoU64s {
-    one: u64, two: u64
-}
-
-extern {
-    pub fn rust_dbg_extern_identity_TwoU64s(u: TwoU64s) -> TwoU64s;
-}
-
-pub fn main() {
-    unsafe {
-        let x = TwoU64s {one: 22, two: 23};
-        let y = rust_dbg_extern_identity_TwoU64s(x);
-        assert_eq!(x, y);
-    }
-}
index 1b5e661ed8e8396b58f447188ade413ffd52eb95..033359f85fa331de175d3121f6bafc090b1a6216 100644 (file)
 // Test a foreign function that accepts and returns a struct
 // by value.
 
-// xfail-fast This works standalone on windows but not with check-fast.
-// possibly because there is another test that uses this extern fn but gives it
-// a different signature
-// xfail-fast #9205
+// xfail-win32 #9205
 
 #[deriving(Eq)]
 struct TwoU64s {
index a28795b93e0bb402bdf3a2cf0398862cd82aaece..b52808ea32db0644e93f424e795aac0b59932632 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// xfail-fast #9205
+// xfail-win32 #9205
 
 struct TwoU64s {
     one: u64, two: u64
diff --git a/src/test/run-pass/fsu-moves-and-copies.rs b/src/test/run-pass/fsu-moves-and-copies.rs
new file mode 100644 (file)
index 0000000..a0fb31e
--- /dev/null
@@ -0,0 +1,101 @@
+// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Issue 4691: Ensure that functional-struct-updates operates
+// correctly and moves rather than copy when appropriate.
+
+use NC = std::util::NonCopyable;
+
+struct ncint { nc: NC, v: int }
+fn ncint(v: int) -> ncint { ncint { nc: NC, v: v } }
+
+struct NoFoo { copied: int, noncopy: ncint, }
+impl NoFoo {
+    fn new(x:int,y:int) -> NoFoo { NoFoo { copied: x, noncopy: ncint(y) } }
+}
+
+struct MoveFoo { copied: int, moved: ~int, }
+impl MoveFoo {
+    fn new(x:int,y:int) -> MoveFoo { MoveFoo { copied: x, moved: ~y } }
+}
+
+struct DropNoFoo { inner: NoFoo }
+impl DropNoFoo {
+    fn new(x:int,y:int) -> DropNoFoo { DropNoFoo { inner: NoFoo::new(x,y) } }
+}
+impl Drop for DropNoFoo { fn drop(&mut self) { } }
+
+struct DropMoveFoo { inner: MoveFoo }
+impl DropMoveFoo {
+    fn new(x:int,y:int) -> DropMoveFoo { DropMoveFoo { inner: MoveFoo::new(x,y) } }
+}
+impl Drop for DropMoveFoo { fn drop(&mut self) { } }
+
+
+fn test0() {
+    // just copy implicitly copyable fields from `f`, no moves
+    // (and thus it is okay that these are Drop; compare against
+    // compile-fail test: borrowck-struct-update-with-dtor.rs).
+
+    // Case 1: NonCopyable
+    let f = DropNoFoo::new(1, 2);
+    let b = DropNoFoo { inner: NoFoo { noncopy: ncint(3), ..f.inner }};
+    let c = DropNoFoo { inner: NoFoo { noncopy: ncint(4), ..f.inner }};
+    assert_eq!(f.inner.copied,    1);
+    assert_eq!(f.inner.noncopy.v, 2);
+
+    assert_eq!(b.inner.copied,    1);
+    assert_eq!(b.inner.noncopy.v, 3);
+
+    assert_eq!(c.inner.copied,    1);
+    assert_eq!(c.inner.noncopy.v, 4);
+
+    // Case 2: Owned
+    let f = DropMoveFoo::new(5, 6);
+    let b = DropMoveFoo { inner: MoveFoo { moved: ~7, ..f.inner }};
+    let c = DropMoveFoo { inner: MoveFoo { moved: ~8, ..f.inner }};
+    assert_eq!(f.inner.copied,    5);
+    assert_eq!(*f.inner.moved,    6);
+
+    assert_eq!(b.inner.copied,    5);
+    assert_eq!(*b.inner.moved,    7);
+
+    assert_eq!(c.inner.copied,    5);
+    assert_eq!(*c.inner.moved,    8);
+}
+
+fn test1() {
+    // copying move-by-default fields from `f`, so it moves:
+    let f = MoveFoo::new(11, 12);
+
+    let b = MoveFoo {moved: ~13, ..f};
+    let c = MoveFoo {copied: 14, ..f};
+    assert_eq!(b.copied,    11);
+    assert_eq!(*b.moved,    13);
+    assert_eq!(c.copied,    14);
+    assert_eq!(*c.moved,    12);
+}
+
+fn test2() {
+    // move non-copyable field
+    let f = NoFoo::new(21, 22);
+    let b = NoFoo {noncopy: ncint(23), ..f};
+    let c = NoFoo {copied: 24, ..f};
+    assert_eq!(b.copied,    21);
+    assert_eq!(b.noncopy.v, 23);
+    assert_eq!(c.copied,    24);
+    assert_eq!(c.noncopy.v, 22);
+}
+
+pub fn main() {
+    test0();
+    test1();
+    test2();
+}
index 8e516f748ffd44f19998ede5d5deade316f737e3..655bc7771938f1e73c9318cc6b7a995ef58a6e27 100644 (file)
@@ -8,7 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// xfail-fast windows doesn't like 'extern mod extra'
+// xfail-fast check-fast doesn't like 'extern mod extra'
+// xfail-win32 TempDir may cause IoError on windows: #10462
 
 extern mod extra;
 
index 4328dc7d5f912d8d81f1ae88e2127abbd6225fe3..92b3f6274d5930aafbd38ec4346e755fe35feb5d 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 // aux-build:issue-4208-cc.rs
-// xfail-fast - Windows hates cross-crate tests
+// xfail-fast - check-fast hates cross-crate tests
 
 extern mod numeric;
 use numeric::{sin, Angle};
index 834e09859f64d1d6a1e3982575d90ca7c3813daf..4b13563726efcc04377a8e8d6953b6a292c3c662 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// xfail-fast windows doesn't like aux-build
+// xfail-fast check-fast doesn't like aux-build
 // aux-build:issue-4545.rs
 
 extern mod somelib(name = "issue-4545");
index d8e0085ed8726a084a30217aa4d0ef3b4f3f2c70..300f54aa10682ef336fb976501e6b60f5d8d00b0 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// xfail-fast windows doesn't like aux-build
+// xfail-fast check-fast doesn't like aux-build
 // aux-build:issue-8044.rs
 
 extern mod minimal(name= "issue-8044");
index 73a14de10bf3e94b3687e3e96733c74c13b5ebd1..8399eeebe485f803c2d628d871676b616483c2c9 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// xfail-fast windows doesn't like aux-build
+// xfail-fast check-fast doesn't like aux-build
 // aux-build:issue_9123.rs
 
 extern mod issue_9123;
index 7cfa230766cfa36cf93a4811a6dc1c688c6c975f..e3e09394bd6336dcb3fca3af49b52363fb621ab0 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 // aux-build:issue_9188.rs
-// xfail-fast windows doesn't like aux-build
+// xfail-fast check-fast doesn't like aux-build
 
 extern mod issue_9188;
 
index 287000d2fb1d42d1f42a215281a6eb1db1dd063c..ac15fef362226d520974317d70d22696f8c2cbf4 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// xfail-fast windows doesn't like extern mod
+// xfail-fast check-fast doesn't like extern mod
 // aux-build:issue-9906.rs
 
 extern mod testmod(name = "issue-9906");
index 70338bd0f32b4d80e760b70291fc7e16f5c0504c..ebe268cce1c42e0506b67a79567e4c629d5226d9 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// xfail-fast windows doesn't like extern mod
+// xfail-fast check-fast doesn't like extern mod
 // aux-build:issue-9968.rs
 
 extern mod lib(name = "issue-9968");
index ba92a0c7b1ff885c4db1fa781681026c368e239c..ae0bfe2babe36d780e1b961122b1c0ce75199d3e 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 // aux-build:issue_9155.rs
-// xfail-fast windows doesn't like the aux-build
+// xfail-fast check-fast doesn't like the aux-build
 
 extern mod issue_9155;
 
index f2c6140598dfbbab9ecaad46dc705ded862243ac..645be40250aff1a4c26d5c7063e4bed095f082e4 100644 (file)
@@ -8,10 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// xfail-android: FIXME(#10379)
-
 // aux-build:linkage-visibility.rs
-// xfail-fast windows doesn't like aux-build
+// xfail-fast check-fast doesn't like 'extern mod'
+// xfail-android: FIXME(#10379)
+// xfail-win32: std::unstable::dynamic_lib does not work on win32 well
 
 extern mod foo(name = "linkage-visibility");
 
index cdf38821ebefeb209b7798fec3d3c1fd143e652a..61d48c6800da2876dc729d9fdcf9b7b4727e93e0 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 // exec-env:RUST_LOG=std::ptr
-// xfail-fast this would cause everything to print forever on windows...
+// xfail-fast this would cause everything to print forever on check-fast...
 
 // In issue #9487, it was realized that std::ptr was invoking the logging
 // infrastructure, and when std::ptr was used during runtime initialization,
index 1e49e4a35ccc3693fc922a31a4d4fccf1772a18c..5a5091c385653c400bab1c861080ea637f30da1b 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// xfail-fast windows doesn't like compile-flags
+// xfail-fast check-fast doesn't like compile-flags
 // compile-flags: --cfg foo
 
 #[feature(macro_rules)];
index ed5c3941c36574e987474ecaf8fba467e7fa2b0e..f2d90a2374ac3f6b1a4dbea01189eaecba01295c 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 // aux-build:reexport-should-still-link.rs
-// xfail-fast windows doesn't like extern mod
+// xfail-fast check-fast doesn't like extern mod
 
 extern mod foo(name = "reexport-should-still-link");
 
index 0bb02ed5498b77e3cd8cfcc17147d9412c10e671..a9a26c2fbb14a60d09170dbc8626530caa8912bb 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// xfail-fast windows uses a different test runner
+// xfail-fast make-check does not like `#[start]`
 
 use std::rt;
 
index 1e5ea7126e4403396c409eac4f34335c2457d53b..92513caf87d3cf1825ae7fd670ccf083d592c9f2 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 // xfail-test - FIXME(#8538) some kind of problem linking induced by extern "C" fns that I do not understand
-// xfail-fast - windows doesn't like this
+// xfail-fast - check-fast doesn't like this
 
 // Smallest hello world with no runtime
 
index 7edaad3748ae7225d0a0985a5eb591eac2f1bee2..324186021b8e46b7298c64791a9fd48e647307ae 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// xfail-fast #9205
+// xfail-win32 #9205
 
 pub struct Quad { a: u64, b: u64, c: u64, d: u64 }
 pub struct Floats { a: f64, b: u8, c: f64 }
diff --git a/src/test/run-pass/struct-update-moves-and-copies.rs b/src/test/run-pass/struct-update-moves-and-copies.rs
deleted file mode 100644 (file)
index a0fb31e..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// Issue 4691: Ensure that functional-struct-updates operates
-// correctly and moves rather than copy when appropriate.
-
-use NC = std::util::NonCopyable;
-
-struct ncint { nc: NC, v: int }
-fn ncint(v: int) -> ncint { ncint { nc: NC, v: v } }
-
-struct NoFoo { copied: int, noncopy: ncint, }
-impl NoFoo {
-    fn new(x:int,y:int) -> NoFoo { NoFoo { copied: x, noncopy: ncint(y) } }
-}
-
-struct MoveFoo { copied: int, moved: ~int, }
-impl MoveFoo {
-    fn new(x:int,y:int) -> MoveFoo { MoveFoo { copied: x, moved: ~y } }
-}
-
-struct DropNoFoo { inner: NoFoo }
-impl DropNoFoo {
-    fn new(x:int,y:int) -> DropNoFoo { DropNoFoo { inner: NoFoo::new(x,y) } }
-}
-impl Drop for DropNoFoo { fn drop(&mut self) { } }
-
-struct DropMoveFoo { inner: MoveFoo }
-impl DropMoveFoo {
-    fn new(x:int,y:int) -> DropMoveFoo { DropMoveFoo { inner: MoveFoo::new(x,y) } }
-}
-impl Drop for DropMoveFoo { fn drop(&mut self) { } }
-
-
-fn test0() {
-    // just copy implicitly copyable fields from `f`, no moves
-    // (and thus it is okay that these are Drop; compare against
-    // compile-fail test: borrowck-struct-update-with-dtor.rs).
-
-    // Case 1: NonCopyable
-    let f = DropNoFoo::new(1, 2);
-    let b = DropNoFoo { inner: NoFoo { noncopy: ncint(3), ..f.inner }};
-    let c = DropNoFoo { inner: NoFoo { noncopy: ncint(4), ..f.inner }};
-    assert_eq!(f.inner.copied,    1);
-    assert_eq!(f.inner.noncopy.v, 2);
-
-    assert_eq!(b.inner.copied,    1);
-    assert_eq!(b.inner.noncopy.v, 3);
-
-    assert_eq!(c.inner.copied,    1);
-    assert_eq!(c.inner.noncopy.v, 4);
-
-    // Case 2: Owned
-    let f = DropMoveFoo::new(5, 6);
-    let b = DropMoveFoo { inner: MoveFoo { moved: ~7, ..f.inner }};
-    let c = DropMoveFoo { inner: MoveFoo { moved: ~8, ..f.inner }};
-    assert_eq!(f.inner.copied,    5);
-    assert_eq!(*f.inner.moved,    6);
-
-    assert_eq!(b.inner.copied,    5);
-    assert_eq!(*b.inner.moved,    7);
-
-    assert_eq!(c.inner.copied,    5);
-    assert_eq!(*c.inner.moved,    8);
-}
-
-fn test1() {
-    // copying move-by-default fields from `f`, so it moves:
-    let f = MoveFoo::new(11, 12);
-
-    let b = MoveFoo {moved: ~13, ..f};
-    let c = MoveFoo {copied: 14, ..f};
-    assert_eq!(b.copied,    11);
-    assert_eq!(*b.moved,    13);
-    assert_eq!(c.copied,    14);
-    assert_eq!(*c.moved,    12);
-}
-
-fn test2() {
-    // move non-copyable field
-    let f = NoFoo::new(21, 22);
-    let b = NoFoo {noncopy: ncint(23), ..f};
-    let c = NoFoo {copied: 24, ..f};
-    assert_eq!(b.copied,    21);
-    assert_eq!(b.noncopy.v, 23);
-    assert_eq!(c.copied,    24);
-    assert_eq!(c.noncopy.v, 22);
-}
-
-pub fn main() {
-    test0();
-    test1();
-    test2();
-}
index 0a2905099efd27a8ca6dd8fb6922c2e5fbd64a07..e8e3d337838de2252d9b3a47b1635b9ae9c8549a 100644 (file)
@@ -8,7 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// xfail-fast windows doesn't like 'extern mod extra'
+// xfail-fast check-fast doesn't like 'extern mod'
+// xfail-win32 TempDir may cause IoError on windows: #10463
 
 // These tests are here to exercise the functionality of the `tempfile` module.
 // One might expect these tests to be located in that module, but sadly they
index b9ad9b09d4992966f58748e877bc4deeae31bd2a..3fd7c05796bc4b46749838f1148452732753f4eb 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// xfail-fast windows doesn't like aux-build
+// xfail-fast check-fast doesn't like aux-build
 // aux-build:typeid-intrinsic.rs
 // aux-build:typeid-intrinsic2.rs
 
index 33f958f20bcb7224ba2304644f13e5622c2f549d..91b8c99ca19be4d8db37d6dacb2cb5a24758756e 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// xfail-fast windows doesn't like aux-build
+// xfail-fast check-fast doesn't like aux-build
 // aux-build:xcrate_address_insignificant.rs
 
 extern mod foo(name = "xcrate_address_insignificant");