adding Array.sort* tests to test/array

This commit is contained in:
Chris Hall 2018-06-26 17:37:24 +10:00
parent 61274c1dc9
commit 1daf9f0db0

View File

@ -173,4 +173,19 @@
(= five 5)
(= four 4))
"Array.pop-back! works as expected"))
(assert-equal test
&[1 2 3 4 5 6 7 8 9]
&(sort (range 9 1 -1))
"sort works as expected")
(let-do [arr [3 2 5]
exp [2 3 5]]
(sort! &arr)
(assert-equal test
&exp
&arr
"sort! works as expected"))
(assert-equal test
&[1 2 3 4 5 6 7 8 9]
&(sorted &[9 2 1 3 7 8 6 5 4])
"sorted works as expected")
(print-test-results test))))