File tree Expand file tree Collapse file tree 4 files changed +24
-30
lines changed Expand file tree Collapse file tree 4 files changed +24
-30
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
8
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9
9
refs/heads/incoming: b50030718cf28f2a5a81857a26b57442734fe854
10
- refs/heads/dist-snap: b22a06000d68faf7fe080dc9fd5a2686502d212f
10
+ refs/heads/dist-snap: d375171fd44247bff3e355fb82d88b83f14da442
11
11
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
12
12
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
13
13
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
Original file line number Diff line number Diff line change 1
- // Copyright 2012 The Rust Project Developers. See the COPYRIGHT
1
+ // Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
2
2
// file at the top-level directory of this distribution and at
3
3
// http://rust-lang.org/COPYRIGHT.
4
4
//
@@ -73,3 +73,24 @@ clone_impl!(f64)
73
73
74
74
clone_impl ! ( bool )
75
75
clone_impl ! ( char )
76
+
77
+ #[ test]
78
+ fn test_owned_clone ( ) {
79
+ let a : ~int = ~5 i;
80
+ let b : ~int = a. clone ( ) ;
81
+ assert ! ( a == b) ;
82
+ }
83
+
84
+ #[ test]
85
+ fn test_managed_clone ( ) {
86
+ let a : @int = @5 i;
87
+ let b : @int = a. clone ( ) ;
88
+ assert ! ( a == b) ;
89
+ }
90
+
91
+ #[ test]
92
+ fn test_managed_mut_clone ( ) {
93
+ let a : @int = @5 i;
94
+ let b : @int = a. clone ( ) ;
95
+ assert ! ( a == b) ;
96
+ }
Original file line number Diff line number Diff line change 1
- // Copyright 2012 The Rust Project Developers. See the COPYRIGHT
1
+ // Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
2
2
// file at the top-level directory of this distribution and at
3
3
// http://rust-lang.org/COPYRIGHT.
4
4
//
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments