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(x: T) -> T { x } - fn test_fn_c(_: int, _: f64, _: int, _: int, _: int) {} - - let _ = test_fn_a.clone(); - let _ = test_fn_b::.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::(), TypeId::of::()); assert_eq!(TypeId::of::(), TypeId::of::()); 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;