Change checks to asserts in test/bench files

This commit is contained in:
Tim Chevalier 2011-05-02 13:50:34 -07:00 committed by Graydon Hoare
parent 4f892dd9d7
commit bc5650a9d0
2 changed files with 6 additions and 6 deletions

View File

@ -13,13 +13,13 @@ fn ack(int m, int n) -> int {
}
fn main() {
check (ack(0,0) == 1);
check (ack(3,2) == 29);
check (ack(3,4) == 125);
assert (ack(0,0) == 1);
assert (ack(3,2) == 29);
assert (ack(3,4) == 125);
// This takes a while; but a comparison may amuse: on win32 at least, the
// posted C version of the 'benchmark' running ack(4,1) overruns its stack
// segment and crashes. We just grow our stack (to 4mb) as we go.
// check (ack(4,1) == 65533);
// assert (ack(4,1) == 65533);
}

View File

@ -15,8 +15,8 @@ fn fib(int n) -> int {
}
fn main() {
check (fib(8) == 21);
check (fib(15) == 610);
assert (fib(8) == 21);
assert (fib(15) == 610);
log fib(8);
log fib(15);
}