mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-28 19:55:53 +03:00
48585d2b2f
+test now offloads creation of the test tree into a renderer. this should help with caching. using a renderer also lets us deal with hierarchical directory structures, leading to better organization.
33 lines
724 B
Plaintext
33 lines
724 B
Plaintext
/+ new-hoon, tester
|
|
=, myb:new-hoon
|
|
|_ tester-type:tester
|
|
++ test-from-list-null
|
|
(expect-eq (from-list ~) ~ "from-list")
|
|
::
|
|
++ test-from-list-real
|
|
(expect-eq (from-list [5 ~]) [~ 5] "from-list")
|
|
::
|
|
++ test-to-list-null
|
|
(expect-eq (to-list ~) ~ "to-list")
|
|
::
|
|
++ test-to-list-real
|
|
(expect-eq (to-list [~ 5]) [5 ~] "to-list")
|
|
::
|
|
++ test-concat-null
|
|
(expect-eq (concat ~) ~ "concat")
|
|
::
|
|
++ test-concat-real
|
|
:: wait, if i pull the cast out from below, the concat implementation
|
|
:: doesn't compile anymore?
|
|
(expect-eq (concat `(list (maybe @ud))`[~ [~ 1] ~ [~ 2] ~]) [1 2 ~] "concat")
|
|
::
|
|
++ test-map
|
|
%^ expect-eq
|
|
%+ map:myb
|
|
[1 2 3 2 ~]
|
|
|=(a/@u ?:(=(2 a) [~ 2] ~))
|
|
[2 2 ~]
|
|
"map"
|
|
--
|
|
|