diff options
Diffstat (limited to 'stdlib/source/test/lux/math/logic/continuous.lux')
-rw-r--r-- | stdlib/source/test/lux/math/logic/continuous.lux | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/stdlib/source/test/lux/math/logic/continuous.lux b/stdlib/source/test/lux/math/logic/continuous.lux index 6895060c1..6c4b8a721 100644 --- a/stdlib/source/test/lux/math/logic/continuous.lux +++ b/stdlib/source/test/lux/math/logic/continuous.lux @@ -2,31 +2,35 @@ [lux #* ["%" data/text/format (#+ format)] [abstract/monad (#+ do)] - ["r" math/random] - ["_" test (#+ Test)]] + ["_" test (#+ Test)] + [math + ["." random]] + [data + [number + ["r" rev]]]] {1 ["." /]}) (def: #export test Test (<| (_.context (%.name (name-of /._))) - (do r.monad - [left r.rev - right r.rev] + (do random.monad + [left random.rev + right random.rev] ($_ _.and (_.test "AND is the minimum." (let [result (/.and left right)] - (and (r/<= left result) - (r/<= right result)))) + (and (r.<= left result) + (r.<= right result)))) (_.test "OR is the maximum." (let [result (/.or left right)] - (and (r/>= left result) - (r/>= right result)))) + (and (r.>= left result) + (r.>= right result)))) (_.test "Double negation results in the original value." - (r/= left (/.not (/.not left)))) + (r.= left (/.not (/.not left)))) (_.test "Every value is equivalent to itself." - (and (r/>= left + (and (r.>= left (/.= left left)) - (r/>= right + (r.>= right (/.= right right)))) )))) |