]> git.proxmox.com Git - rustc.git/blobdiff - src/test/run-pass/match-pattern-lit.rs
Imported Upstream version 1.2.0+dfsg1
[rustc.git] / src / test / run-pass / match-pattern-lit.rs
index 3e01253094b0700fa4cdb114521b6386f423e6d5..32de1c6c6742747a9fc77d2727926d2deea4e820 100644 (file)
 
 
 
-fn altlit(f: int) -> int {
+fn altlit(f: isize) -> isize {
     match f {
-      10 => { debug!("case 10"); return 20; }
-      11 => { debug!("case 11"); return 22; }
-      _  => fail!("the impossible happened")
+      10 => { println!("case 10"); return 20; }
+      11 => { println!("case 11"); return 22; }
+      _  => panic!("the impossible happened")
     }
 }
 
-pub fn main() { assert!((altlit(10) == 20)); assert!((altlit(11) == 22)); }
+pub fn main() {
+    assert_eq!(altlit(10), 20);
+    assert_eq!(altlit(11), 22);
+}