10: Mass rename +expect-nu-eq to +expect-eq

This commit is contained in:
Elliot Glaysher 2018-08-29 11:09:37 -07:00
parent 4581cfab51
commit fbfabe50d3
13 changed files with 203 additions and 213 deletions

View File

@ -70,19 +70,9 @@
::
++ tester
|_ eny=@uvJ
:: +expect-eq: compares !>([expected actual]) and pretty-prints the result
:: +expect-eq: compares :expected and :actual and pretty-prints the result
::
++ expect-eq
|= a=vase
^- tang
?@ q.a [palm+[": " ~ ~ ~]^~[>%ex-expected-pair< (sell a)]]~
?: =(-.q.a +.q.a)
~
:~ palm+[": " ~ ~ ~]^~[leaf+"expected" (sell (slot 2 a))]
palm+[": " ~ ~ ~]^~[leaf+"actual" (sell (slot 3 a))]
==
::
++ expect-nu-eq
|= [expected=vase actual=vase]
^- tang
::

View File

@ -4,7 +4,7 @@
:: https://github.com/ethereum/web3.js/blob/master/test/coder.encodeParam.js
::
++ test-static-args
%+ expect-nu-eq
%+ expect-eq
!> %- encode-args:ethereum
:~ [%string "dave"]
[%bool &]
@ -23,7 +23,7 @@
==
::
++ test-dynamic-args
%+ expect-nu-eq
%+ expect-eq
!> %- encode-args:ethereum
:~ [%uint `@ud`0x123]
[%array [%uint `@ud`0x456] [%uint `@ud`0x789] ~]

View File

@ -16,29 +16,29 @@
|_ _tester:tester
++ test-base64
;: weld
%+ expect-nu-eq
%+ expect-eq
!> 'AQAB'
!> (en-base64url (en:octn 65.537))
::
%+ expect-nu-eq
%+ expect-eq
!> 65.537
!> (de:octn (need (de-base64url 'AQAB')))
::
:: echo "hello" | base64
%+ expect-nu-eq
%+ expect-eq
!> 'aGVsbG8K'
!> (en:base64 (as-octs:mimes:html 'hello\0a'))
::
%+ expect-nu-eq
%+ expect-eq
!> 'hello\0a'
!> +:(need (de:base64 'aGVsbG8K'))
::
:: echo -n -e "\x01\x01\x02\x03" | base64
%+ expect-nu-eq
%+ expect-eq
!> 'AQECAw=='
!> (en:base64 (en:octn 0x101.0203))
::
%+ expect-nu-eq
%+ expect-eq
!> `@t`0x302.0101
!> +:(need (de:base64 'AQECAw=='))
==

View File

@ -8,45 +8,45 @@
=/ oct=spec:asn1 [%oct 32 (shax 'hello\0a')]
=/ seq=spec:asn1 [%seq [%seq obj nul ~] oct ~]
;: weld
%+ expect-nu-eq
%+ expect-eq
!> [0x5 0x0 ~]
!> ~(ren raw:en:der nul)
::
%+ expect-nu-eq
%+ expect-eq
!> nul
!> (scan ~(ren raw:en:der nul) parse:de:der)
::
%+ expect-nu-eq
%+ expect-eq
!> [0x2 0x2 0x0 0xbb ~]
!> ~(ren raw:en:der int)
::
%+ expect-nu-eq
%+ expect-eq
!> int
!> (scan ~(ren raw:en:der int) parse:de:der)
::
%+ expect-nu-eq
%+ expect-eq
!> [0x6 0x9 0x60 0x86 0x48 0x1 0x65 0x3 0x4 0x2 0x1 ~]
!> ~(ren raw:en:der obj)
::
%+ expect-nu-eq
%+ expect-eq
!> obj
!> (scan ~(ren raw:en:der obj) parse:de:der)
::
%+ expect-nu-eq
%+ expect-eq
!> 0x420.5891.b5b5.22d5.df08.6d0f.f0b1.10fb.
d9d2.1bb4.fc71.63af.34d0.8286.a2e8.46f6.be03
!> `@ux`(swp 3 +:(en:der oct))
::
%+ expect-nu-eq
%+ expect-eq
!> oct
!> (scan ~(ren raw:en:der oct) parse:de:der)
::
%+ expect-nu-eq
%+ expect-eq
!> 0x30.3130.0d06.0960.8648.0165.0304.0201.0500.0420.5891.b5b5.22d5.
df08.6d0f.f0b1.10fb.d9d2.1bb4.fc71.63af.34d0.8286.a2e8.46f6.be03
!> `@ux`(swp 3 +:(en:der seq))
::
%+ expect-nu-eq
%+ expect-eq
!> seq
!> (scan ~(ren raw:en:der seq) parse:de:der)
==

View File

@ -21,11 +21,11 @@
==
=/ k (need (pass:de:jwk jk))
;: weld
%+ expect-nu-eq
%+ expect-eq
!> jk
!> (pass:en:jwk k)
::
%+ expect-nu-eq
%+ expect-eq
!> 'NzbLsXh8uDCcd-6MNwXF4W_7noWXFZAfHkxZsRGC9Xs'
!> (pass:thumb:jwk k)
==
@ -105,28 +105,28 @@
=/ lod-order=(list @t) ['iss' 'exp' 'http://example.com/is_root' ~]
?> ?=(^ sek.k)
;: weld
%+ expect-nu-eq
%+ expect-eq
!> jk
!> (ring:en:jwk k)
::
%+ expect-nu-eq
%+ expect-eq
!> n.pub.k
!> `@ux`(mul p.u.sek.k q.u.sek.k)
::
%+ expect-nu-eq
%+ expect-eq
!> d.u.sek.k
!> `@ux`(~(inv fo (elcm:rsa (dec p.u.sek.k) (dec q.u.sek.k))) e.pub.k)
::
%+ expect-nu-eq
%+ expect-eq
!> hedt
!> (en-base64url (as-octt:mimes:html (en-json-sort aor hed)))
::
%+ expect-nu-eq
%+ expect-eq
!> lodt
!> %- en-base64url
(as-octt:mimes:html (en-json-sort (eor lte lod-order) lod))
::
%+ expect-nu-eq
%+ expect-eq
!> exp-ws
!> (en-base64url (en:octn (~(sign rs256 k) inp-ws)))
==
@ -207,7 +207,7 @@
't-CZRp1F0k6w'
==
[%o (my payload+s+payload protected+s+protected signature+s+signature ~)]
%+ expect-nu-eq
%+ expect-eq
!> exp
!> (sign:jws k protected-header bod)
--

View File

@ -71,31 +71,31 @@
=/ k3-pub=key:rsa
(need (pass:de:pem:pkcs1 kpem3-pub))
;: weld
%+ expect-nu-eq
%+ expect-eq
!> kpem1
!> (ring:en:pem:pkcs1 k1)
::
%+ expect-nu-eq
%+ expect-eq
!> k1
!> (need (ring:de:pem:pkcs1 kpem1))
::
%+ expect-nu-eq
%+ expect-eq
!> kpem2
!> (ring:en:pem:pkcs1 k2)
::
%+ expect-nu-eq
%+ expect-eq
!> k2
!> (need (ring:de:pem:pkcs1 kpem2))
::
%+ expect-nu-eq
%+ expect-eq
!> kpem3
!> (ring:en:pem:pkcs1 k3)
::
%+ expect-nu-eq
%+ expect-eq
!> kpem3-pub
!> (pass:en:pem:pkcs1 k3)
::
%+ expect-nu-eq
%+ expect-eq
!> k3-pub
!> `key:rsa`[pub.k3 ~]
==
@ -174,19 +174,19 @@
=/ k=key:rsa
(need (ring:de:pem:pkcs1 kpem))
;: weld
%+ expect-nu-eq
%+ expect-eq
!> pub
!> (pass:en:pem:pkcs8 k)
::
%+ expect-nu-eq
%+ expect-eq
!> `k(sek ~)
!> (pass:de:pem:pkcs8 pub)
::
%+ expect-nu-eq
%+ expect-eq
!> pri
!> (ring:en:pem:pkcs8 k)
::
%+ expect-nu-eq
%+ expect-eq
!> `k
!> (ring:de:pem:pkcs8 pri)
==
@ -207,19 +207,19 @@
'-----END PUBLIC KEY-----'
==
;: weld
%+ expect-nu-eq
%+ expect-eq
!> kpem
!> (pass:en:pem:pkcs1 k)
::
%+ expect-nu-eq
%+ expect-eq
!> `k
!> (pass:de:pem:pkcs1 kpem)
::
%+ expect-nu-eq
%+ expect-eq
!> kpem2
!> (pass:en:pem:pkcs8 k)
::
%+ expect-nu-eq
%+ expect-eq
!> `k
!> (pass:de:pem:pkcs8 kpem2)
==
@ -303,29 +303,29 @@
==
=/ sig=@ux (~(sign rs256 k2) inp2)
;: weld
%+ expect-nu-eq
%+ expect-eq
!> exp1
!> (~(sign rs256 k1) inp1)
::
%+ expect-nu-eq
%+ expect-eq
!> &
!> (~(verify rs256 k1) exp1 inp1)
::
%+ expect-nu-eq
%+ expect-eq
!> emsa1
!> `@ux`(~(emsa rs256 k1) inp1)
::
%+ expect-nu-eq
%+ expect-eq
!> &
!> (~(verify rs256 k2) sig inp2)
::
%+ expect-nu-eq
%+ expect-eq
!> exp2
!> sig
::
:: save kpem2 to private.pem
:: echo "hello" | openssl dgst -sha256 -sign private.pem | base64
%+ expect-nu-eq
%+ expect-eq
!> exp2b64
!> (en:base64 (met 3 sig) (swp 3 sig))
==
@ -383,7 +383,7 @@
==
=/ hot1 /org/urbit/zod
=/ hot2 /urbit/zod
%+ expect-nu-eq
%+ expect-eq
!> csr-pem
!> (en:pem:pkcs10 k [hot1 hot2 ~])
--

View File

@ -106,31 +106,31 @@
::
?> ?=(^ sek.k1)
;: weld
%+ expect-nu-eq
%+ expect-eq
!> `@ux`413
!> d.u.sek.k1
::
%+ expect-nu-eq
%+ expect-eq
!> 2.790
!> (en:rsa 65 k1)
::
%+ expect-nu-eq
%+ expect-eq
!> 65
!> (de:rsa 2.790 k1)
::
%+ expect-nu-eq
%+ expect-eq
!> 48
!> (en:rsa 9 k2)
::
%+ expect-nu-eq
%+ expect-eq
!> 9
!> (de:rsa 48 k2)
::
%+ expect-nu-eq
%+ expect-eq
!> c3
!> (en:rsa m3 k3)
::
%+ expect-nu-eq
%+ expect-eq
!> m3
!> (de:rsa c3 k3)
==

View File

@ -35,7 +35,7 @@
::
^- tang
;: weld
%+ expect-nu-eq
%+ expect-eq
!> ^- move:clay-gate
:- duct=~[/info]
^- (wind note:clay-gate gift:able:clay)
@ -45,7 +45,7 @@
[%build ~nul live=%.n [%pin ~1111.1.1 [%list ~]]]
!> i.moves
::
%+ expect-nu-eq
%+ expect-eq
!> ^- move:clay-gate
:- duct=~[/info]
^- (wind note:clay-gate gift:able:clay)
@ -62,7 +62,7 @@
=/ card=(wind note:clay-gate gift:able:clay) q.move
::
%+ weld
(expect-nu-eq !>(~[/info]) !>(duct))
(expect-eq !>(~[/info]) !>(duct))
::
?. ?=(%pass -.card)
[%leaf "bad move, not a %pass: {<move>}"]~
@ -70,7 +70,7 @@
=/ =wire p.card
::
%+ weld
(expect-nu-eq !>(/inserting/~nul/home/~1111.1.1) !>(wire))
(expect-eq !>(/inserting/~nul/home/~1111.1.1) !>(wire))
::
=/ note=note:clay-gate q.card
::
@ -78,16 +78,16 @@
[%leaf "bad move, not a %build: {<move>}"]~
::
%+ weld
(expect-nu-eq !>(~nul) !>(our.note))
(expect-eq !>(~nul) !>(our.note))
::
%+ weld
(expect-nu-eq !>(%.n) !>(live.note))
(expect-eq !>(%.n) !>(live.note))
::
?. ?=(%pin -.schematic.note)
[%leaf "bad move, not a %pin: {<move>}"]~
::
%+ weld
(expect-nu-eq !>(~1111.1.1) !>(date.schematic.note))
(expect-eq !>(~1111.1.1) !>(date.schematic.note))
::
=/ list-schematic=schematic:ford schematic.schematic.note
::
@ -111,7 +111,7 @@
=/ vase1=vase q.literal.path1
::
%+ weld
(expect-nu-eq !>([-:!>(*path) /file1/noun]) !>(vase1))
(expect-eq !>([-:!>(*path) /file1/noun]) !>(vase1))
::
=/ cast1=schematic:ford +.s1
::
@ -121,7 +121,7 @@
=/ lit1=schematic:ford input.cast1
::
%+ weld
(expect-nu-eq !>([%$ %noun %noun 'file1']) !>(lit1))
(expect-eq !>([%$ %noun %noun 'file1']) !>(lit1))
:: test :s2
::
?. ?=([^ *] s2)
@ -134,7 +134,7 @@
=/ vase2=vase q.literal.path2
::
%+ weld
(expect-nu-eq !>([-:!>(*path) /file2/noun]) !>(vase2))
(expect-eq !>([-:!>(*path) /file2/noun]) !>(vase2))
::
=/ cast2=schematic:ford +.s2
::
@ -143,7 +143,7 @@
::
=/ lit2=schematic:ford input.cast2
::
(expect-nu-eq !>([%$ %noun %noun 'file2']) !>(lit2))
(expect-eq !>([%$ %noun %noun 'file2']) !>(lit2))
== ==
::
;: welp
@ -171,9 +171,9 @@
=^ moves clay-gate (call:clay-core call-args)
::
=/ output=tang
%- expect-eq !>
:- expected-moves
moves
%+ expect-eq
!> expected-moves
!> moves
::
[output clay-gate]
:: +clay-call-with-comparator: run a clay +task and test output moves

View File

@ -19,22 +19,22 @@
++ test-tear ^- tang
::
;: welp
%+ expect-nu-eq
%+ expect-eq
!> ~['a' 'bc' 'de']
!> (tear:ford-gate 'a-bc-de')
::
%+ expect-nu-eq
%+ expect-eq
!> ~['abc']
!> (tear:ford-gate 'abc')
::
%+ expect-nu-eq
%+ expect-eq
!> ~['ab/c']
!> (tear:ford-gate 'ab/c')
==
::
++ test-unify-jugs ^- tang
::
%+ expect-nu-eq
%+ expect-eq
!> ^- (jug @tas @ud)
(my ~[[%a (sy 1 2 ~)] [%b (sy 3 4 5 6 ~)] [%c (sy 7 8 ~)]])
!> %+ unify-jugs:ford-gate
@ -44,13 +44,13 @@
++ test-resource-wire-encoding ^- tang
::
;: welp
%+ expect-nu-eq
%+ expect-eq
!> /cx/~nul/desk/~1234.5.6/bar/foo
!> ^- path
%- scry-request-to-path:ford-gate
[%c care=%x [[~nul %desk [%da ~1234.5.6]] /foo/bar]]
::
%+ expect-nu-eq
%+ expect-eq
!> [%c care=%x [[~nul %desk [%da ~1234.5.6]] /foo/bar]]
!> %- need
(path-to-scry-request:ford-gate /cx/~nul/desk/~1234.5.6/bar/foo)
@ -65,7 +65,7 @@
?~ q.parsed
[%leaf "failed to parse at {<p.parsed>}"]~
::
%+ expect-nu-eq
%+ expect-eq
!> :- [1 19]
:- ~
:_ [[1 19] ""]
@ -94,7 +94,7 @@
"""
?~ q.parsed
[%leaf "failed to parse at {<p.parsed>}"]~
%+ expect-nu-eq
%+ expect-eq
!> :* source-rail=[[~nul %desk] /bar/foo]
zuse-version=309
structures=~[[`%struct %struct] [`%face %other]]
@ -119,7 +119,7 @@
"""
?~ q.parsed
[%leaf "failed to parse at {<p.parsed>}"]~
%+ expect-nu-eq
%+ expect-eq
!> :* source-rail=[[~nul %desk] /bar/foo]
zuse-version=400
structures=~
@ -144,7 +144,7 @@
"""
?~ q.parsed
[%leaf "failed to parse at {<p.parsed>}"]~
%+ expect-nu-eq
%+ expect-eq
!> :* source-rail=[[~nul %desk] /bar/foo]
zuse-version=309
structures=~
@ -174,7 +174,7 @@
"""
?~ q.parsed
[%leaf "failed to parse at {<p.parsed>}"]~
%+ expect-nu-eq
%+ expect-eq
!> :* source-rail=[[~nul %desk] /bar/foo]
zuse-version=309
structures=~
@ -205,7 +205,7 @@
"""
?~ q.parsed
[%leaf "failed to parse at {<p.parsed>}"]~
%+ expect-nu-eq
%+ expect-eq
!> :* source-rail=[[~nul %desk] /bar/foo]
zuse-version=309
structures=~
@ -236,7 +236,7 @@
"""
?~ q.parsed
[%leaf "failed to parse at {<p.parsed>}"]~
%+ expect-nu-eq
%+ expect-eq
!> :* source-rail=[[~nul %desk] /bar/foo]
zuse-version=309
structures=~
@ -265,7 +265,7 @@
"""
?~ q.parsed
[%leaf "failed to parse at {<p.parsed>}"]~
%+ expect-nu-eq
%+ expect-eq
!> :* source-rail=[[~nul %desk] /bar/foo]
zuse-version=309
structures=~
@ -303,7 +303,7 @@
"""
?~ q.parsed
[%leaf "failed to parse at {<p.parsed>}"]~
%+ expect-nu-eq
%+ expect-eq
!> :* source-rail=[[~nul %desk] /bar/foo]
zuse-version=309
structures=~
@ -337,7 +337,7 @@
"""
?~ q.parsed
[%leaf "failed to parse at {<p.parsed>}"]~
%+ expect-nu-eq
%+ expect-eq
!> :* source-rail=[[~nul %desk] /bar/foo]
zuse-version=309
structures=~
@ -366,7 +366,7 @@
"""
?~ q.parsed
[%leaf "failed to parse at {<p.parsed>}"]~
%+ expect-nu-eq
%+ expect-eq
!> :* source-rail=[[~nul %desk] /bar/foo]
zuse-version=309
structures=~
@ -393,7 +393,7 @@
"""
?~ q.parsed
[%leaf "failed to parse at {<p.parsed>}"]~
%+ expect-nu-eq
%+ expect-eq
!> :* source-rail=[[~nul %desk] /bar/foo]
zuse-version=309
structures=~
@ -429,7 +429,7 @@
"""
?~ q.parsed
[%leaf "failed to parse at {<p.parsed>}"]~
%+ expect-nu-eq
%+ expect-eq
!> :* source-rail=[[~nul %desk] /bar/foo]
zuse-version=309
structures=~
@ -460,7 +460,7 @@
"""
?~ q.parsed
[%leaf "failed to parse at {<p.parsed>}"]~
%+ expect-nu-eq
%+ expect-eq
!> :* source-rail=[[~nul %desk] /bar/foo]
zuse-version=309
structures=~
@ -507,7 +507,7 @@
"""
?~ q.parsed
[%leaf "failed to parse at {<p.parsed>}"]~
%+ expect-nu-eq
%+ expect-eq
!> :* source-rail=[[~nul %desk] /bar/foo]
zuse-version=309
structures=~
@ -533,7 +533,7 @@
"""
?~ q.parsed
[%leaf "failed to parse at {<p.parsed>}"]~
%+ expect-nu-eq
%+ expect-eq
!> :* source-rail=[[~nul %desk] /bar/foo]
zuse-version=309
structures=~
@ -985,7 +985,7 @@
|= moves=(list move:ford-gate)
^- tang
::
%+ expect-nu-eq
%+ expect-eq
!> %- sy
:~ :* duct=~[/first] %pass
wire=/~nul/scry-request/cx/~nul/desk/~1234.5.7/foo/bar
@ -1672,7 +1672,7 @@
::
=/ result=vase |7:i.moves
::
(expect-nu-eq !>(6) result)
(expect-eq !>(6) result)
==
::
=^ results2 ford-gate
@ -1721,7 +1721,7 @@
::
=/ result=vase |7:i.moves
::
(expect-nu-eq !>(42) result)
(expect-eq !>(42) result)
==
::
=^ results2 ford-gate
@ -1767,7 +1767,7 @@
?> ?=([* %give %made @da %complete %error *] i.moves)
:: compare the move to the expected move, omitting check on stack trace
::
%+ expect-nu-eq
%+ expect-eq
!> :* duct=~[/dead] %give %made ~1234.5.6 %complete
[%error [leaf+"ford: %call execution failed:" ~]]
==
@ -1839,7 +1839,7 @@
::
=/ result |7:i.moves
::
(expect-nu-eq !>(42) result)
(expect-eq !>(42) result)
==
::
=^ results3 ford-gate
@ -1912,10 +1912,10 @@
::
%+ weld
=/ result |7:i.moves
(expect-nu-eq !>(%first) result)
(expect-eq !>(%first) result)
:: make sure the other move is a subscription
::
%+ expect-nu-eq
%+ expect-eq
!> :* duct=~[/call] %pass wire=/~nul/clay-sub/~nul/desk/~1234.5.6
%c %warp [~nul ~nul] %desk
`[%mult [%da ~1234.5.6] (sy [%x /timer] ~)]
@ -1945,10 +1945,10 @@
::
%+ weld
=/ result |7:i.moves
(expect-nu-eq !>(%second) result)
(expect-eq !>(%second) result)
:: make sure the other move is a subscription
::
%+ expect-nu-eq
%+ expect-eq
!> :* duct=~[/call] %pass wire=/~nul/clay-sub/~nul/desk/~1234.5.7
%c %warp [~nul ~nul] %desk
`[%mult [%da ~1234.5.7] (sy [%x /timer] ~)]
@ -2154,7 +2154,7 @@
::
=/ expected-type=type -:!>([*tape *@ud])
=/ actual-type=type |7:i.moves
%+ expect-nu-eq
%+ expect-eq
!> &
!> (~(nest ut actual-type) | expected-type)
==
@ -2200,7 +2200,7 @@
::
=/ messages=tang (scag 4 `tang`|6:i.moves)
::
%+ expect-nu-eq
%+ expect-eq
!> :~ [%palm ["." "-" "" ""] [%leaf "have"] [%leaf "\"\""] ~]
:~ %palm ["." "-" "" ""]
[%leaf "want"]
@ -2255,7 +2255,7 @@
?> ?=([* %give %made @da %complete %success %ride *] i.moves)
::
=/ result |7:i.moves
(expect-nu-eq !>(5) result)
(expect-eq !>(5) result)
==
::
=^ results2 ford-gate
@ -2301,7 +2301,7 @@
?> ?=([* %give %made @da %complete %success %ride *] i.moves)
::
=/ result |7:i.moves
(expect-nu-eq !>(42) result)
(expect-eq !>(42) result)
==
::
=^ results2 ford-gate
@ -2347,7 +2347,7 @@
?> ?=([* %give %made @da %complete %error *] i.moves)
:: compare the move to the expected move, omitting check on stack trace
::
%+ expect-nu-eq
%+ expect-eq
!> :* duct=~[/dead] %give %made ~1234.5.6 %complete
[%error [leaf+"ford: %ride failed to execute:" ~]]
==
@ -2418,7 +2418,7 @@
?> ?=([* %give %made @da %complete %success %ride *] i.moves)
::
=/ result |7:i.moves
(expect-nu-eq !>(42) result)
(expect-eq !>(42) result)
==
::
=^ results3 ford-gate
@ -2572,7 +2572,7 @@
title='post-a'
contents="post-a-contents"
==
%+ expect-nu-eq
%+ expect-eq
!> :* duct=~[/post-a] %pass
wire=/~nul/clay-sub/~nul/desk/~1234.5.6 %c %warp
[~nul ~nul] %desk
@ -2603,7 +2603,7 @@
title='post-b'
contents="post-b-contents"
==
%+ expect-nu-eq
%+ expect-eq
!> :* duct=~[/post-b] %pass
wire=/~nul/clay-sub/~nul/desk/~1234.5.7 %c %warp
[~nul ~nul] %desk
@ -2638,7 +2638,7 @@
title='post-a'
contents="post-a-contents-changed"
==
%+ expect-nu-eq
%+ expect-eq
!> :* duct=~[/post-a] %pass
wire=/~nul/clay-sub/~nul/desk/~1234.5.8
%c %warp [~nul ~nul] %desk
@ -3372,7 +3372,7 @@
title='post-a'
contents="post-a-contents"
==
%+ expect-nu-eq
%+ expect-eq
!> :* duct=~[/post-a] %pass wire=/~nul/clay-sub/~nul/desk
%c %warp [~nul ~nul] %desk
`[%mult [%da ~1234.5.6] (sy [%x /posts/a] [%x /posts/b] ~)]
@ -3596,11 +3596,11 @@
%+ weld
=/ result
q:(slym (slap (slap kernel [%limb %format]) [%limb %en-beam]) *beam)
%+ expect-nu-eq
%+ expect-eq
!> (en-beam *beam)
!> result
::
%+ expect-nu-eq
%+ expect-eq
!> &
!> (slab %format p.kernel)
==
@ -3647,11 +3647,11 @@
%+ weld
=/ result
q:(slym (slap (slap kernel [%limb %format]) [%limb %en-beam]) *beam)
%+ expect-nu-eq
%+ expect-eq
!> (en-beam *beam)
!> result
::
%+ expect-nu-eq
%+ expect-eq
!> &
!> (slab %format p.kernel)
==
@ -3729,7 +3729,7 @@
::
=/ =vase vase.build-result.result
::
(expect-nu-eq !>(%constant) vase)
(expect-eq !>(%constant) vase)
==
::
;: weld
@ -3829,7 +3829,7 @@
::
=/ =vase vase.build-result.result
::
(expect-nu-eq !>(["onetwo" 3]) vase)
(expect-eq !>(["onetwo" 3]) vase)
==
::
;: weld
@ -3881,7 +3881,7 @@
::
=/ =vase vase.build-result.result
::
(expect-nu-eq !>(["one" 1]) vase)
(expect-eq !>(["one" 1]) vase)
==
::
;: weld
@ -3926,7 +3926,7 @@
::
=/ =vase vase.build-result.result
::
(expect-nu-eq !>(3) vase)
(expect-eq !>(3) vase)
==
::
;: weld
@ -3974,7 +3974,7 @@
::
=/ =vase vase.build-result.result
::
(expect-nu-eq !>([1 2 3 4 5 ~]) vase)
(expect-eq !>([1 2 3 4 5 ~]) vase)
==
::
;: weld
@ -4057,7 +4057,7 @@
::
=/ =vase vase.build-result.result
::
(expect-nu-eq !>([5 5 ~]) vase)
(expect-eq !>([5 5 ~]) vase)
==
::
;: weld
@ -4106,7 +4106,7 @@
::
=/ =vase vase.build-result.result
::
(expect-nu-eq !>([6 6 ~]) vase)
(expect-eq !>([6 6 ~]) vase)
==
::
;: weld
@ -4205,7 +4205,7 @@
::
=/ =vase vase.build-result.result
::
(expect-nu-eq !>([1 2 3 ~]) vase)
(expect-eq !>([1 2 3 ~]) vase)
==
::
;: weld
@ -4269,7 +4269,7 @@
::
=/ =vase vase.build-result.result
::
(expect-nu-eq !>(["five" 5]) vase)
(expect-eq !>(["five" 5]) vase)
==
::
;: weld
@ -4322,7 +4322,7 @@
::
=/ =vase vase.build-result.result
::
(expect-nu-eq !>([1 2 3 ~]) vase)
(expect-eq !>([1 2 3 ~]) vase)
==
::
;: weld
@ -4381,7 +4381,7 @@
::
=/ =vase vase.build-result.result
::
(expect-nu-eq !>([1 2 3 ~]) vase)
(expect-eq !>([1 2 3 ~]) vase)
==
::
;: weld
@ -4439,7 +4439,7 @@
::
=/ =vase vase.build-result.result
::
%+ expect-nu-eq
%+ expect-eq
!>([[[~nul %home [%da ~1234.5.6]] /other/lib] %value])
vase
==
@ -4530,7 +4530,7 @@
=/ =vase vase.build-result.result
::
=/ expected (my [[%one 1] [%two 2] ~])
(expect-nu-eq !>(expected) vase)
(expect-eq !>(expected) vase)
==
::
;: weld
@ -4604,7 +4604,7 @@
?> ?=([%success %core *] build-result.result)
::
=/ =vase vase.build-result.result
(expect-nu-eq !>(5) vase)
(expect-eq !>(5) vase)
==
::
;: weld
@ -4665,7 +4665,7 @@
::
=/ =vase vase.build-result.result
::
(expect-nu-eq !>([1 2 3 ~]) vase)
(expect-eq !>([1 2 3 ~]) vase)
==
::
;: weld
@ -4712,7 +4712,7 @@
::
=/ =vase q.cage.build-result.result
::
(expect-nu-eq !>([0 0]) vase)
(expect-eq !>([0 0]) vase)
==
::
;: weld
@ -4760,7 +4760,7 @@
::
=/ =vase q.cage.build-result.result
::
(expect-nu-eq !>([12 13]) vase)
(expect-eq !>([12 13]) vase)
==
::
;: weld
@ -4808,7 +4808,7 @@
::
=/ =vase q.cage.build-result.result
::
(expect-nu-eq !>([12 13]) vase)
(expect-eq !>([12 13]) vase)
==
::
;: weld
@ -5802,7 +5802,7 @@
=/ =vase vase.build-result.result.p.card.i.moves
::
%+ weld
(expect-nu-eq !>(13) vase)
(expect-eq !>(13) vase)
::
=/ files=(set [%x path])
%- sy :~
@ -5817,7 +5817,7 @@
[%x /lib/connector/hoon]
==
::
%+ expect-nu-eq
%+ expect-eq
!> ^- move:ford-gate
:* duct=~[/gh] %pass wire=/~nul/clay-sub/~nul/home/~1234.5.6
%c %warp [~nul ~nul] %home
@ -5931,7 +5931,7 @@
=/ =vase vase.build-result.result.p.card.i.moves
::
%+ weld
(expect-nu-eq !>(12) vase)
(expect-eq !>(12) vase)
::
=/ files=(set [%x path])
%- sy :~
@ -5946,7 +5946,7 @@
[%x /lib/connector/hoon]
==
::
%+ expect-nu-eq
%+ expect-eq
!> ^- move:ford-gate
:* duct=~[/gh2] %pass wire=/~nul/clay-sub/~nul/home/~1234.5.7
%c %warp [~nul ~nul] %home
@ -6073,7 +6073,7 @@
=/ =vase vase.build-result.result.p.card.i.moves
::
%+ weld
(expect-nu-eq !>(11) vase)
(expect-eq !>(11) vase)
::
=/ files=(set [%x path])
%- sy :~
@ -6088,7 +6088,7 @@
[%x /lib/connector/hoon]
==
::
%+ expect-nu-eq
%+ expect-eq
!> ^- move:ford-gate
:* duct=~[/gh3] %pass wire=/~nul/clay-sub/~nul/home/~1234.5.8
%c %warp [~nul ~nul] %home
@ -6228,10 +6228,10 @@
==
::
;: weld
(expect-nu-eq !>(~[/gh]) !>(duct.i.moves))
(expect-nu-eq !>(17) vase.build-result.result.p.card.i.moves)
(expect-eq !>(~[/gh]) !>(duct.i.moves))
(expect-eq !>(17) vase.build-result.result.p.card.i.moves)
::
%+ expect-nu-eq
%+ expect-eq
!> ^- move:ford-gate
:* duct=~[/gh] %pass wire=/~nul/clay-sub/~nul/home/~1234.5.9
%c %warp [~nul ~nul] %home
@ -6275,10 +6275,10 @@
==
::
;: weld
(expect-nu-eq !>(~[/gh2]) !>(duct.i.moves))
(expect-nu-eq !>(16) vase.build-result.result.p.card.i.moves)
(expect-eq !>(~[/gh2]) !>(duct.i.moves))
(expect-eq !>(16) vase.build-result.result.p.card.i.moves)
::
%+ expect-nu-eq
%+ expect-eq
!> ^- move:ford-gate
:* duct=~[/gh2] %pass wire=/~nul/clay-sub/~nul/home/~1234.5.9
%c %warp [~nul ~nul] %home
@ -6322,10 +6322,10 @@
==
::
;: weld
(expect-nu-eq !>(~[/gh3]) !>(duct.i.moves))
(expect-nu-eq !>(15) vase.build-result.result.p.card.i.moves)
(expect-eq !>(~[/gh3]) !>(duct.i.moves))
(expect-eq !>(15) vase.build-result.result.p.card.i.moves)
::
%+ expect-nu-eq
%+ expect-eq
!> ^- move:ford-gate
:* duct=~[/gh3] %pass wire=/~nul/clay-sub/~nul/home/~1234.5.9
%c %warp [~nul ~nul] %home
@ -6660,7 +6660,7 @@
:- [%config '']
(my [%data1 [%item 'one']] ~)
::
(expect-nu-eq !>(result) vase)
(expect-eq !>(result) vase)
::
:: TODO: check the subscription?
==
@ -6769,7 +6769,7 @@
:- [%config '']
(my [%data1 [%item 'one']] [%data2 [%item 'two']] ~)
::
(expect-nu-eq !>(result) vase)
(expect-eq !>(result) vase)
::
:: TODO: check the subscription?
==
@ -6879,7 +6879,7 @@
:- [%config '']
(my [%data1 [%item 'one']] [%data2 [%item 'changed-two']] ~)
::
(expect-nu-eq !>(result) vase)
(expect-eq !>(result) vase)
::
:: TODO: check the subscription?
==
@ -7013,27 +7013,27 @@
?> ?=([%success %ride type-title-b=* %post-b] tail.tail.result)
::
;: welp
%+ expect-nu-eq
%+ expect-eq
!> duct
!> duct.move
::
%+ expect-nu-eq
%+ expect-eq
!> date
!> date.p.card.move
::
%+ expect-nu-eq
%+ expect-eq
!> [%success %scry %noun *^type [title=title contents=contents]]
!> head.result(p.q.cage *^type)
::
%+ expect-nu-eq
%+ expect-eq
!> &
!> (~(nest ut p.q.cage.head.result) | type)
::
%+ expect-nu-eq
%+ expect-eq
!> 'post-a'
vase.head.tail.result
::
%+ expect-nu-eq
%+ expect-eq
!> 'post-b'
vase.tail.tail.result
==
@ -7129,7 +7129,7 @@
%- call:ford call-args
::
=/ output=tang
%+ expect-nu-eq
%+ expect-eq
!> expected-moves
!> moves
::
@ -7150,7 +7150,7 @@
%- take:ford take-args
::
=/ output=tang
%+ expect-nu-eq
%+ expect-eq
!> expected-moves
!> moves
::
@ -7201,11 +7201,11 @@
++ expect-cage
|= [mark=term expected=vase actual=cage]
%+ weld
%+ expect-nu-eq
%+ expect-eq
!> mark
!> p.actual
::
(expect-nu-eq expected q.actual)
(expect-eq expected q.actual)
:: +expect-ford-empty: assert that ford's state is one empty ship
::
:: At the end of every test, we want to assert that we have cleaned up all

View File

@ -36,7 +36,7 @@
?> ?=(^ moves)
?> ?=([* %pass * %e %hiss *] i.moves)
::
%+ expect-nu-eq
%+ expect-eq
!>(hiss-httr)
q.r.q.q.i.moves
==
@ -57,7 +57,7 @@
%- call:jael call-args
::
=/ output=tang
%+ expect-nu-eq
%+ expect-eq
!> expected-moves
!> moves
::

View File

@ -15,15 +15,15 @@
=^ maybe1 q (~(put to-capped-queue q) 5)
::
=/ results1
%+ expect-nu-eq
%+ expect-eq
!> ~
!> maybe1
=/ results2
%+ expect-nu-eq
%+ expect-eq
!> 1
!> size.q
=/ results3
%+ expect-nu-eq
%+ expect-eq
!> [~ 5]
!> ~(top to queue.q)
:: remove the single element
@ -31,11 +31,11 @@
=^ maybe2 q ~(get to-capped-queue q)
::
=/ results4
%+ expect-nu-eq
%+ expect-eq
!> 5
!> maybe2
=/ results5
%+ expect-nu-eq
%+ expect-eq
!> 0
!> size.q
::
@ -58,31 +58,31 @@
::
=^ maybe1 q (~(put to-capped-queue q) 5)
=/ results1
%+ expect-nu-eq
%+ expect-eq
!> ~
!> maybe1
=/ results2
%+ expect-nu-eq
%+ expect-eq
!> 1
!> size.q
::
=^ maybe2 q (~(put to-capped-queue q) 6)
=/ results3
%+ expect-nu-eq
%+ expect-eq
!> ~
!> maybe2
=/ results4
%+ expect-nu-eq
%+ expect-eq
!> 2
!> size.q
::
=^ maybe3 q (~(put to-capped-queue q) 7)
=/ results5
%+ expect-nu-eq
%+ expect-eq
!> [~ 5]
!> maybe3
=/ results6
%+ expect-nu-eq
%+ expect-eq
!> 2
!> size.q
::
@ -113,11 +113,11 @@
=^ pops q (~(resize to-capped-queue q) 3)
::
=/ results1
%+ expect-nu-eq
%+ expect-eq
!> [1 2 ~]
!> pops
=/ results2
%+ expect-nu-eq
%+ expect-eq
!> 3
!> size.q
::

View File

@ -17,12 +17,12 @@
=. c (~(put by-clock c) 1 "one")
=^ maybe1 c (~(get by-clock c) 1)
=/ results1
%+ expect-nu-eq
%+ expect-eq
!> [~ "one"]
!> maybe1
::
=/ results2
%+ expect-nu-eq
%+ expect-eq
!> 1
!> size.c
:: push that key out of the cache
@ -32,13 +32,13 @@
=. c (~(put by-clock c) 4 "four")
::
=/ results3
%+ expect-nu-eq
%+ expect-eq
!> 3
!> size.c
::
=^ maybe2 c (~(get by-clock c) 1)
=/ results4
%+ expect-nu-eq
%+ expect-eq
!> ~
!> maybe2
::
@ -68,19 +68,19 @@
=. c ~(purge by-clock c)
::
;: weld
%+ expect-nu-eq
%+ expect-eq
!> 0
!> size.c
::
%+ expect-nu-eq
%+ expect-eq
!> 3
!> max-size.c
::
%+ expect-nu-eq
%+ expect-eq
!> ~
!> lookup.c
::
%+ expect-nu-eq
%+ expect-eq
!> ~
!> queue.c
==
@ -104,16 +104,16 @@
=. c (~(trim by-clock c) 2)
::
;: weld
%+ expect-nu-eq
%+ expect-eq
!> 1
!> size.c
::
=^ results1 c (~(get by-clock c) 3)
%+ expect-nu-eq
%+ expect-eq
!> [~ "three"]
!> results1
::
%+ expect-nu-eq
%+ expect-eq
!> 1
!> ~(wyt by lookup.c)
==
@ -137,29 +137,29 @@
=. c (~(resize by-clock c) 0)
::
=/ results1
%+ expect-nu-eq
%+ expect-eq
!> 0
!> size.c
::
=/ results2
%+ expect-nu-eq
%+ expect-eq
!> ~
!> lookup.c
::
=/ results3
%+ expect-nu-eq
%+ expect-eq
!> ~
!> queue.c
::
=/ results4
%+ expect-nu-eq
%+ expect-eq
!> 0
!> max-size.c
:: trying to get an element just returns ~
::
=^ maybe1 c (~(get by-clock c) 3)
=/ results5
%+ expect-nu-eq
%+ expect-eq
!> ~
!> maybe1
:: trying to put an element in doesn't mutate the clock
@ -167,7 +167,7 @@
=. c (~(put by-clock c) 4 "four")
::
=/ results6
%+ expect-nu-eq
%+ expect-eq
!> 0
!> size.c
::

View File

@ -87,7 +87,7 @@
%+ weld $(answers t.answers)
=+ `[bytes=@ud answer=@]`i.answers
%+ category name
%+ expect-nu-eq
%+ expect-eq
!> answer
!> (hash bytes (~(got by keccak-inputs) bytes))
::
@ -241,26 +241,26 @@
:: sha3
::
++ test-sha3-224
%+ expect-nu-eq
%+ expect-eq
!> 0x6b4e.0342.3667.dbb7.3b6e.1545.4f0e.b1ab.
d459.7f9a.1b07.8e3f.5b5a.6bc7
!> (sha3-224 0 `@`0)
::
++ test-sha3-256
%+ expect-nu-eq
%+ expect-eq
!> 0xa7ff.c6f8.bf1e.d766.51c1.4756.a061.d662.
f580.ff4d.e43b.49fa.82d8.0a4b.80f8.434a
!> (sha3-256 0 `@`0)
::
++ test-sha3-384
%+ expect-nu-eq
%+ expect-eq
!> 0xc63.a75b.845e.4f7d.0110.7d85.2e4c.2485.
c51a.50aa.aa94.fc61.995e.71bb.ee98.3a2a.
c371.3831.264a.db47.fb6b.d1e0.58d5.f004
!> (sha3-384 0 `@`0)
::
++ test-sha3-512
%+ expect-nu-eq
%+ expect-eq
!> 0xa69f.73cc.a23a.9ac5.c8b5.67dc.185a.756e.
97c9.8216.4fe2.5859.e0d1.dcc1.475c.80a6.
15b2.123a.f1f5.f94c.11e3.e940.2c3a.c558.
@ -270,7 +270,7 @@
:: shake
::
++ test-shake-128
%+ expect-nu-eq
%+ expect-eq
!> 0x7f9c.2ba4.e88f.827d.6160.4550.7605.853e.
d73b.8093.f6ef.bc88.eb1a.6eac.fa66.ef26.
3cb1.eea9.8800.4b93.103c.fb0a.eefd.2a68.
@ -278,7 +278,7 @@
!> (shake-128 512 0 `@`0)
::
++ test-shake-256
%+ expect-nu-eq
%+ expect-eq
!> 0x46b9.dd2b.0ba8.8d13.233b.3feb.743e.eb24.
3fcd.52ea.62b8.1b82.b50c.2764.6ed5.762f.
d75d.c4dd.d8c0.f200.cb05.019d.67b5.92f6.
@ -286,7 +286,7 @@
!> (shake-256 512 0 `@`0)
::
++ test-rawshake-128
%+ expect-nu-eq
%+ expect-eq
!> 0xfa01.9a3b.1763.0df6.0148.53b5.4707.73f1.
3c3a.b704.4782.11d7.a658.6751.5dea.1cc7.
926b.2147.e396.076b.22cb.7263.3af5.0647.
@ -294,7 +294,7 @@
!> (rawshake-128 512 0 `@`0)
::
++ test-rawshake-256
%+ expect-nu-eq
%+ expect-eq
!> 0x3a11.08d4.a90a.31b8.5a10.bdce.77f4.bfbd.
cc5b.1d70.dd40.5686.f8bb.de83.4aa1.a410.
db8c.9e1c.166c.3e23.9cd7.6a55.f6a6.92aa.