2017-12-27 00:03:47 +03:00
|
|
|
/+ new-hoon, tester
|
|
|
|
=, myb:new-hoon
|
|
|
|
|_ tester-type:tester
|
|
|
|
++ test-from-list-null
|
2018-03-10 04:27:45 +03:00
|
|
|
(expect-eq (from-list ~) ~)
|
2017-12-27 00:03:47 +03:00
|
|
|
::
|
|
|
|
++ test-from-list-real
|
2018-03-10 04:27:45 +03:00
|
|
|
(expect-eq (from-list [5 ~]) [~ 5])
|
2017-12-27 00:03:47 +03:00
|
|
|
::
|
|
|
|
++ test-to-list-null
|
2018-03-10 04:27:45 +03:00
|
|
|
(expect-eq (to-list ~) ~)
|
2017-12-27 00:03:47 +03:00
|
|
|
::
|
|
|
|
++ test-to-list-real
|
2018-03-10 04:27:45 +03:00
|
|
|
(expect-eq (to-list [~ 5]) [5 ~])
|
2017-12-27 00:03:47 +03:00
|
|
|
::
|
|
|
|
++ test-concat-null
|
2018-03-10 04:27:45 +03:00
|
|
|
(expect-eq (concat ~) ~)
|
2017-12-27 00:03:47 +03:00
|
|
|
::
|
|
|
|
++ test-concat-real
|
|
|
|
:: wait, if i pull the cast out from below, the concat implementation
|
|
|
|
:: doesn't compile anymore?
|
2018-03-10 04:27:45 +03:00
|
|
|
(expect-eq (concat `(list (maybe @ud))`[~ [~ 1] ~ [~ 2] ~]) [1 2 ~])
|
2017-12-27 00:03:47 +03:00
|
|
|
::
|
|
|
|
++ test-map
|
2018-03-10 04:27:45 +03:00
|
|
|
%+ expect-eq
|
2017-12-27 00:03:47 +03:00
|
|
|
%+ map:myb
|
2018-03-10 04:27:45 +03:00
|
|
|
[1 2 3 2 ~]
|
2017-12-27 00:03:47 +03:00
|
|
|
|=(a/@u ?:(=(2 a) [~ 2] ~))
|
|
|
|
[2 2 ~]
|
|
|
|
--
|
|
|
|
|