shrub/tests/sys/vane/gall.hoon

34 lines
701 B
Plaintext
Raw Normal View History

2019-08-23 19:46:57 +03:00
/+ *test
2020-04-19 03:01:26 +03:00
/= gall-raw /sys/vane/gall
2019-08-23 19:46:57 +03:00
::
2023-09-29 18:27:07 +03:00
=/ nec (gall-raw ~nec)
2019-08-23 19:46:57 +03:00
::
|%
2023-10-17 15:10:04 +03:00
++ time ~1111.1.1
2019-08-23 19:46:57 +03:00
:: +test-init: test %init
::
++ test-init
^- tang
::
::
=/ call-args
=/ =duct ~[/init]
2020-12-08 03:47:06 +03:00
=/ =task:gall [%init ~]
2020-12-06 11:38:37 +03:00
[duct task]
2019-08-23 19:46:57 +03:00
::
::
2023-10-17 15:10:04 +03:00
=^ moves nec
(gall-call nec time *roof call-args)
(expect-eq !>(moves) !>(*(list move:nec)))
2019-08-23 19:46:57 +03:00
:: +gall-call: have %gall run a +task and assert it produces expected-moves
::
++ gall-call
2023-09-29 18:27:07 +03:00
|= $: nec=_nec
2019-08-23 19:46:57 +03:00
now=@da
scry=roof
2020-12-08 03:47:06 +03:00
call-args=[=duct wrapped-task=(hobo task:gall)]
2019-08-23 19:46:57 +03:00
==
2023-09-29 18:27:07 +03:00
=/ gall-core (nec now=now eny=`@`0xdead.beef scry=scry)
2023-10-17 15:10:04 +03:00
(call:gall-core duct.call-args dud=~ wrapped-task.call-args)
2019-08-23 19:46:57 +03:00
--