about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-08-07 06:56:19 -0700
committerbors <bors@rust-lang.org>2013-08-07 06:56:19 -0700
commit597b3fd03fa1213ede610088569decd390d2c2fb (patch)
tree72f42fa9f322e815f120229fa93ad8efe4404e73 /src/libstd
parent54c8c23d0582037e525fba917fb865bfba0e9b78 (diff)
parent1ce5effac2ced66e44b4b7f320bf8810f654a319 (diff)
downloadrust-597b3fd03fa1213ede610088569decd390d2c2fb.tar.gz
rust-597b3fd03fa1213ede610088569decd390d2c2fb.zip
auto merge of #8305 : huonw/rust/triage-fixes, r=cmr
The two deletions are because the test cases are very old (still using `class` and modes!), and, as far as I can tell (since they are so old), the areas they test are well tested by other rpass tests.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/str.rs25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/libstd/str.rs b/src/libstd/str.rs
index b4057b85cbf..cd7aac020ed 100644
--- a/src/libstd/str.rs
+++ b/src/libstd/str.rs
@@ -3304,19 +3304,22 @@ mod tests {
     fn test_add() {
         #[allow(unnecessary_allocation)];
         macro_rules! t (
-            ($s1:expr, $s2:expr, $e:expr) => {
-                assert_eq!($s1 + $s2, $e);
-                assert_eq!($s1.to_owned() + $s2, $e);
-                assert_eq!($s1.to_managed() + $s2, $e);
-            }
+            ($s1:expr, $s2:expr, $e:expr) => { {
+                let s1 = $s1;
+                let s2 = $s2;
+                let e = $e;
+                assert_eq!(s1 + s2, e.to_owned());
+                assert_eq!(s1.to_owned() + s2, e.to_owned());
+                assert_eq!(s1.to_managed() + s2, e.to_owned());
+            } }
         );
 
-        t!("foo",  "bar", ~"foobar");
-        t!("foo", @"bar", ~"foobar");
-        t!("foo", ~"bar", ~"foobar");
-        t!("ศไทย中",  "华Việt Nam", ~"ศไทย中华Việt Nam");
-        t!("ศไทย中", @"华Việt Nam", ~"ศไทย中华Việt Nam");
-        t!("ศไทย中", ~"华Việt Nam", ~"ศไทย中华Việt Nam");
+        t!("foo",  "bar", "foobar");
+        t!("foo", @"bar", "foobar");
+        t!("foo", ~"bar", "foobar");
+        t!("ศไทย中",  "华Việt Nam", "ศไทย中华Việt Nam");
+        t!("ศไทย中", @"华Việt Nam", "ศไทย中华Việt Nam");
+        t!("ศไทย中", ~"华Việt Nam", "ศไทย中华Việt Nam");
     }
 
     #[test]