about summary refs log tree commit diff
path: root/src/libcoretest
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcoretest')
-rw-r--r--src/libcoretest/any.rs16
-rw-r--r--src/libcoretest/finally.rs2
-rw-r--r--src/libcoretest/iter.rs12
-rw-r--r--src/libcoretest/option.rs6
-rw-r--r--src/libcoretest/result.rs8
5 files changed, 22 insertions, 22 deletions
diff --git a/src/libcoretest/any.rs b/src/libcoretest/any.rs
index 9656a6caba0..7c832e90ed9 100644
--- a/src/libcoretest/any.rs
+++ b/src/libcoretest/any.rs
@@ -56,12 +56,12 @@ fn any_downcast_ref() {
 
     match a.downcast_ref::<uint>() {
         Some(&5) => {}
-        x => fail!("Unexpected value {}", x)
+        x => panic!("Unexpected value {}", x)
     }
 
     match a.downcast_ref::<Test>() {
         None => {}
-        x => fail!("Unexpected value {}", x)
+        x => panic!("Unexpected value {}", x)
     }
 }
 
@@ -79,7 +79,7 @@ fn any_downcast_mut() {
             assert_eq!(*x, 5u);
             *x = 612;
         }
-        x => fail!("Unexpected value {}", x)
+        x => panic!("Unexpected value {}", x)
     }
 
     match b_r.downcast_mut::<uint>() {
@@ -87,27 +87,27 @@ fn any_downcast_mut() {
             assert_eq!(*x, 7u);
             *x = 413;
         }
-        x => fail!("Unexpected value {}", x)
+        x => panic!("Unexpected value {}", x)
     }
 
     match a_r.downcast_mut::<Test>() {
         None => (),
-        x => fail!("Unexpected value {}", x)
+        x => panic!("Unexpected value {}", x)
     }
 
     match b_r.downcast_mut::<Test>() {
         None => (),
-        x => fail!("Unexpected value {}", x)
+        x => panic!("Unexpected value {}", x)
     }
 
     match a_r.downcast_mut::<uint>() {
         Some(&612) => {}
-        x => fail!("Unexpected value {}", x)
+        x => panic!("Unexpected value {}", x)
     }
 
     match b_r.downcast_mut::<uint>() {
         Some(&413) => {}
-        x => fail!("Unexpected value {}", x)
+        x => panic!("Unexpected value {}", x)
     }
 }
 
diff --git a/src/libcoretest/finally.rs b/src/libcoretest/finally.rs
index 5da004086d2..032f5f71941 100644
--- a/src/libcoretest/finally.rs
+++ b/src/libcoretest/finally.rs
@@ -35,7 +35,7 @@ fn test_fail() {
         &mut i, (),
         |i, ()| {
             *i = 10;
-            fail!();
+            panic!();
         },
         |i| {
             assert!(failing());
diff --git a/src/libcoretest/iter.rs b/src/libcoretest/iter.rs
index 476a2b50fcc..98db377b0d5 100644
--- a/src/libcoretest/iter.rs
+++ b/src/libcoretest/iter.rs
@@ -373,7 +373,7 @@ fn test_all() {
     assert!(v.iter().all(|&x| x < 10));
     assert!(!v.iter().all(|&x| x % 2 == 0));
     assert!(!v.iter().all(|&x| x > 100));
-    assert!(v.slice_or_fail(&0, &0).iter().all(|_| fail!()));
+    assert!(v.slice_or_fail(&0, &0).iter().all(|_| panic!()));
 }
 
 #[test]
@@ -382,7 +382,7 @@ fn test_any() {
     assert!(v.iter().any(|&x| x < 10));
     assert!(v.iter().any(|&x| x % 2 == 0));
     assert!(!v.iter().any(|&x| x > 100));
-    assert!(!v.slice_or_fail(&0, &0).iter().any(|_| fail!()));
+    assert!(!v.slice_or_fail(&0, &0).iter().any(|_| panic!()));
 }
 
 #[test]
@@ -528,13 +528,13 @@ fn test_rposition() {
 
 #[test]
 #[should_fail]
-fn test_rposition_fail() {
+fn test_rposition_panic() {
     let v = [(box 0i, box 0i), (box 0i, box 0i),
              (box 0i, box 0i), (box 0i, box 0i)];
     let mut i = 0i;
     v.iter().rposition(|_elt| {
         if i == 2 {
-            fail!()
+            panic!()
         }
         i += 1;
         false
@@ -678,12 +678,12 @@ fn test_random_access_cycle() {
 fn test_double_ended_range() {
     assert!(range(11i, 14).rev().collect::<Vec<int>>() == vec![13i, 12, 11]);
     for _ in range(10i, 0).rev() {
-        fail!("unreachable");
+        panic!("unreachable");
     }
 
     assert!(range(11u, 14).rev().collect::<Vec<uint>>() == vec![13u, 12, 11]);
     for _ in range(10u, 0).rev() {
-        fail!("unreachable");
+        panic!("unreachable");
     }
 }
 
diff --git a/src/libcoretest/option.rs b/src/libcoretest/option.rs
index 71e9270fe4b..18444fc4240 100644
--- a/src/libcoretest/option.rs
+++ b/src/libcoretest/option.rs
@@ -139,14 +139,14 @@ fn test_unwrap() {
 
 #[test]
 #[should_fail]
-fn test_unwrap_fail1() {
+fn test_unwrap_panic1() {
     let x: Option<int> = None;
     x.unwrap();
 }
 
 #[test]
 #[should_fail]
-fn test_unwrap_fail2() {
+fn test_unwrap_panic2() {
     let x: Option<String> = None;
     x.unwrap();
 }
@@ -233,7 +233,7 @@ fn test_collect() {
     assert!(v == None);
 
     // test that it does not take more elements than it needs
-    let mut functions = [|| Some(()), || None, || fail!()];
+    let mut functions = [|| Some(()), || None, || panic!()];
 
     let v: Option<Vec<()>> = functions.iter_mut().map(|f| (*f)()).collect();
 
diff --git a/src/libcoretest/result.rs b/src/libcoretest/result.rs
index 1cb72bd9eac..92124e2f299 100644
--- a/src/libcoretest/result.rs
+++ b/src/libcoretest/result.rs
@@ -81,7 +81,7 @@ fn test_collect() {
     assert!(v == Err(2));
 
     // test that it does not take more elements than it needs
-    let mut functions = [|| Ok(()), || Err(1i), || fail!()];
+    let mut functions = [|| Ok(()), || Err(1i), || panic!()];
 
     let v: Result<Vec<()>, int> = functions.iter_mut().map(|f| (*f)()).collect();
     assert!(v == Err(1));
@@ -113,7 +113,7 @@ pub fn test_unwrap_or_else() {
         if msg == "I got this." {
             50i
         } else {
-            fail!("BadBad")
+            panic!("BadBad")
         }
     }
 
@@ -126,12 +126,12 @@ pub fn test_unwrap_or_else() {
 
 #[test]
 #[should_fail]
-pub fn test_unwrap_or_else_failure() {
+pub fn test_unwrap_or_else_panic() {
     fn handler(msg: &'static str) -> int {
         if msg == "I got this." {
             50i
         } else {
-            fail!("BadBad")
+            panic!("BadBad")
         }
     }