From 1ed646eaf7d09455a086afa11bcd83a7d2a6b0f4 Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Sat, 28 Jun 2014 13:57:36 -0700 Subject: Extract tests from libcore to a separate crate Libcore's test infrastructure is complicated by the fact that many lang items are defined in the crate. The current approach (realcore/realstd imports) is hacky and hard to work with (tests inside of core::cmp haven't been run for months!). Moving tests to a separate crate does mean that they can only test the public API of libcore, but I don't feel that that is too much of an issue. The only tests that I had to get rid of were some checking the various numeric formatters, but those are also exercised through normal format! calls in other tests. --- src/libstd/gc.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/libstd') diff --git a/src/libstd/gc.rs b/src/libstd/gc.rs index 363c577563e..44988a23070 100644 --- a/src/libstd/gc.rs +++ b/src/libstd/gc.rs @@ -103,6 +103,13 @@ mod tests { use super::*; use cell::RefCell; + #[test] + fn test_managed_clone() { + let a = box(GC) 5i; + let b: Gc = a.clone(); + assert!(a == b); + } + #[test] fn test_clone() { let x = Gc::new(RefCell::new(5)); -- cgit 1.4.1-3-g733a5