PageRenderTime 10ms CodeModel.GetById 1ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 1ms

/src/test/run-pass/lazy-and-or.rs

http://github.com/jruderman/rust
Rust | 12 lines | 9 code | 3 blank | 0 comment | 8 complexity | 555344e52824ce7ef0b932b038bbe6d7 MD5 | raw file
 1
 2
 3fn incr(&x: int) -> bool { x += 1; assert (false); return false; }
 4
 5fn main() {
 6    let x = 1 == 2 || 3 == 3;
 7    assert (x);
 8    let mut y: int = 10;
 9    log(debug, x || incr(y));
10    assert (y == 10);
11    if true && x { assert (true); } else { assert (false); }
12}