diff options
author | Eduardo Julian | 2021-09-08 18:57:27 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-09-08 18:57:27 -0400 |
commit | 880cb37c261df20b7b8d968a909557bbc63d6b7f (patch) | |
tree | eb94b5572f3b03b855927c67e171b73ceb4db6c4 /stdlib/source/test | |
parent | 9ae7272d50b64dc9c8651e7a684abc007d4f2caf (diff) |
Normalized syntax of "exception:", "actor:" and "message:".
Diffstat (limited to 'stdlib/source/test')
5 files changed, 11 insertions, 8 deletions
diff --git a/stdlib/source/test/aedifex/repository.lux b/stdlib/source/test/aedifex/repository.lux index 7958dc7bb..0cbea2733 100644 --- a/stdlib/source/test/aedifex/repository.lux +++ b/stdlib/source/test/aedifex/repository.lux @@ -42,11 +42,11 @@ (-> Version Artifact) (|>> ["com.github.luxlang" "test-artifact"])) -(exception: (not_found {uri URI}) +(exception: (not_found [uri URI]) (exception.report ["URI" (%.text uri)])) -(exception: (cannot_upload {uri URI}) +(exception: (cannot_upload [uri URI]) (exception.report ["URI" (%.text uri)])) diff --git a/stdlib/source/test/lux/control/concurrency/actor.lux b/stdlib/source/test/lux/control/concurrency/actor.lux index 7616ea1a9..012a9f796 100644 --- a/stdlib/source/test/lux/control/concurrency/actor.lux +++ b/stdlib/source/test/lux/control/concurrency/actor.lux @@ -33,7 +33,7 @@ [((on_mail message state self) (message state self)) - (message: (count! {increment Nat} state self) + (message: (count! [increment Nat] state self) Nat (let [state' (n.+ increment state)] (async\in (#try.Success [state' state']))))] diff --git a/stdlib/source/test/lux/control/exception.lux b/stdlib/source/test/lux/control/exception.lux index cbb91dec4..faeac513e 100644 --- a/stdlib/source/test/lux/control/exception.lux +++ b/stdlib/source/test/lux/control/exception.lux @@ -20,7 +20,7 @@ (exception: another_exception) (def: label "YOLO") -(exception: (custom_exception {value Nat}) +(exception: (custom_exception [value Nat]) (/.report [label (%.nat value)])) (def: .public test diff --git a/stdlib/source/test/lux/macro/syntax/input.lux b/stdlib/source/test/lux/macro/syntax/input.lux index 0f4060cdc..bed8f2768 100644 --- a/stdlib/source/test/lux/macro/syntax/input.lux +++ b/stdlib/source/test/lux/macro/syntax/input.lux @@ -10,6 +10,9 @@ ["[0]" try] [parser ["<[0]>" code]]] + [data + [collection + ["[0]" list]]] [math ["[0]" random {"+" [Random]}] [number @@ -37,10 +40,9 @@ (do random.monad [expected ..random] (_.cover [/.format /.parser] - (case (<code>.result /.parser - (list (/.format expected))) + (case (<code>.result /.parser (list (/.format (list expected)))) (#try.Failure _) false (#try.Success actual) - (\ /.equivalence = expected actual))))))) + (\ (list.equivalence /.equivalence) = (list expected) actual))))))) diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/primitive.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/primitive.lux index da4112798..d3ef99670 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/primitive.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/primitive.lux @@ -65,7 +65,8 @@ [Text code.text (r.unicode 5)] ))))) -(exception: (wrong_inference {expected Type} {inferred Type}) +(exception: (wrong_inference [expected Type + inferred Type]) (exception.report ["Expected" (%.type expected)] ["Inferred" (%.type inferred)])) |