aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-04-01 14:04:41 -0500
committerJesse Luehrs <doy@tozt.net>2013-04-01 14:05:33 -0500
commit211ca6b62471d26fe70d0f51d63b73bcb478dc14 (patch)
tree657ddf50cc217cc3add535f475795961d59afc98
parent8c3e799dc2116824bcce31e4d1e3e0b08a56777c (diff)
downloadrust-term-211ca6b62471d26fe70d0f51d63b73bcb478dc14.tar.gz
rust-term-211ca6b62471d26fe70d0f51d63b73bcb478dc14.zip
s/fail_unless/assert/g
-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