shrub/pkg/arvo/tests/sys/hoon/vases.hoon

30 lines
544 B
Plaintext
Raw Normal View History

2019-08-01 21:21:24 +03:00
/+ *test
|%
2019-08-01 22:02:25 +03:00
++ test-slam-wa-dry ^- tang
::
%+ expect-eq
!>(7)
-:(~(slam wa *worm) !>(add) !>([3 4]))
::
++ test-slam-wa-wet ^- tang
::
=/ list-type=type -:!>(*(list @))
=| worm0=worm
=+ [res1 worm1]=(~(slam wa worm0) !>(flop) [list-type ~[1 2 3]])
=+ [res2 worm2]=(~(slam wa worm1) !>(flop) [list-type ~[4 5 6]])
2019-08-01 21:21:24 +03:00
::
;: weld
%+ expect-eq
2019-08-01 22:02:25 +03:00
res1
[list-type ~[3 2 1]]
2019-08-01 21:21:24 +03:00
::
%+ expect-eq
2019-08-01 22:02:25 +03:00
res2
[list-type ~[6 5 4]]
2019-08-01 21:21:24 +03:00
::
2019-08-01 22:02:25 +03:00
%+ expect-eq
!> worm1
!> worm2
2019-08-01 21:21:24 +03:00
==
--