3: Completely remove expect-eq from %/tests/sys/zuse.

This commit is contained in:
Elliot Glaysher 2018-08-28 16:16:37 -07:00
parent 753f2f6a5a
commit 40b5dbc15f
3 changed files with 138 additions and 138 deletions

View File

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

View File

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

View File

@ -72,7 +72,7 @@
d79d.c266.f6a5.be6b.b0e4.a92e.ceeb.aeb1
==
::
|_ tst=_tester:tester
|_ _tester:tester
::
:: check a list of bytelength-answer pairs to see if
:: they match the output given by {hash} for the
@ -86,10 +86,10 @@
?~ answers ~
%+ weld $(answers t.answers)
=+ `[bytes=@ud answer=@]`i.answers
%+ category.tst name
%- expect-eq.tst !>
:- answer
(hash bytes (~(got by keccak-inputs) bytes))
%+ category name
%+ expect-nu-eq
!> answer
!> (hash bytes (~(got by keccak-inputs) bytes))
::
:: keccak
::
@ -241,63 +241,63 @@
:: sha3
::
++ test-sha3-224
%- expect-eq.tst !>
:- 0x6b4e.0342.3667.dbb7.3b6e.1545.4f0e.b1ab.
d459.7f9a.1b07.8e3f.5b5a.6bc7
(sha3-224 0 `@`0)
%+ expect-nu-eq
!> 0x6b4e.0342.3667.dbb7.3b6e.1545.4f0e.b1ab.
d459.7f9a.1b07.8e3f.5b5a.6bc7
!> (sha3-224 0 `@`0)
::
++ test-sha3-256
%- expect-eq.tst !>
:- 0xa7ff.c6f8.bf1e.d766.51c1.4756.a061.d662.
f580.ff4d.e43b.49fa.82d8.0a4b.80f8.434a
(sha3-256 0 `@`0)
%+ expect-nu-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-eq.tst !>
:- 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)
%+ expect-nu-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-eq.tst !>
:- 0xa69f.73cc.a23a.9ac5.c8b5.67dc.185a.756e.
97c9.8216.4fe2.5859.e0d1.dcc1.475c.80a6.
15b2.123a.f1f5.f94c.11e3.e940.2c3a.c558.
f500.199d.95b6.d3e3.0175.8586.281d.cd26
(sha3-512 0 `@`0)
%+ expect-nu-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.
f500.199d.95b6.d3e3.0175.8586.281d.cd26
!> (sha3-512 0 `@`0)
::
:: shake
::
++ test-shake-128
%- expect-eq.tst !>
:- 0x7f9c.2ba4.e88f.827d.6160.4550.7605.853e.
d73b.8093.f6ef.bc88.eb1a.6eac.fa66.ef26.
3cb1.eea9.8800.4b93.103c.fb0a.eefd.2a68.
6e01.fa4a.58e8.a363.9ca8.a1e3.f9ae.57e2
(shake-128 512 0 `@`0)
%+ expect-nu-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.
6e01.fa4a.58e8.a363.9ca8.a1e3.f9ae.57e2
!> (shake-128 512 0 `@`0)
::
++ test-shake-256
%- expect-eq.tst !>
:- 0x46b9.dd2b.0ba8.8d13.233b.3feb.743e.eb24.
3fcd.52ea.62b8.1b82.b50c.2764.6ed5.762f.
d75d.c4dd.d8c0.f200.cb05.019d.67b5.92f6.
fc82.1c49.479a.b486.4029.2eac.b3b7.c4be
(shake-256 512 0 `@`0)
%+ expect-nu-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.
fc82.1c49.479a.b486.4029.2eac.b3b7.c4be
!> (shake-256 512 0 `@`0)
::
++ test-rawshake-128
%- expect-eq.tst !>
:- 0xfa01.9a3b.1763.0df6.0148.53b5.4707.73f1.
3c3a.b704.4782.11d7.a658.6751.5dea.1cc7.
926b.2147.e396.076b.22cb.7263.3af5.0647.
c7f2.3d0d.8f00.1d6d.8daf.0f6f.2e92.fc0e
(rawshake-128 512 0 `@`0)
%+ expect-nu-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.
c7f2.3d0d.8f00.1d6d.8daf.0f6f.2e92.fc0e
!> (rawshake-128 512 0 `@`0)
::
++ test-rawshake-256
%- expect-eq.tst !>
:- 0x3a11.08d4.a90a.31b8.5a10.bdce.77f4.bfbd.
cc5b.1d70.dd40.5686.f8bb.de83.4aa1.a410.
db8c.9e1c.166c.3e23.9cd7.6a55.f6a6.92aa.
2d17.49f2.ec79.cd0b.a3b1.7bb6.5995.9b6e
(rawshake-256 512 0 `@`0)
%+ expect-nu-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.
2d17.49f2.ec79.cd0b.a3b1.7bb6.5995.9b6e
!> (rawshake-256 512 0 `@`0)
--