test: add generics

This commit is contained in:
hellerve 2020-01-28 21:32:15 +01:00
parent 6c1901cccb
commit 29d34bbeee

21
test/generics.carp Normal file
View File

@ -0,0 +1,21 @@
(load "Test.carp")
(use Test)
(deftest test
(assert-equal test
1
(id 1)
"id works I"
)
(assert-equal test
&(Maybe.Just 1)
&(id (Maybe.Just 1))
"id works II"
)
(assert-equal test
20
((const 20) 1)
"const works"
)
)