summary refs log tree commit diff
path: root/src/test/run-pass/opeq.rs
blob: 59bbbcf794505a2d4f2f8d73324678f33f8c21ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19



// -*- 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);
}