diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/test/lux/tool/compiler/phase.lux | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/stdlib/source/test/lux/tool/compiler/phase.lux b/stdlib/source/test/lux/tool/compiler/phase.lux index f0137730a..19ec57c3c 100644 --- a/stdlib/source/test/lux/tool/compiler/phase.lux +++ b/stdlib/source/test/lux/tool/compiler/phase.lux @@ -8,7 +8,7 @@ ["$[0]" functor {"+" Injection Comparison}] ["$[0]" monad]]] [control - [pipe {"+" case>}] + ["[0]" pipe] ["[0]" try ("[1]#[0]" functor)] ["[0]" exception {"+" exception:}]] [data @@ -54,19 +54,19 @@ (_.cover [/.failure] (|> (/.failure expected_error) (/.result state) - (case> {try.#Failure actual_error} - (same? expected_error actual_error) + (pipe.case {try.#Failure actual_error} + (same? expected_error actual_error) - _ - false))) + _ + false))) (_.cover [/.lifted] (and (|> (/.lifted {try.#Failure expected_error}) (/.result state) - (case> {try.#Failure actual_error} - (same? expected_error actual_error) + (pipe.case {try.#Failure actual_error} + (same? expected_error actual_error) - _ - false)) + _ + false)) (|> (/.lifted {try.#Success expected}) (# /.functor each (same? expected)) (/.result state) @@ -74,26 +74,26 @@ (_.cover [/.except] (|> (/.except ..oops []) (/.result state) - (case> {try.#Failure error} - (exception.match? ..oops error) + (pipe.case {try.#Failure error} + (exception.match? ..oops error) - _ - false))) + _ + false))) (_.cover [/.assertion] (and (|> (/.assertion ..oops [] false) (/.result state) - (case> {try.#Failure error} - (exception.match? ..oops error) + (pipe.case {try.#Failure error} + (exception.match? ..oops error) - _ - false)) + _ + false)) (|> (/.assertion ..oops [] true) (/.result state) - (case> {try.#Success _} - true + (pipe.case {try.#Success _} + true - _ - false)))) + _ + false)))) ))) (def: test|state @@ -125,12 +125,12 @@ (# n.hex encoded) (text#= state/hex))))) (/.result' state) - (case> {try.#Success [state' verdict]} - (and verdict - (n.= state state')) + (pipe.case {try.#Success [state' verdict]} + (and verdict + (n.= state state')) - _ - false))) + _ + false))) ))) (def: test|operation @@ -147,20 +147,20 @@ (_.cover [/.result] (|> (# /.monad in expected) (/.result state) - (case> {try.#Success actual} - (same? expected actual) + (pipe.case {try.#Success actual} + (same? expected actual) - _ - false))) + _ + false))) (_.cover [/.result'] (|> (# /.monad in expected) (/.result' state) - (case> {try.#Success [state' actual]} - (and (same? state state') - (same? expected actual)) + (pipe.case {try.#Success [state' actual]} + (and (same? state state') + (same? expected actual)) - _ - false))) + _ + false))) ..test|state ..test|error ))) @@ -186,13 +186,13 @@ (# /.monad in (%.frac input)))))] (|> (phase archive.empty expected) (/.result' [state/0 state/1]) - (case> {try.#Success [[state/0' state/1'] actual]} - (and (text#= (%.frac (i.frac expected)) actual) - (same? state/0 state/0') - (same? state/1 state/1')) + (pipe.case {try.#Success [[state/0' state/1'] actual]} + (and (text#= (%.frac (i.frac expected)) actual) + (same? state/0 state/0') + (same? state/1 state/1')) - _ - false)))) + _ + false)))) ))) (def: .public test |