Move tests inside clone.rs and fixed copyright headers.

This commit is contained in:
Jack Moffitt
2013-04-05 17:51:43 -06:00
parent b22a06000d
commit d375171fd4
3 changed files with 23 additions and 29 deletions

View File

@@ -1,4 +1,4 @@
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// 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.
//
@@ -73,3 +73,24 @@ clone_impl!(f64)
clone_impl!(bool)
clone_impl!(char)
#[test]
fn test_owned_clone() {
let a : ~int = ~5i;
let b : ~int = a.clone();
assert!(a == b);
}
#[test]
fn test_managed_clone() {
let a : @int = @5i;
let b : @int = a.clone();
assert!(a == b);
}
#[test]
fn test_managed_mut_clone() {
let a : @int = @5i;
let b : @int = a.clone();
assert!(a == b);
}