From 9376d7131a9f2a8df55a556110304bd9a2e39c40 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Sat, 26 Nov 2022 18:16:38 +0100 Subject: add sample --- tests/test.mew | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests') diff --git a/tests/test.mew b/tests/test.mew index cf84c97..e697751 100644 --- a/tests/test.mew +++ b/tests/test.mew @@ -35,6 +35,11 @@ (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)))) + (test #t ((one-of '(1 . 2) '(3 . 4)) (sample (tbl 1 2 3 4))))) + (test-group "range" (test '(1 2 3) (into '() (range 1 4))) (test '() (into '() (range 4 1))) -- cgit 1.4.1