From 891b1cfc82322f8017f0a4f6b707d6fe52024545 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 3 Sep 2021 21:51:30 -0400 Subject: Unified tuple and record syntax. --- stdlib/source/test/lux.lux | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'stdlib/source/test/lux.lux') diff --git a/stdlib/source/test/lux.lux b/stdlib/source/test/lux.lux index b7fb2feb5..bdc83f437 100644 --- a/stdlib/source/test/lux.lux +++ b/stdlib/source/test/lux.lux @@ -470,8 +470,8 @@ (/.type: for_type/record (Record - {#slot/0 Bit - #slot/1 Rev})) + [#slot/0 Bit + #slot/1 Rev])) (/.type: (for_type/all parameter) [parameter parameter]) @@ -564,8 +564,8 @@ (_.cover [/.Record] (exec (: for_type/record - {#slot/0 (n.= expected_left expected_right) - #slot/1 (.rev expected_right)}) + [#slot/0 (n.= expected_left expected_right) + #slot/1 (.rev expected_right)]) true)) )))) @@ -666,13 +666,13 @@ (type: Small (Record - {#small_left Nat - #small_right Text})) + [#small_left Nat + #small_right Text])) (type: Big (Record - {#big_left Nat - #big_right Small})) + [#big_left Nat + #big_right Small])) (def: for_slot Test @@ -685,9 +685,9 @@ .let [expected/s (n.+ shift/s start/s) expected/b (n.+ shift/b start/b) - sample {#big_left start/b - #big_right {#small_left start/s - #small_right text}}]] + sample [#big_left start/b + #big_right [#small_left start/s + #small_right text]]]] ($_ _.and (_.cover [/.value@] (and (and (|> sample @@ -903,12 +903,12 @@ (type: (Pair l r) (Record - {#left l - #right r})) + [#left l + #right r])) (template: (!pair ) - [{#left - #right }]) + [[#left + #right ]]) (def: for_case Test @@ -944,8 +944,8 @@ (/.case [expected_nat expected_int] [0 +0] true _ false) - (/.case {#left expected_nat #right expected_int} - {#left 0 #right +0} true + (/.case [#left expected_nat #right expected_int] + [#left 0 #right +0] true _ false) (/.case (: (Either Nat Int) (#.Left expected_nat)) (#.Left 0) true @@ -965,17 +965,17 @@ (/.^or "+0.5" "+1.25") true _ false))) (_.cover [/.^slots] - (/.case {#left expected_nat #right expected_int} + (/.case [#left expected_nat #right expected_int] (/.^slots [#left #right]) (and (/.same? expected_nat left) (/.same? expected_int right)))) (_.cover [/.^] - (/.case {#left expected_nat #right expected_int} + (/.case [#left expected_nat #right expected_int] (/.^ (!pair 0 +0)) true _ false)) (_.cover [/.^@] (let [expected_pair (: (Pair Nat Int) - {#left expected_nat #right expected_int})] + [#left expected_nat #right expected_int])] (/.case expected_pair (/.^@ actual_pair (/.^ (!pair actual_left actual_right))) (and (/.same? expected_pair actual_pair) @@ -983,7 +983,7 @@ (/.same? expected_int actual_right))))) (_.cover [/.^multi] (let [expected_pair (: (Pair Nat Int) - {#left expected_nat #right expected_int})] + [#left expected_nat #right expected_int])] (and (/.case expected_pair (/.^multi (/.^ (!pair 0 actual_right)) {actual_right +0}) @@ -1011,7 +1011,7 @@ (_.cover [/.let] (and (/.let [actual_nat expected_nat] (/.same? expected_nat actual_nat)) - (/.let [[actual_left actual_right] {#left expected_nat #right expected_int}] + (/.let [[actual_left actual_right] [#left expected_nat #right expected_int]] (and (/.same? expected_nat actual_left) (/.same? expected_int actual_right))))) ))) -- cgit v1.2.3