about summary refs log tree commit diff
path: root/src/libcore/to_str.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcore/to_str.rs')
-rw-r--r--src/libcore/to_str.rs34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/libcore/to_str.rs b/src/libcore/to_str.rs
index 3b5d1f9e2ae..8215152ef74 100644
--- a/src/libcore/to_str.rs
+++ b/src/libcore/to_str.rs
@@ -140,31 +140,31 @@ impl<A:ToStr> ToStr for @[A] {
 mod tests {
     #[test]
     fn test_simple_types() {
-        assert 1i.to_str() == ~"1";
-        assert (-1i).to_str() == ~"-1";
-        assert 200u.to_str() == ~"200";
-        assert 2u8.to_str() == ~"2";
-        assert true.to_str() == ~"true";
-        assert false.to_str() == ~"false";
-        assert ().to_str() == ~"()";
-        assert (~"hi").to_str() == ~"hi";
-        assert (@"hi").to_str() == ~"hi";
+        fail_unless!(1i.to_str() == ~"1");
+        fail_unless!((-1i).to_str() == ~"-1");
+        fail_unless!(200u.to_str() == ~"200");
+        fail_unless!(2u8.to_str() == ~"2");
+        fail_unless!(true.to_str() == ~"true");
+        fail_unless!(false.to_str() == ~"false");
+        fail_unless!(().to_str() == ~"()");
+        fail_unless!((~"hi").to_str() == ~"hi");
+        fail_unless!((@"hi").to_str() == ~"hi");
     }
 
     #[test]
     fn test_tuple_types() {
-        assert (1, 2).to_str() == ~"(1, 2)";
-        assert (~"a", ~"b", false).to_str() == ~"(a, b, false)";
-        assert ((), ((), 100)).to_str() == ~"((), ((), 100))";
+        fail_unless!((1, 2).to_str() == ~"(1, 2)");
+        fail_unless!((~"a", ~"b", false).to_str() == ~"(a, b, false)");
+        fail_unless!(((), ((), 100)).to_str() == ~"((), ((), 100))");
     }
 
     #[test]
     fn test_vectors() {
         let x: ~[int] = ~[];
-        assert x.to_str() == ~"[]";
-        assert (~[1]).to_str() == ~"[1]";
-        assert (~[1, 2, 3]).to_str() == ~"[1, 2, 3]";
-        assert (~[~[], ~[1], ~[1, 1]]).to_str() ==
-               ~"[[], [1], [1, 1]]";
+        fail_unless!(x.to_str() == ~"[]");
+        fail_unless!((~[1]).to_str() == ~"[1]");
+        fail_unless!((~[1, 2, 3]).to_str() == ~"[1, 2, 3]");
+        fail_unless!((~[~[], ~[1], ~[1, 1]]).to_str() ==
+               ~"[[], [1], [1, 1]]");
     }
 }