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 e697751..50cb6bd 100644
--- a/tests/test.mew
+++ b/tests/test.mew
@@ -35,6 +35,12 @@
   (test #f (=? (shuffle #(1 2 3 4 5 6 7 8 9 0))
                (shuffle #(1 2 3 4 5 6 7 8 9 0)))))
 
+(test-group "shuffle!"
+  (test #t (loc (v #(1 2 3)) (eq? v (shuffle! v))))
+  (test #(1 2 3) (sort (shuffle! #(3 2 1)) <))
+  (test #f (=? (shuffle! #(1 2 3 4 5 6 7 8 9 0))
+               (shuffle! #(1 2 3 4 5 6 7 8 9 0)))))
+
 (test-group "sample"
   (test #t ((one-of 1 2 3) (sample '(1 2 3))))
   (test #t ((one-of 1 2 3) (sample #(1 2 3))))