1
0
mirror of https://github.com/janet-lang/janet synced 2025-01-12 08:30:26 +00:00

add more test cases for partition and mean

This commit is contained in:
primo-ppcg 2023-09-08 16:30:44 +07:00
parent a7536268e1
commit a5ff26f602

View File

@ -349,6 +349,13 @@
"sort 5")
(assert (<= ;(sort (map (fn [x] (math/random)) (range 1000)))) "sort 6")
# #1283
(assert (deep=
(partition 2 (generate [ i :in [:a :b :c :d :e]] i))
'@[(:a :b) (:c :d) (:e)]))
(assert (= (mean (generate [i :in [2 3 5 7 11]] i))
5.6))
# And and or
# c16a9d846
(assert (= (and true true) true) "and true true")