chibi-scheme/tests/snow/repo2/leonardo/fibonacci-test.scm
2015-04-11 01:01:07 +09:00

15 lines
301 B
Scheme

(import (scheme base) (scheme process-context) (leonardo fibonacci))
(define (test expect expr)
(cond
((not (equal? expect expr))
(write-string "FAIL\n")
(exit 1))))
(test 1 (fib 0))
(test 1 (fib 1))
(test 2 (fib 2))
(test 3 (fib 3))
(test 5 (fib 4))
(test 8 (fib 5))
(test 13 (fib 6))