about summary refs log tree commit diff
path: root/src/libnum/complex.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libnum/complex.rs')
-rw-r--r--src/libnum/complex.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/libnum/complex.rs b/src/libnum/complex.rs
index 3a666273d4a..b82c4d177ba 100644
--- a/src/libnum/complex.rs
+++ b/src/libnum/complex.rs
@@ -348,15 +348,15 @@ mod test {
 
     #[test]
     fn test_to_str() {
-        fn test(c : Complex64, s: ~str) {
-            assert_eq!(c.to_str(), s);
+        fn test(c : Complex64, s: StrBuf) {
+            assert_eq!(c.to_str().to_strbuf(), s);
         }
-        test(_0_0i, "0+0i".to_owned());
-        test(_1_0i, "1+0i".to_owned());
-        test(_0_1i, "0+1i".to_owned());
-        test(_1_1i, "1+1i".to_owned());
-        test(_neg1_1i, "-1+1i".to_owned());
-        test(-_neg1_1i, "1-1i".to_owned());
-        test(_05_05i, "0.5+0.5i".to_owned());
+        test(_0_0i, "0+0i".to_strbuf());
+        test(_1_0i, "1+0i".to_strbuf());
+        test(_0_1i, "0+1i".to_strbuf());
+        test(_1_1i, "1+1i".to_strbuf());
+        test(_neg1_1i, "-1+1i".to_strbuf());
+        test(-_neg1_1i, "1-1i".to_strbuf());
+        test(_05_05i, "0.5+0.5i".to_strbuf());
     }
 }