/src/test/run-pass/opeq.rs
http://github.com/jruderman/rust · Rust · 19 lines · 15 code · 3 blank · 1 comment · 4 complexity · fde01a775df8c1ea49c684c183ae9d25 MD5 · raw file
- // -*- 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);
- }