aboutsummaryrefslogtreecommitdiff
path: root/tests/arithmetic.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/arithmetic.lisp')
-rw-r--r--tests/arithmetic.lisp12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/arithmetic.lisp b/tests/arithmetic.lisp
new file mode 100644
index 0000000..2764b10
--- /dev/null
+++ b/tests/arithmetic.lisp
@@ -0,0 +1,12 @@
+(assert (= 1 (+ 1 0)))
+(assert (= -1 (- 0 1)))
+(assert (= -1 (- 1)))
+(assert (= 1.1 (+ 1 0.1)))
+(assert (= 2 (i/ 11 5)))
+(assert (= 1 (mod 11 5)))
+
+(assert-error (+ 1 "a"))
+(assert-error (- 1 "a"))
+(assert-error (* 1 "a"))
+(assert-error (/ 1 "a"))
+