mirror of
https://github.com/carp-lang/Carp.git
synced 2024-11-04 01:25:04 +03:00
adding Array.sort* tests to test/array
This commit is contained in:
parent
61274c1dc9
commit
1daf9f0db0
@ -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))))
|
||||
|
Loading…
Reference in New Issue
Block a user