Change some tests that used binop autoderef.

This commit is contained in:
Michael Sullivan 2011-08-12 15:14:17 -07:00
parent 1ba9af92bf
commit e527140548
4 changed files with 8 additions and 9 deletions

View File

@ -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); }
fn main() { let f1 = bind foo(@10, @12); assert (f1() == 22); }

View File

@ -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'});
}

View File

@ -3,5 +3,5 @@
fn main() {
let y: @uint = @10u;
let x = if false { y } else if (true) { y } else { y };
assert (y == 10u);
}
assert (*y == 10u);
}

View File

@ -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);
}
assert (*rbfoo.x == foo);
}