aboutsummaryrefslogtreecommitdiff
path: root/src/test/run-pass/lib-int.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/run-pass/lib-int.rs')
-rw-r--r--src/test/run-pass/lib-int.rs26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/test/run-pass/lib-int.rs b/src/test/run-pass/lib-int.rs
index 2e85abf6..e4e68351 100644
--- a/src/test/run-pass/lib-int.rs
+++ b/src/test/run-pass/lib-int.rs
@@ -4,22 +4,22 @@ import std._int;
import std._str.eq;
fn test_to_str() {
- check (eq(_int.to_str(0, 10u), "0"));
- check (eq(_int.to_str(1, 10u), "1"));
- check (eq(_int.to_str(-1, 10u), "-1"));
- check (eq(_int.to_str(255, 16u), "ff"));
- check (eq(_int.to_str(100, 10u), "100"));
+ assert (eq(_int.to_str(0, 10u), "0"));
+ assert (eq(_int.to_str(1, 10u), "1"));
+ assert (eq(_int.to_str(-1, 10u), "-1"));
+ assert (eq(_int.to_str(255, 16u), "ff"));
+ assert (eq(_int.to_str(100, 10u), "100"));
}
fn test_pow() {
- check (_int.pow(0, 0u) == 1);
- check (_int.pow(0, 1u) == 0);
- check (_int.pow(0, 2u) == 0);
- check (_int.pow(-1, 0u) == -1);
- check (_int.pow(1, 0u) == 1);
- check (_int.pow(-3, 2u) == 9);
- check (_int.pow(-3, 3u) == -27);
- check (_int.pow(4, 9u) == 262144);
+ assert (_int.pow(0, 0u) == 1);
+ assert (_int.pow(0, 1u) == 0);
+ assert (_int.pow(0, 2u) == 0);
+ assert (_int.pow(-1, 0u) == -1);
+ assert (_int.pow(1, 0u) == 1);
+ assert (_int.pow(-3, 2u) == 9);
+ assert (_int.pow(-3, 3u) == -27);
+ assert (_int.pow(4, 9u) == 262144);
}
fn main() {