aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/term.rs2
-rw-r--r--src/util.rs6
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<int>, 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<int>, find: &str) {
#[cfg(test)]
fn check_has_prefix (trie: &Trie<int>, find: &str) {
- fail_unless!(trie.has_prefix(find));
+ assert!(trie.has_prefix(find));
}
#[cfg(test)]
fn check_not_has_prefix (trie: &Trie<int>, 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