rust/src/test/run-pass/expr-alt.rs

31 lines
347 B
Rust
Raw Normal View History

// xfail-boot
// -*- rust -*-
// Tests for using alt as an expression
fn test() {
let bool res = alt (true) {
case (true) {
true
}
case (false) {
false
}
};
check (res);
res = alt(false) {
case (true) {
false
}
case (false) {
true
}
};
check (res);
}
fn main() {
test();
2011-03-31 23:00:20 -05:00
}