diff options
author | Eduardo Julian | 2020-12-10 00:15:15 -0400 |
---|---|---|
committer | Eduardo Julian | 2020-12-10 00:15:15 -0400 |
commit | 14287585025b2d8fff1991691def9e643b039ac8 (patch) | |
tree | 4fdbe2aafa907d1dd0f47150c545adf3eabeb124 /stdlib/source/test/lux/control/security | |
parent | 893c76ad530ca0e81cd84602543c3114407f4592 (diff) |
Re-named "with-cover" to "for".
Diffstat (limited to 'stdlib/source/test/lux/control/security')
-rw-r--r-- | stdlib/source/test/lux/control/security/capability.lux | 28 | ||||
-rw-r--r-- | stdlib/source/test/lux/control/security/policy.lux | 22 |
2 files changed, 25 insertions, 25 deletions
diff --git a/stdlib/source/test/lux/control/security/capability.lux b/stdlib/source/test/lux/control/security/capability.lux index f8f757641..50a2d04d8 100644 --- a/stdlib/source/test/lux/control/security/capability.lux +++ b/stdlib/source/test/lux/control/security/capability.lux @@ -29,17 +29,17 @@ base random.nat #let [expected (n.+ shift base)] pass-through (random.ascii 1)] - (_.with-cover [/.Capability] - ($_ _.and - (_.cover [/.capability: /.use] - (let [capability (..can-shift (function (_ [no-op raw]) - [no-op (n.+ shift raw)])) - [untouched actual] (/.use capability [pass-through base])] - (and (is? pass-through untouched) - (n.= expected actual)))) - (wrap (let [capability (..can-io (function (_ _) (io.io expected)))] - (do promise.monad - [actual (/.use (/.async capability) [])] - (_.cover' [/.async] - (n.= expected actual))))) - ))))) + (_.for [/.Capability] + ($_ _.and + (_.cover [/.capability: /.use] + (let [capability (..can-shift (function (_ [no-op raw]) + [no-op (n.+ shift raw)])) + [untouched actual] (/.use capability [pass-through base])] + (and (is? pass-through untouched) + (n.= expected actual)))) + (wrap (let [capability (..can-io (function (_ _) (io.io expected)))] + (do promise.monad + [actual (/.use (/.async capability) [])] + (_.cover' [/.async] + (n.= expected actual))))) + ))))) diff --git a/stdlib/source/test/lux/control/security/policy.lux b/stdlib/source/test/lux/control/security/policy.lux index bb5144fd1..647526b6c 100644 --- a/stdlib/source/test/lux/control/security/policy.lux +++ b/stdlib/source/test/lux/control/security/policy.lux @@ -71,22 +71,22 @@ (def: #export test Test (<| (_.covering /._) - (_.with-cover [/.Policy - /.Can-Upgrade /.Can-Downgrade]) + (_.for [/.Policy + /.Can-Upgrade /.Can-Downgrade]) (do random.monad [#let [policy-0 (policy [])] raw-password (random.ascii 10) #let [password (\ policy-0 password raw-password)]] ($_ _.and - (_.with-cover [/.Privacy /.Private /.Can-Conceal /.Can-Reveal - /.Safety /.Safe /.Can-Trust /.Can-Distrust] - ($_ _.and - (_.with-cover [/.functor] - ($functor.spec (..injection (\ policy-0 can-upgrade)) (..comparison (\ policy-0 can-downgrade)) /.functor)) - (_.with-cover [/.apply] - ($apply.spec (..injection (\ policy-0 can-upgrade)) (..comparison (\ policy-0 can-downgrade)) /.apply)) - (_.with-cover [/.monad] - ($monad.spec (..injection (\ policy-0 can-upgrade)) (..comparison (\ policy-0 can-downgrade)) /.monad)))) + (_.for [/.Privacy /.Private /.Can-Conceal /.Can-Reveal + /.Safety /.Safe /.Can-Trust /.Can-Distrust] + ($_ _.and + (_.for [/.functor] + ($functor.spec (..injection (\ policy-0 can-upgrade)) (..comparison (\ policy-0 can-downgrade)) /.functor)) + (_.for [/.apply] + ($apply.spec (..injection (\ policy-0 can-upgrade)) (..comparison (\ policy-0 can-downgrade)) /.apply)) + (_.for [/.monad] + ($monad.spec (..injection (\ policy-0 can-upgrade)) (..comparison (\ policy-0 can-downgrade)) /.monad)))) (_.cover [/.Privilege /.Context /.with-policy] (and (\ policy-0 = password password) |