mirror of
https://github.com/carp-lang/Carp.git
synced 2024-11-14 18:47:42 +03:00
adding test.char
This commit is contained in:
parent
16bdd7f854
commit
d768cc69f0
34
test/char.carp
Normal file
34
test/char.carp
Normal file
@ -0,0 +1,34 @@
|
||||
(use Char)
|
||||
|
||||
(load "Test.carp")
|
||||
(use Test)
|
||||
|
||||
(defn main []
|
||||
(with-test 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")
|
||||
(print-test-results test)
|
||||
)
|
||||
)
|
Loading…
Reference in New Issue
Block a user