Add an XFAILed test for treating alts as expressions

This commit is contained in:
Brian Anderson 2011-03-28 00:46:16 -04:00
parent dcf04ffbad
commit efb738153c

View File

@ -0,0 +1,31 @@
// xfail-boot
// xfail-stage0
// -*- 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();
}