about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJorge Aparicio <japaricious@gmail.com>2015-01-04 23:34:23 -0500
committerJorge Aparicio <japaricious@gmail.com>2015-01-05 17:22:15 -0500
commit18e2026ff8ae67cf8dea61c938d87f1f45734751 (patch)
tree5776dd587fc89d00c82e86191057cee2c95611ad
parent37448506ea575d94389a60dce2aaebd57dba50a3 (diff)
downloadrust-18e2026ff8ae67cf8dea61c938d87f1f45734751.tar.gz
rust-18e2026ff8ae67cf8dea61c938d87f1f45734751.zip
coretest: remove/ignore tests
-rw-r--r--src/libcoretest/lib.rs1
-rw-r--r--src/libcoretest/option.rs5
-rw-r--r--src/libcoretest/raw.rs35
-rw-r--r--src/libcoretest/result.rs5
4 files changed, 8 insertions, 38 deletions
diff --git a/src/libcoretest/lib.rs b/src/libcoretest/lib.rs
index e6608eee3dd..b6fc6457fce 100644
--- a/src/libcoretest/lib.rs
+++ b/src/libcoretest/lib.rs
@@ -30,7 +30,6 @@ mod num;
 mod ops;
 mod option;
 mod ptr;
-mod raw;
 mod result;
 mod slice;
 mod str;
diff --git a/src/libcoretest/option.rs b/src/libcoretest/option.rs
index 86fc25c9d91..4a459992098 100644
--- a/src/libcoretest/option.rs
+++ b/src/libcoretest/option.rs
@@ -220,6 +220,7 @@ fn test_ord() {
     assert!(big > None);
 }
 
+/* FIXME(#20575)
 #[test]
 fn test_collect() {
     let v: Option<Vec<int>> = range(0i, 0).map(|_| Some(0i)).collect();
@@ -234,12 +235,14 @@ fn test_collect() {
     assert!(v == None);
 
     // test that it does not take more elements than it needs
-    let mut functions = [|| Some(()), || None, || panic!()];
+    let mut functions: [Box<Fn() -> Option<()>>; 3] =
+        [box || Some(()), box || None, box || panic!()];
 
     let v: Option<Vec<()>> = functions.iter_mut().map(|f| (*f)()).collect();
 
     assert!(v == None);
 }
+*/
 
 #[test]
 fn test_cloned() {
diff --git a/src/libcoretest/raw.rs b/src/libcoretest/raw.rs
deleted file mode 100644
index f2c23c7c773..00000000000
--- a/src/libcoretest/raw.rs
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2014 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.
-
-use core::raw::*;
-use core::mem;
-
-#[test]
-fn synthesize_closure() {
-    unsafe {
-        let x = 10;
-        let f: |int| -> int = |y| x + y;
-
-        assert_eq!(f(20), 30);
-
-        let original_closure: Closure = mem::transmute(f);
-
-        let actual_function_pointer = original_closure.code;
-        let environment = original_closure.env;
-
-        let new_closure = Closure {
-            code: actual_function_pointer,
-            env: environment
-        };
-
-        let new_f: |int| -> int = mem::transmute(new_closure);
-        assert_eq!(new_f(20), 30);
-    }
-}
diff --git a/src/libcoretest/result.rs b/src/libcoretest/result.rs
index 415cd4e7dcf..52ea14dd05d 100644
--- a/src/libcoretest/result.rs
+++ b/src/libcoretest/result.rs
@@ -67,6 +67,7 @@ pub fn test_impl_map_err() {
     assert!(Err::<int, int>(1).map_err(|x| x + 1) == Err(2));
 }
 
+/* FIXME(#20575)
 #[test]
 fn test_collect() {
     let v: Result<Vec<int>, ()> = range(0i, 0).map(|_| Ok::<int, ()>(0)).collect();
@@ -81,11 +82,13 @@ fn test_collect() {
     assert!(v == Err(2));
 
     // test that it does not take more elements than it needs
-    let mut functions = [|| Ok(()), || Err(1i), || panic!()];
+    let mut functions: [Box<Fn() -> Result<(), int>>; 3] =
+        [box || Ok(()), box || Err(1i), box || panic!()];
 
     let v: Result<Vec<()>, int> = functions.iter_mut().map(|f| (*f)()).collect();
     assert!(v == Err(1));
 }
+*/
 
 #[test]
 pub fn test_fmt_default() {