aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/aedifex/hash.lux
diff options
context:
space:
mode:
authorEduardo Julian2020-12-10 00:15:15 -0400
committerEduardo Julian2020-12-10 00:15:15 -0400
commit14287585025b2d8fff1991691def9e643b039ac8 (patch)
tree4fdbe2aafa907d1dd0f47150c545adf3eabeb124 /stdlib/source/test/aedifex/hash.lux
parent893c76ad530ca0e81cd84602543c3114407f4592 (diff)
Re-named "with-cover" to "for".
Diffstat (limited to 'stdlib/source/test/aedifex/hash.lux')
-rw-r--r--stdlib/source/test/aedifex/hash.lux90
1 files changed, 45 insertions, 45 deletions
diff --git a/stdlib/source/test/aedifex/hash.lux b/stdlib/source/test/aedifex/hash.lux
index 472342c70..8bc830801 100644
--- a/stdlib/source/test/aedifex/hash.lux
+++ b/stdlib/source/test/aedifex/hash.lux
@@ -36,60 +36,60 @@
(def: #export test
Test
(<| (_.covering /._)
- (_.with-cover [/.Hash /.SHA-1 /.MD5])
+ (_.for [/.Hash /.SHA-1 /.MD5])
(`` ($_ _.and
- (_.with-cover [/.equivalence]
- ($_ _.and
- ($equivalence.spec /.equivalence (..random /.sha-1))
- ($equivalence.spec /.equivalence (..random /.md5))
- ))
- (_.with-cover [/.data]
- ($_ _.and
- (~~ (template [<hash> <constructor> <exception>]
- [(do random.monad
- [expected (..random <hash>)]
- (_.cover [<hash> <constructor> <exception>]
- (and (case (<constructor> (/.data expected))
- (#try.Success actual)
- (\ /.equivalence = expected actual)
+ (_.for [/.equivalence]
+ ($_ _.and
+ ($equivalence.spec /.equivalence (..random /.sha-1))
+ ($equivalence.spec /.equivalence (..random /.md5))
+ ))
+ (_.for [/.data]
+ ($_ _.and
+ (~~ (template [<hash> <constructor> <exception>]
+ [(do random.monad
+ [expected (..random <hash>)]
+ (_.cover [<hash> <constructor> <exception>]
+ (and (case (<constructor> (/.data expected))
+ (#try.Success actual)
+ (\ /.equivalence = expected actual)
- (#try.Failure error)
- false)
- (case (<constructor> (\ binary.monoid compose
- (/.data expected)
- (/.data expected)))
- (#try.Success actual)
- false
+ (#try.Failure error)
+ false)
+ (case (<constructor> (\ binary.monoid compose
+ (/.data expected)
+ (/.data expected)))
+ (#try.Success actual)
+ false
- (#try.Failure error)
- (exception.match? <exception> error)))))]
+ (#try.Failure error)
+ (exception.match? <exception> error)))))]
- [/.sha-1 /.as-sha-1 /.not-a-sha-1]
- [/.md5 /.as-md5 /.not-a-md5]
- ))))
+ [/.sha-1 /.as-sha-1 /.not-a-sha-1]
+ [/.md5 /.as-md5 /.not-a-md5]
+ ))))
(~~ (template [<codec> <hash>]
- [(_.with-cover [<codec>]
- ($codec.spec /.equivalence <codec> (..random <hash>)))]
+ [(_.for [<codec>]
+ ($codec.spec /.equivalence <codec> (..random <hash>)))]
[/.sha-1-codec /.sha-1]
[/.md5-codec /.md5]
))
- (_.with-cover [/.not-a-hash]
- ($_ _.and
- (~~ (template [<codec> <hash>]
- [(do random.monad
- [expected (..random <hash>)]
- (_.cover [<codec>]
- (case (\ <codec> decode
- (format (\ <codec> encode expected)
- "AABBCC"))
- (#try.Success actual)
- false
+ (_.for [/.not-a-hash]
+ ($_ _.and
+ (~~ (template [<codec> <hash>]
+ [(do random.monad
+ [expected (..random <hash>)]
+ (_.cover [<codec>]
+ (case (\ <codec> decode
+ (format (\ <codec> encode expected)
+ "AABBCC"))
+ (#try.Success actual)
+ false
- (#try.Failure error)
- (exception.match? /.not-a-hash error))))]
+ (#try.Failure error)
+ (exception.match? /.not-a-hash error))))]
- [/.sha-1-codec /.sha-1]
- [/.md5-codec /.md5]
- ))))
+ [/.sha-1-codec /.sha-1]
+ [/.md5-codec /.md5]
+ ))))
))))