2017-12-27 00:03:47 +03:00
|
|
|
/+ new-hoon, tester
|
|
|
|
=, myb:new-hoon
|
2018-03-10 04:31:44 +03:00
|
|
|
|_ _tester:tester
|
2017-12-27 00:03:47 +03:00
|
|
|
++ test-from-list-null
|
2018-03-10 06:25:29 +03:00
|
|
|
(expect-eq !>([~ (from-list ~)]))
|
2017-12-27 00:03:47 +03:00
|
|
|
::
|
|
|
|
++ test-from-list-real
|
2018-03-10 06:25:29 +03:00
|
|
|
(expect-eq !>([[~ 5] (from-list [5 ~])]))
|
2017-12-27 00:03:47 +03:00
|
|
|
::
|
|
|
|
++ test-to-list-null
|
2018-03-10 06:25:29 +03:00
|
|
|
(expect-eq !>([~ (to-list ~)]))
|
2017-12-27 00:03:47 +03:00
|
|
|
::
|
|
|
|
++ test-to-list-real
|
2018-03-10 06:25:29 +03:00
|
|
|
(expect-eq !>([[5 ~] (to-list [~ 5])]))
|
2017-12-27 00:03:47 +03:00
|
|
|
::
|
|
|
|
++ test-concat-null
|
2018-03-10 06:25:29 +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 06:25:29 +03:00
|
|
|
(expect-eq !>([[1 2 ~] (concat `(list (maybe @ud))`[~ [~ 1] ~ [~ 2] ~])]))
|
2017-12-27 00:03:47 +03:00
|
|
|
::
|
|
|
|
++ test-map
|
2018-03-10 06:25:29 +03:00
|
|
|
%- expect-eq !>
|
|
|
|
:- [2 2 ~]
|
|
|
|
%+ map:myb
|
|
|
|
[1 2 3 2 ~]
|
|
|
|
|=(a/@u ?:(=(2 a) [~ 2] ~))
|
2017-12-27 00:03:47 +03:00
|
|
|
--
|
|
|
|
|