c53402846e
While it is still technically possible to test stage 0, it is not part of any of the main testing rules and maintaining xfail-stage0 is a chore. Nobody should worry about how tests fare in stage0.
10 lines
229 B
Rust
10 lines
229 B
Rust
fn add1(i: int) -> int { ret i + 1; }
|
|
fn main() {
|
|
let f = @add1;
|
|
let g = @f;
|
|
let h = @@@add1;
|
|
assert (f(5) == 6);
|
|
assert (g(8) == 9);
|
|
assert (h(0x1badd00d) == 0x1badd00e);
|
|
assert ((@add1)(42) == 43);
|
|
} |