rust/src/test/run-pass/opeq.rs

20 lines
266 B
Rust
Raw Normal View History

2010-06-23 23:03:09 -05:00
// -*- rust -*-
fn main() {
let mut x: int = 1;
x *= 2;
log(debug, x);
assert (x == 2);
x += 3;
log(debug, x);
assert (x == 5);
x *= x;
log(debug, x);
assert (x == 25);
x /= 5;
log(debug, x);
assert (x == 5);
}