From 6154b0d4a09b96c9092309917a0379d491181c79 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 30 May 2021 11:13:56 -0400 Subject: lux/macro/template.with can now produce multiple outputs. --- stdlib/source/test/lux/data/text/escape.lux | 10 +++++----- stdlib/source/test/lux/macro/template.lux | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'stdlib/source/test') diff --git a/stdlib/source/test/lux/data/text/escape.lux b/stdlib/source/test/lux/data/text/escape.lux index de8e77510..e58413ac6 100644 --- a/stdlib/source/test/lux/data/text/escape.lux +++ b/stdlib/source/test/lux/data/text/escape.lux @@ -142,12 +142,12 @@ (#try.Success _) false))))] (_.cover [/.invalid_unicode_escape] (template.with [(!invalid ) - (case (/.un_escape (format "\u" )) - (#try.Success _) - false + [(case (/.un_escape (format "\u" )) + (#try.Success _) + false - (#try.Failure error) - (exception.match? /.invalid_unicode_escape error))] + (#try.Failure error) + (exception.match? /.invalid_unicode_escape error))]] (and (!invalid (\ n.hex encode too_short)) (!invalid code))))) (_.cover [/.escaped] diff --git a/stdlib/source/test/lux/macro/template.lux b/stdlib/source/test/lux/macro/template.lux index 9032453c5..8f85ff3ea 100644 --- a/stdlib/source/test/lux/macro/template.lux +++ b/stdlib/source/test/lux/macro/template.lux @@ -20,7 +20,7 @@ ["." /]}) (/.with [(!pow/2 ) - (nat.* )] + [(nat.* )]] (def: pow/2 (-> Nat Nat) (|>> !pow/2))) @@ -88,10 +88,10 @@ (..pow/2 scalar))] (and can_use_with_statements! (/.with [(pow/3 ) - ($_ nat.* ) + [($_ nat.* )] (pow/9 ) - (pow/3 (pow/3 ))] + [(pow/3 (pow/3 ))]] (let [can_use_with_expressions! (nat.= ($_ nat.* scalar scalar scalar) (pow/3 scalar)) @@ -114,13 +114,13 @@ )))) (_.cover [/.irregular_arguments] (/.with [(arity/3 <0> <1> <2>) - ""] + [""]] (exception.match? /.irregular_arguments (macro_error (arity/3 "a" "b"))))) (_.cover [/.cannot_shadow_definition] (exception.match? /.cannot_shadow_definition (macro_error (/.with [(macro_error <0> <1> <2>) - ""] + [""]] "")))) ))) )) -- cgit v1.2.3