From e5271405480f53ab1ed05da11001858c25be8558 Mon Sep 17 00:00:00 2001 From: Michael Sullivan Date: Fri, 12 Aug 2011 15:14:17 -0700 Subject: [PATCH] Change some tests that used binop autoderef. --- src/test/run-pass/bind-exterior.rs | 4 ++-- src/test/run-pass/binops.rs | 5 ++--- src/test/run-pass/expr-elseif-ref.rs | 4 ++-- src/test/run-pass/generic-exterior-box.rs | 4 ++-- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/test/run-pass/bind-exterior.rs b/src/test/run-pass/bind-exterior.rs index 37850764855..67784fa12d0 100644 --- a/src/test/run-pass/bind-exterior.rs +++ b/src/test/run-pass/bind-exterior.rs @@ -1,5 +1,5 @@ -fn foo(a: @int, b: @int) -> int { ret a + b; } +fn foo(a: @int, b: @int) -> int { ret *a + *b; } -fn main() { let f1 = bind foo(@10, @12); assert (f1() == 22); } \ No newline at end of file +fn main() { let f1 = bind foo(@10, @12); assert (f1() == 22); } diff --git a/src/test/run-pass/binops.rs b/src/test/run-pass/binops.rs index 87f6f8a2f9f..0863cb6b703 100644 --- a/src/test/run-pass/binops.rs +++ b/src/test/run-pass/binops.rs @@ -53,9 +53,8 @@ fn test_char() { } fn test_box() { - assert (@10 == 10); - assert (0xFF & @0xF0 == 0xF0); - assert ({a: 1, b: 3} < @{a: 1, b: 4}); + assert (@10 == @10); + assert (@{a: 1, b: 3} < @{a: 1, b: 4}); assert (@{a: 'x'} != @{a: 'y'}); } diff --git a/src/test/run-pass/expr-elseif-ref.rs b/src/test/run-pass/expr-elseif-ref.rs index 6c3dc3891d1..1de7fa6e414 100644 --- a/src/test/run-pass/expr-elseif-ref.rs +++ b/src/test/run-pass/expr-elseif-ref.rs @@ -3,5 +3,5 @@ fn main() { let y: @uint = @10u; let x = if false { y } else if (true) { y } else { y }; - assert (y == 10u); -} \ No newline at end of file + assert (*y == 10u); +} diff --git a/src/test/run-pass/generic-exterior-box.rs b/src/test/run-pass/generic-exterior-box.rs index 8efac57c2f3..91046c62c04 100644 --- a/src/test/run-pass/generic-exterior-box.rs +++ b/src/test/run-pass/generic-exterior-box.rs @@ -7,5 +7,5 @@ fn reclift[T](t: &T) -> recbox[T] { ret {x: @t}; } fn main() { let foo: int = 17; let rbfoo: recbox[int] = reclift[int](foo); - assert (rbfoo.x == foo); -} \ No newline at end of file + assert (*rbfoo.x == foo); +}