From 880cb37c261df20b7b8d968a909557bbc63d6b7f Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 8 Sep 2021 18:57:27 -0400 Subject: Normalized syntax of "exception:", "actor:" and "message:". --- stdlib/source/test/aedifex/repository.lux | 4 ++-- stdlib/source/test/lux/control/concurrency/actor.lux | 2 +- stdlib/source/test/lux/control/exception.lux | 2 +- stdlib/source/test/lux/macro/syntax/input.lux | 8 +++++--- .../lux/tool/compiler/language/lux/phase/analysis/primitive.lux | 3 ++- 5 files changed, 11 insertions(+), 8 deletions(-) (limited to 'stdlib/source/test') 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 (.result /.parser - (list (/.format expected))) + (case (.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)])) -- cgit v1.2.3