about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-10-17 03:19:45 +0000
committerbors <bors@rust-lang.org>2015-10-17 03:19:45 +0000
commit4ed46e7225bdf8ea80f93ae66eb3993dc09d957b (patch)
treecf71896d3a79df31246614963bfeacb2a2a25fa6
parent20a6938c08f32bdf5db474866be1dce3952fd9d4 (diff)
parent510360de210a191e42283c603b7f6140d7cbf829 (diff)
downloadrust-4ed46e7225bdf8ea80f93ae66eb3993dc09d957b.tar.gz
rust-4ed46e7225bdf8ea80f93ae66eb3993dc09d957b.zip
Auto merge of #29079 - fhahn:remove-unused-files-libcoretest, r=alexcrichton
While working on #28711 I found out that 

*  src/libcoretest/clone.rs 
* src/libcoretest/fmt/float.rs  
* src/libcoretest/intrinsics.rs 

are not used. I am not sure if removing them is the right way to go. If it makes sense to keep (and fix and enable) them, I would be happy to update the PR.
-rw-r--r--src/libcoretest/clone.rs20
-rw-r--r--src/libcoretest/fmt/float.rs4
-rw-r--r--src/libcoretest/fmt/mod.rs3
-rw-r--r--src/libcoretest/intrinsics.rs2
-rw-r--r--src/libcoretest/lib.rs2
5 files changed, 11 insertions, 20 deletions
diff --git a/src/libcoretest/clone.rs b/src/libcoretest/clone.rs
index 5ab6ab27ba1..91d68ba3344 100644
--- a/src/libcoretest/clone.rs
+++ b/src/libcoretest/clone.rs
@@ -1,4 +1,4 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -11,8 +11,8 @@
 #[test]
 fn test_borrowed_clone() {
     let x = 5;
-    let y: &int = &x;
-    let z: &int = (&y).clone();
+    let y: &i32 = &x;
+    let z: &i32 = (&y).clone();
     assert_eq!(*z, 5);
 }
 
@@ -23,17 +23,3 @@ fn test_clone_from() {
     b.clone_from(&a);
     assert_eq!(*b, 5);
 }
-
-#[test]
-fn test_extern_fn_clone() {
-    trait Empty {}
-    impl Empty for int {}
-
-    fn test_fn_a() -> f64 { 1.0 }
-    fn test_fn_b<T: Empty>(x: T) -> T { x }
-    fn test_fn_c(_: int, _: f64, _: int, _: int, _: int) {}
-
-    let _ = test_fn_a.clone();
-    let _ = test_fn_b::<int>.clone();
-    let _ = test_fn_c.clone();
-}
diff --git a/src/libcoretest/fmt/float.rs b/src/libcoretest/fmt/float.rs
index 6b14fa8be8e..16cd2feddc0 100644
--- a/src/libcoretest/fmt/float.rs
+++ b/src/libcoretest/fmt/float.rs
@@ -13,5 +13,7 @@ fn test_format_float() {
     assert!("1" == format!("{:.0}", 1.0f64));
     assert!("9" == format!("{:.0}", 9.4f64));
     assert!("10" == format!("{:.0}", 9.9f64));
-    assert!("9.9" == format!("{:.1}", 9.85f64));
+    assert!("9.8" == format!("{:.1}", 9.849f64));
+    assert!("9.9" == format!("{:.1}", 9.851f64));
+    assert!("1" == format!("{:.0}", 0.5f64));
 }
diff --git a/src/libcoretest/fmt/mod.rs b/src/libcoretest/fmt/mod.rs
index 42872589bb0..99ea39c619f 100644
--- a/src/libcoretest/fmt/mod.rs
+++ b/src/libcoretest/fmt/mod.rs
@@ -8,8 +8,9 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-mod num;
 mod builders;
+mod float;
+mod num;
 
 #[test]
 fn test_format_flags() {
diff --git a/src/libcoretest/intrinsics.rs b/src/libcoretest/intrinsics.rs
index c99fb8c197d..2b380abf63c 100644
--- a/src/libcoretest/intrinsics.rs
+++ b/src/libcoretest/intrinsics.rs
@@ -12,7 +12,7 @@ use core::any::TypeId;
 
 #[test]
 fn test_typeid_sized_types() {
-    struct X; struct Y(uint);
+    struct X; struct Y(u32);
 
     assert_eq!(TypeId::of::<X>(), TypeId::of::<X>());
     assert_eq!(TypeId::of::<Y>(), TypeId::of::<Y>());
diff --git a/src/libcoretest/lib.rs b/src/libcoretest/lib.rs
index 22b285b0343..96886c91048 100644
--- a/src/libcoretest/lib.rs
+++ b/src/libcoretest/lib.rs
@@ -54,9 +54,11 @@ mod array;
 mod atomic;
 mod cell;
 mod char;
+mod clone;
 mod cmp;
 mod fmt;
 mod hash;
+mod intrinsics;
 mod iter;
 mod mem;
 mod nonzero;