summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test.mew6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test.mew b/tests/test.mew
index 904059d..d0b5685 100644
--- a/tests/test.mew
+++ b/tests/test.mew
@@ -24,6 +24,12 @@
   (test '(11 22 33) (sort (vals (tbl 1 11 2 22 3 33)) <))
   (test-error (vals #(1 2 3))))
 
+(test-group "rand"
+  (test #f (integer? (rand)))
+  (test #t (integer? (rand 6)))
+  (test #t (<= 2 (rand 2 6)))
+  (test #t (< (rand 2 6) 6)))
+
 (test-group "range"
   (test '(1 2 3) (into '() (range 1 4)))
   (test '() (into '() (range 4 1)))