From 4b4421c101a269051e53d76313d5035d27b4b074 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Fri, 21 Feb 2025 13:58:58 +0000 Subject: Add unit tests for lib.functions.range --- tests/functions.lisp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests') 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))) -- cgit v1.2.3-13-gbd6f