mirror of
https://github.com/urbit/shrub.git
synced 2025-01-01 17:16:47 +03:00
test: +expect-yes, +expect-crash
This commit is contained in:
parent
5854162e74
commit
b285ebe407
@ -1,6 +1,20 @@
|
||||
:: testing utilities meant to be directly used from files in %/tests
|
||||
::
|
||||
|%
|
||||
++ expect-yes
|
||||
|= [message=tape actual=?]
|
||||
^- tang
|
||||
?: actual ~
|
||||
[leaf+message]~
|
||||
::
|
||||
++ expect-crash
|
||||
|* [message=tape go=(trap)]
|
||||
^- tang
|
||||
=/ res (mule go)
|
||||
?- -.res
|
||||
%| ~
|
||||
%& ~[leaf+"expected crash" leaf+message]
|
||||
==
|
||||
:: +expect-eq: compares :expected and :actual and pretty-prints the result
|
||||
::
|
||||
++ expect-eq
|
||||
|
Loading…
Reference in New Issue
Block a user