aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2025-02-21 13:58:58 +0000
committerAryadev Chavali <aryadev@aryadevchavali.com>2025-02-21 14:11:08 +0000
commit4b4421c101a269051e53d76313d5035d27b4b074 (patch)
treeebf09a737b9b66028c914376b6062332cee57582 /tests
parent53174000dfaebbe4ecb5b9a89bcf16bea0fdf547 (diff)
downloadcantedraw-4b4421c101a269051e53d76313d5035d27b4b074.tar.gz
cantedraw-4b4421c101a269051e53d76313d5035d27b4b074.tar.bz2
cantedraw-4b4421c101a269051e53d76313d5035d27b4b074.zip
Add unit tests for lib.functions.range
Diffstat (limited to 'tests')
-rw-r--r--tests/functions.lisp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/functions.lisp b/tests/functions.lisp
index ef6b83e..0025827 100644
--- a/tests/functions.lisp
+++ b/tests/functions.lisp
@@ -30,3 +30,12 @@
(is eq nil (parse-integer* "a2048abcdef"))
(is eq nil (parse-integer* "garbage"))
(fail (parse-integer* nil)))
+
+(define-test (function-test range)
+ :compile-at :execute
+ (fail (range 1 0))
+ (fail (range nil nil))
+ (fail (range "a" "b"))
+ (true (null (range 1 1)))
+ (is equal '(1 2 3 4) (range 1 5))
+ (is equal '(-3 -2 -1 0) (range -3 1)))