2012-03-10 20:38:03 -08:00
|
|
|
fn main() {
|
2012-03-22 08:39:41 -07:00
|
|
|
let mut i = 0u;
|
2012-03-10 20:38:03 -08:00
|
|
|
loop {
|
2012-07-13 22:57:48 -07:00
|
|
|
log(error, ~"a");
|
2012-03-10 20:38:03 -08:00
|
|
|
i += 1u;
|
|
|
|
if i == 10u {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
assert (i == 10u);
|
2012-03-22 08:39:41 -07:00
|
|
|
let mut is_even = false;
|
2012-03-10 20:38:03 -08:00
|
|
|
loop {
|
2012-03-10 21:19:02 -08:00
|
|
|
if i == 21u {
|
|
|
|
break;
|
|
|
|
}
|
2012-07-13 22:57:48 -07:00
|
|
|
log(error, ~"b");
|
2012-03-10 20:38:03 -08:00
|
|
|
is_even = false;
|
|
|
|
i += 1u;
|
|
|
|
if i % 2u != 0u {
|
2012-09-04 13:36:54 -07:00
|
|
|
loop;
|
2012-03-10 20:38:03 -08:00
|
|
|
}
|
|
|
|
is_even = true;
|
|
|
|
}
|
|
|
|
assert !is_even;
|
|
|
|
loop {
|
2012-07-13 22:57:48 -07:00
|
|
|
log(error, ~"c");
|
2012-03-10 20:38:03 -08:00
|
|
|
if i == 22u {
|
|
|
|
break;
|
|
|
|
}
|
2012-03-10 21:19:02 -08:00
|
|
|
is_even = false;
|
2012-03-10 20:38:03 -08:00
|
|
|
i += 1u;
|
|
|
|
if i % 2u != 0u {
|
2012-09-04 13:36:54 -07:00
|
|
|
loop;
|
2012-03-10 20:38:03 -08:00
|
|
|
}
|
|
|
|
is_even = true;
|
|
|
|
}
|
|
|
|
assert is_even;
|
|
|
|
}
|