diff options
Diffstat (limited to 'stdlib/source/test/lux/control')
-rw-r--r-- | stdlib/source/test/lux/control/concurrency/actor.lux | 4 | ||||
-rw-r--r-- | stdlib/source/test/lux/control/exception.lux | 9 | ||||
-rw-r--r-- | stdlib/source/test/lux/control/region.lux | 4 |
3 files changed, 9 insertions, 8 deletions
diff --git a/stdlib/source/test/lux/control/concurrency/actor.lux b/stdlib/source/test/lux/control/concurrency/actor.lux index d11016a4b..e8d3568fd 100644 --- a/stdlib/source/test/lux/control/concurrency/actor.lux +++ b/stdlib/source/test/lux/control/concurrency/actor.lux @@ -5,7 +5,7 @@ [monad (.only do)]] [control ["[0]" try (.only Try)] - ["[0]" exception (.only exception)] + ["[0]" exception] ["[0]" io (.only IO io)]] [data [text @@ -27,7 +27,7 @@ ["[0]" async (.only Async Resolver) (.use "[1]#[0]" monad)] ["[0]" frp]]]]) -(exception got_wrecked) +(exception.def got_wrecked) (def counter (/.Behavior Nat) diff --git a/stdlib/source/test/lux/control/exception.lux b/stdlib/source/test/lux/control/exception.lux index d90494bd9..5c29d3103 100644 --- a/stdlib/source/test/lux/control/exception.lux +++ b/stdlib/source/test/lux/control/exception.lux @@ -17,11 +17,12 @@ [// ["[0]" try (.only Try)]]]]) -(/.exception an_exception) -(/.exception another_exception) +(/.def an_exception) +(/.def another_exception) (def label "YOLO") -(/.exception (custom_exception [value Nat]) +(/.def (custom_exception value) + (/.Exception Nat) (/.report (list [label (%.nat value)]))) (def .public test @@ -104,7 +105,7 @@ {try.#Failure message} (and (text.contains? (/.error ..an_exception []) message) (text.contains? (/.error ..another_exception []) message))))) - (_.coverage [/.exception] + (_.coverage [/.def] (when (/.except ..custom_exception [expected]) {try.#Success _} false diff --git a/stdlib/source/test/lux/control/region.lux b/stdlib/source/test/lux/control/region.lux index 54e22f811..a859fd904 100644 --- a/stdlib/source/test/lux/control/region.lux +++ b/stdlib/source/test/lux/control/region.lux @@ -28,9 +28,9 @@ ["[0]" / (.only Region) [// ["[0]" thread (.only Thread)] - ["[0]" exception (.only Exception exception)]]]]) + ["[0]" exception (.only Exception)]]]]) -(exception oops) +(exception.def oops) (def (success? result) (All (_ a) (-> (Try a) Bit)) |