mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 10:02:47 +03:00
test: adds trivial unit tests for nock 6 invariants
This commit is contained in:
parent
a7168478f3
commit
a5f779d8f9
32
pkg/arvo/tests/sys/hoon/mock.hoon
Normal file
32
pkg/arvo/tests/sys/hoon/mock.hoon
Normal file
@ -0,0 +1,32 @@
|
||||
/+ *test
|
||||
|%
|
||||
:: nock 6 should allow invalid formulas in unevaluated branches
|
||||
::
|
||||
++ test-conditional-skips
|
||||
;: weld
|
||||
%+ expect-eq
|
||||
!> 43
|
||||
!> .*(~ [%6 [%1 1] 0 [%1 43]])
|
||||
::
|
||||
%- expect-fail
|
||||
|. .*(~ [%6 [%1 0] 0 [%1 43]])
|
||||
::
|
||||
%+ expect-eq
|
||||
!> 42
|
||||
!> .*(~ [%6 [%1 0] [%1 42] 0])
|
||||
::
|
||||
%- expect-fail
|
||||
|. .*(~ [%6 [%1 1] [%1 42] 0])
|
||||
::
|
||||
%+ expect-eq
|
||||
!> 42
|
||||
!> .*(~ [%6 [%1 0] [%1 42] %1 43])
|
||||
::
|
||||
%+ expect-eq
|
||||
!> 43
|
||||
!> .*(~ [%6 [%1 1] [%1 42] %1 43])
|
||||
::
|
||||
%- expect-fail
|
||||
|. .*(~ [%6 [%1 2] [%1 42] %1 43])
|
||||
==
|
||||
--
|
Loading…
Reference in New Issue
Block a user