Adding tests for sorting arrays of chars

This commit is contained in:
Chris Hall 2018-06-26 17:15:05 +10:00
parent 9b775fb10f
commit ba5287245f

View File

@ -74,5 +74,28 @@
&res
"Sort.sort works with strings"))
(let-do [arr [\d \a \c \b]
exp [\a \b \c \d]]
(Sort.sort! &arr)
(assert-equal test
&exp
&arr
"Sort.sort! works with chars"))
(let-do [arr [\d \a \c \b]
exp [\a \b \c \d]
res (Sort.sorted &arr)]
(assert-equal test
&exp
&res
"Sort.sorted works with chars"))
(let-do [res (Sort.sort [\d \a \c \b])
exp [\a \b \c \d]]
(assert-equal test
&exp
&res
"Sort.sort works with chars"))
(print-test-results test)))