2018-06-26 10:09:33 +03:00
|
|
|
(use Char)
|
|
|
|
|
|
|
|
(load "Test.carp")
|
|
|
|
(use Test)
|
|
|
|
|
2018-11-07 18:11:38 +03:00
|
|
|
(deftest test
|
|
|
|
(assert-true test
|
|
|
|
(= \a \a)
|
|
|
|
"char = works as expected I")
|
|
|
|
(assert-true test
|
|
|
|
(= &\a &\a)
|
|
|
|
"char = works as expected II")
|
|
|
|
(assert-true test
|
|
|
|
(/= \a \b)
|
|
|
|
"char /= works as expected I")
|
|
|
|
(assert-true test
|
|
|
|
(/= &\a &\b)
|
|
|
|
"char /= works as expected II")
|
|
|
|
(assert-true test
|
|
|
|
(< \a \b)
|
|
|
|
"char < works as expected I")
|
|
|
|
(assert-true test
|
|
|
|
(< &\a &\b)
|
|
|
|
"char < works as expected II")
|
|
|
|
(assert-true test
|
|
|
|
(> \b \a)
|
|
|
|
"char > works as expected I")
|
|
|
|
(assert-true test
|
|
|
|
(> &\b &\a)
|
|
|
|
"char > works as expected II")
|
|
|
|
(assert-equal test
|
|
|
|
0
|
|
|
|
(meaning &\0)
|
|
|
|
"meaning works as expected 0")
|
|
|
|
(assert-equal test
|
|
|
|
9
|
|
|
|
(meaning &\9)
|
|
|
|
"meaning works as expected 9")
|
|
|
|
(assert-true test
|
|
|
|
(upper-case? \A)
|
|
|
|
"upper-case? works as expected I")
|
|
|
|
(assert-false test
|
|
|
|
(upper-case? \a)
|
|
|
|
"upper-case? works as expected II")
|
|
|
|
(assert-false test
|
|
|
|
(upper-case? \#)
|
|
|
|
"upper-case? works as expected III")
|
|
|
|
(assert-true test
|
|
|
|
(lower-case? \a)
|
|
|
|
"lower-case? works as expected I")
|
|
|
|
(assert-false test
|
|
|
|
(lower-case? \A)
|
|
|
|
"lower-case? works as expected II")
|
|
|
|
(assert-false test
|
|
|
|
(lower-case? \#)
|
|
|
|
"lower-case? works as expected III")
|
2018-06-26 10:09:33 +03:00
|
|
|
)
|