diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/arithmetic.lisp | 2 | ||||
| -rw-r--r-- | tests/tailcall.lisp | 9 |
2 files changed, 11 insertions, 0 deletions
diff --git a/tests/arithmetic.lisp b/tests/arithmetic.lisp index 05459f6..6175705 100644 --- a/tests/arithmetic.lisp +++ b/tests/arithmetic.lisp @@ -14,6 +14,8 @@ (assert (>= 2 1)) (assert (>= 1 1)) (assert (not (>= 0 1))) +(assert (/= 2 1.0)) +(assert (not (/= 1 1))) (assert-error (+ 1 "a")) (assert-error (- 1 "a")) diff --git a/tests/tailcall.lisp b/tests/tailcall.lisp index 8cea496..86a88c8 100644 --- a/tests/tailcall.lisp +++ b/tests/tailcall.lisp @@ -12,6 +12,15 @@ (assert (is-odd 1)) (assert (is-even 2)) +(defun cnt-down (x) + (if (= x 0) + #t + (progn + (cnt-down (- x 1))))) + +(assert (cnt-down 10000)) + ;; can pass without stack overflow, ;; but comment out for too time-consuming ;; (assert (is-even 1000000)) +;; (assert (cnt-down 1000000)) |
