rust/src/test/run-pass/while-with-break.rs
Huon Wilson e4f7561bcd Clean-up tests after debug!/std-macros change.
The entire testsuite is converted to using info! rather than debug!
because some depend on the code within the debug! being trans'd.
2013-07-17 03:10:13 +10:00

20 lines
330 B
Rust

// -*- rust -*-
pub fn main() {
let mut i: int = 90;
while i < 100 {
info!(i);
i = i + 1;
if i == 95 {
let v: ~[int] =
~[1, 2, 3, 4, 5]; // we check that it is freed by break
info!("breaking");
break;
}
}
assert_eq!(i, 95);
}