From 211ca6b62471d26fe70d0f51d63b73bcb478dc14 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 1 Apr 2013 14:04:41 -0500 Subject: s/fail_unless/assert/g --- src/term.rs | 2 +- src/util.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/term.rs b/src/term.rs index 564eca7..70d5e1c 100644 --- a/src/term.rs +++ b/src/term.rs @@ -197,7 +197,7 @@ impl Reader { } fn next_key (&mut self) -> Keypress { - fail_unless!(str::len(self.buf) > 0); + assert!(str::len(self.buf) > 0); for uint::range_rev(str::len(self.buf), 0) |i| { match self.escapes.find(str::slice(self.buf, 0, i)) { &Some(k) => { diff --git a/src/util.rs b/src/util.rs index 8ed877a..387f6ca 100644 --- a/src/util.rs +++ b/src/util.rs @@ -198,7 +198,7 @@ fn test_trie1 () { #[cfg(test)] fn check_exists (trie: &Trie, find: &str, value: int) { match trie.find(find) { - &Some(v) => { fail_unless!(v == value) } + &Some(v) => { assert!(v == value) } &None => { fail!(fmt!("didn't find %?", find)) } } } @@ -213,12 +213,12 @@ fn check_not_exists (trie: &Trie, find: &str) { #[cfg(test)] fn check_has_prefix (trie: &Trie, find: &str) { - fail_unless!(trie.has_prefix(find)); + assert!(trie.has_prefix(find)); } #[cfg(test)] fn check_not_has_prefix (trie: &Trie, find: &str) { - fail_unless!(!trie.has_prefix(find)); + assert!(!trie.has_prefix(find)); } // XXX huge hack until there's a better built-in way to do this -- cgit v1.2.3-54-g00ecf