mirror of
https://github.com/janet-lang/janet
synced 2025-07-26 22:02:53 +00:00
add more test cases for partition
and mean
This commit is contained in:
parent
a7536268e1
commit
a5ff26f602
@ -349,6 +349,13 @@
|
|||||||
"sort 5")
|
"sort 5")
|
||||||
(assert (<= ;(sort (map (fn [x] (math/random)) (range 1000)))) "sort 6")
|
(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
|
# And and or
|
||||||
# c16a9d846
|
# c16a9d846
|
||||||
(assert (= (and true true) true) "and true true")
|
(assert (= (and true true) true) "and true true")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user