diff options
author | Leah Neukirchen <leah@vuxu.org> | 2022-11-26 17:47:30 +0100 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2022-11-26 17:47:30 +0100 |
commit | b33a8d20e524ecf57568a3af8e814a7fb3f7dd62 (patch) | |
tree | d65285cdcf2697355b78748ebfaf174d959854d4 /tests | |
parent | 3360494dad789393fad412207dfc0b497dac887f (diff) | |
download | mew-b33a8d20e524ecf57568a3af8e814a7fb3f7dd62.tar.gz mew-b33a8d20e524ecf57568a3af8e814a7fb3f7dd62.tar.xz mew-b33a8d20e524ecf57568a3af8e814a7fb3f7dd62.zip |
add rand
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test.mew | 6 |
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))) |