about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFelix S. Klock II <pnkfelix@pnkfx.org>2015-03-21 17:57:22 +0100
committerFelix S. Klock II <pnkfelix@pnkfx.org>2015-03-21 17:57:22 +0100
commit5e47c6655b41a1bbabb2b2f8891e0a41c9c60b5c (patch)
treea58406af7891d8b96ec24cc2e522a7f61e7ebb78
parent61ff823c63d90f323872862053e928b5a9c874e4 (diff)
downloadrust-5e47c6655b41a1bbabb2b2f8891e0a41c9c60b5c.tar.gz
rust-5e47c6655b41a1bbabb2b2f8891e0a41c9c60b5c.zip
workaround bugs in pretty-printer so that we can pass check-stage2-pretty-rpass.
-rw-r--r--src/test/run-pass/shift-near-oflo.rs28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/test/run-pass/shift-near-oflo.rs b/src/test/run-pass/shift-near-oflo.rs
index c656fc00fc2..4ff058f3366 100644
--- a/src/test/run-pass/shift-near-oflo.rs
+++ b/src/test/run-pass/shift-near-oflo.rs
@@ -26,18 +26,18 @@ fn test_left_shift() {
 
     macro_rules! tests {
         ($iN:ty, $uN:ty, $max_rhs:expr, $expect_i:expr, $expect_u:expr) => { {
-            let x = 1 as $iN << id(0);
+            let x = (1 as $iN) << id(0);
             assert_eq!(x, 1);
-            let x = 1 as $uN << id(0);
+            let x = (1 as $uN) << id(0);
             assert_eq!(x, 1);
-            let x = 1 as $iN << id($max_rhs);
+            let x = (1 as $iN) << id($max_rhs);
             assert_eq!(x, $expect_i);
-            let x = 1 as $uN << id($max_rhs);
+            let x = (1 as $uN) << id($max_rhs);
             assert_eq!(x, $expect_u);
             // high-order bits on LHS are silently discarded without panic.
-            let x = 3 as $iN << id($max_rhs);
+            let x = (3 as $iN) << id($max_rhs);
             assert_eq!(x, $expect_i);
-            let x = 3 as $uN << id($max_rhs);
+            let x = (3 as $uN) << id($max_rhs);
             assert_eq!(x, $expect_u);
         } }
     }
@@ -71,23 +71,23 @@ fn test_right_shift() {
         ($iN:ty, $uN:ty, $max_rhs:expr,
          $signbit_i:expr, $highbit_i:expr, $highbit_u:expr) =>
         { {
-            let x = 1 as $iN >> id(0);
+            let x = (1 as $iN) >> id(0);
             assert_eq!(x, 1);
-            let x = 1 as $uN >> id(0);
+            let x = (1 as $uN) >> id(0);
             assert_eq!(x, 1);
-            let x = $highbit_i >> id($max_rhs-1);
+            let x = ($highbit_i) >> id($max_rhs-1);
             assert_eq!(x, 1);
-            let x = $highbit_u >> id($max_rhs);
+            let x = ($highbit_u) >> id($max_rhs);
             assert_eq!(x, 1);
             // sign-bit is carried by arithmetic right shift
-            let x = $signbit_i >> id($max_rhs);
+            let x = ($signbit_i) >> id($max_rhs);
             assert_eq!(x, -1);
             // low-order bits on LHS are silently discarded without panic.
-            let x = $highbit_i + 1 >> id($max_rhs-1);
+            let x = ($highbit_i + 1) >> id($max_rhs-1);
             assert_eq!(x, 1);
-            let x = $highbit_u + 1 >> id($max_rhs);
+            let x = ($highbit_u + 1) >> id($max_rhs);
             assert_eq!(x, 1);
-            let x = $signbit_i + 1 >> id($max_rhs);
+            let x = ($signbit_i + 1) >> id($max_rhs);
             assert_eq!(x, -1);
         } }
     }