Unflop hoons

This commit is contained in:
Elliot Glaysher 2018-05-21 11:04:02 -07:00
parent 1647f60213
commit 5bb0cc50d9
2 changed files with 66 additions and 2 deletions

View File

@ -84,6 +84,7 @@
test-plan-direct-hoon
test-core
test-core-linker
test-core-multi-hoon
test-core-fsts-fssg
test-core-fsdt-fskt
test-core-fskt-nest-fail
@ -4091,6 +4092,70 @@
(expect-ford-empty ford ~nul)
==
::
++ test-core-multi-hoon
~& %test-core-multi-hoon
::
=/ ford *ford-gate
::
=/ hoon-src-type=type [%atom %$ ~]
=/ scry-results=(map [term beam] cage)
%- my :~
:- [%cx [[~nul %home %da ~1234.5.6] /hoon/program/gen]]
:- %hoon
:- hoon-src-type
'''
|%
+= data-type
[msg=tape count=@ud]
--
|%
++ data
^- data-type
["one" 1]
--
data
'''
==
::
=^ results1 ford
%- test-ford-call-with-comparator :*
ford
now=~1234.5.6
scry=(scry-with-results scry-results)
::
^= call-args
:* duct=~[/path] type=~ %make ~nul
%pin ~1234.5.6
[%core source-path=`rail:ford-gate`[[~nul %home] /hoon/program/gen]]
==
::
^= comparator
|= moves=(list move:ford-gate)
::
?> =(1 (lent moves))
?> ?=(^ moves)
?> ?=([* %give %made @da %complete %success %pin *] i.moves)
=/ result result.p.card.i.moves
=/ pin-result build-result.result
?> ?=([%success %core *] build-result.pin-result)
::
=/ =vase vase.build-result.pin-result
::
%+ weld
%- expect-eq !>
:- ["one" 1]
q.vase
::
%- expect-eq !>
:- &
(~(nest ut p.vase) | -:!>(["one" 1]))
==
::
;: weld
results1
(expect-ford-empty ford ~nul)
==
::
++ test-core-fsts-fssg
~& %test-core-fsts-fssg
::

View File

@ -3425,9 +3425,8 @@
++ stack-sources
|= sources=(list brick)
^- hoon
:: TODO why flop?
::
=- [%tssg (flop -)]
=- [%tssg -]
%+ turn sources
|= =brick
^- hoon