Add alt-pattern-lit.rs test.

This commit is contained in:
Graydon Hoare 2011-02-10 19:13:39 -08:00
parent c89460bb65
commit 277334890d

View File

@ -0,0 +1,17 @@
fn altlit(int f) -> int {
alt (f) {
case (10) {
log "case 10";
ret 20;
}
case (11) {
log "case 11";
ret 22;
}
}
}
fn main() {
check (altlit(10) == 20);
check (altlit(11) == 22);
}