mirror of
https://github.com/carp-lang/Carp.git
synced 2024-09-11 05:25:28 +03:00
test: add generics
This commit is contained in:
parent
6c1901cccb
commit
29d34bbeee
21
test/generics.carp
Normal file
21
test/generics.carp
Normal 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"
|
||||
)
|
||||
)
|
Loading…
Reference in New Issue
Block a user