diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/test/lux/control/parser/type.lux | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/stdlib/source/test/lux/control/parser/type.lux b/stdlib/source/test/lux/control/parser/type.lux index 39656a32c..6476f9e30 100644 --- a/stdlib/source/test/lux/control/parser/type.lux +++ b/stdlib/source/test/lux/control/parser/type.lux @@ -6,6 +6,7 @@ [abstract [monad {"+" do}]] [control + [pipe {"+" case>}] ["[0]" try] ["[0]" exception]] [data @@ -150,6 +151,23 @@ /.parameter) {.#Parameter 0}) (!expect {try.#Success [quantification##binding argument##binding _]}))) + (_.cover [/.argument] + (let [argument? (: (-> Nat Nat Bit) + (function (_ @ expected) + (|> (/.result (<| (/.with_extension quantification) + (/.with_extension argument) + (/.with_extension quantification) + (/.with_extension argument) + (do //.monad + [env /.env + _ /.any] + (in (/.argument env @)))) + not_parameter) + (!expect (^multi {try.#Success [_ _ _ _ actual]} + (n.= expected actual))))))] + (and (argument? 0 2) + (argument? 1 3) + (argument? 2 0)))) (_.cover [/.wrong_parameter] (|> (/.result (<| (/.with_extension quantification) (/.with_extension argument) |