Add alt-pattern-lit.rs test.
This commit is contained in:
parent
c89460bb65
commit
277334890d
17
src/test/run-pass/alt-pattern-lit.rs
Normal file
17
src/test/run-pass/alt-pattern-lit.rs
Normal 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);
|
||||
}
|
Loading…
Reference in New Issue
Block a user