2012-03-10 22:38:03 -06:00
|
|
|
fn main() {
|
2012-03-22 10:39:41 -05:00
|
|
|
let mut i = 0u;
|
2012-03-10 22:38:03 -06:00
|
|
|
loop {
|
|
|
|
log(error, "a");
|
|
|
|
i += 1u;
|
|
|
|
if i == 10u {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
assert (i == 10u);
|
2012-03-22 10:39:41 -05:00
|
|
|
let mut is_even = false;
|
2012-03-10 22:38:03 -06:00
|
|
|
loop {
|
2012-03-10 23:19:02 -06:00
|
|
|
if i == 21u {
|
|
|
|
break;
|
|
|
|
}
|
2012-03-10 22:38:03 -06:00
|
|
|
log(error, "b");
|
|
|
|
is_even = false;
|
|
|
|
i += 1u;
|
|
|
|
if i % 2u != 0u {
|
2012-07-09 16:37:48 -05:00
|
|
|
again;
|
2012-03-10 22:38:03 -06:00
|
|
|
}
|
|
|
|
is_even = true;
|
|
|
|
}
|
|
|
|
assert !is_even;
|
|
|
|
loop {
|
|
|
|
log(error, "c");
|
|
|
|
if i == 22u {
|
|
|
|
break;
|
|
|
|
}
|
2012-03-10 23:19:02 -06:00
|
|
|
is_even = false;
|
2012-03-10 22:38:03 -06:00
|
|
|
i += 1u;
|
|
|
|
if i % 2u != 0u {
|
2012-07-09 16:37:48 -05:00
|
|
|
again;
|
2012-03-10 22:38:03 -06:00
|
|
|
}
|
|
|
|
is_even = true;
|
|
|
|
}
|
|
|
|
assert is_even;
|
|
|
|
}
|