]> git.lizzy.rs Git - rust.git/commitdiff
Use assert_eq! instead of assert!
authorBrendan Zabarauskas <bjzaba@yahoo.com.au>
Sat, 18 May 2013 09:10:49 +0000 (19:10 +1000)
committerBrendan Zabarauskas <bjzaba@yahoo.com.au>
Sat, 18 May 2013 09:10:49 +0000 (19:10 +1000)
src/libcore/tuple.rs

index 7c583859483716dfa5a3247644e0f6216adc6f3d..334c576ba665b0f469acff2a78550ddb6afc77cc 100644 (file)
@@ -397,24 +397,24 @@ fn $method(&self) -> $T {
 #[test]
 fn test_tuple_ref() {
     let x = (~"foo", ~"bar");
-    assert!(x.first_ref() == &~"foo");
-    assert!(x.second_ref() == &~"bar");
+    assert_eq!(x.first_ref(), &~"foo");
+    assert_eq!(x.second_ref(), &~"bar");
 }
 
 #[test]
 #[allow(non_implicitly_copyable_typarams)]
 fn test_tuple() {
-    assert!((948, 4039.48).first() == 948);
-    assert!((34.5, ~"foo").second() == ~"foo");
-    assert!(('a', 2).swap() == (2, 'a'));
+    assert_eq!((948, 4039.48).first(), 948);
+    assert_eq!((34.5, ~"foo").second(), ~"foo");
+    assert_eq!(('a', 2).swap(), (2, 'a'));
 }
 
 #[test]
 fn test_clone() {
     let a = (1, ~"2");
     let b = a.clone();
-    assert!(a.first() == b.first());
-    assert!(a.second() == b.second());
+    assert_eq!(a.first(), b.first());
+    assert_eq!(a.second(), b.second());
 }
 
 #[test]