diff options
Diffstat (limited to 'stdlib/source/test/lux/abstract/mix.lux')
-rw-r--r-- | stdlib/source/test/lux/abstract/mix.lux | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/stdlib/source/test/lux/abstract/mix.lux b/stdlib/source/test/lux/abstract/mix.lux index ccf941a83..de1df507c 100644 --- a/stdlib/source/test/lux/abstract/mix.lux +++ b/stdlib/source/test/lux/abstract/mix.lux @@ -2,7 +2,9 @@ [library [lux (.except) [abstract - [monad (.only do)]] + [monad (.only do)] + [functor + [\\test (.only Injection Comparison)]]] [data [collection ["[0]" list]]] @@ -25,3 +27,15 @@ (n.= (of list.mix mix (of n.addition composite) (of n.addition identity) samples) (/.with_monoid n.addition list.mix samples))) )))) + +(def .public (spec injection comparison (open "/#[0]")) + (All (_ !) + (-> (Injection !) (Comparison !) (/.Mix !) + Test)) + (do random.monad + [subject random.nat + parameter random.nat] + (<| (_.for [/.Mix]) + (_.coverage [/.mix] + (n.= (/#mix n.+ parameter (injection subject)) + (n.+ parameter subject)))))) |