aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/control/parser/type.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/test/lux/control/parser/type.lux')
-rw-r--r--stdlib/source/test/lux/control/parser/type.lux80
1 files changed, 40 insertions, 40 deletions
diff --git a/stdlib/source/test/lux/control/parser/type.lux b/stdlib/source/test/lux/control/parser/type.lux
index 3d27819bd..3e26eb4ab 100644
--- a/stdlib/source/test/lux/control/parser/type.lux
+++ b/stdlib/source/test/lux/control/parser/type.lux
@@ -32,7 +32,7 @@
(Random Type)
(|> (random.ascii/alpha_num 1)
(\ random.monad each (function (_ name)
- {#.Primitive name (list)}))))
+ {.#Primitive name (list)}))))
(def: matches
Test
@@ -44,29 +44,29 @@
($_ _.and
(_.cover [/.exactly]
(and (|> (/.result (/.exactly expected) expected)
- (!expect {#try.Success []}))
+ (!expect {try.#Success []}))
(|> (/.result (/.exactly expected) dummy)
- (!expect (^multi {#try.Failure error}
+ (!expect (^multi {try.#Failure error}
(exception.match? /.types_do_not_match error))))))
(_.cover [/.sub]
(and (|> (/.result (/.sub expected) expected)
- (!expect {#try.Success []}))
+ (!expect {try.#Success []}))
(|> (/.result (/.sub Any) expected)
- (!expect {#try.Success []}))
+ (!expect {try.#Success []}))
(|> (/.result (/.sub expected) Nothing)
- (!expect {#try.Success []}))
+ (!expect {try.#Success []}))
(|> (/.result (/.sub expected) dummy)
- (!expect (^multi {#try.Failure error}
+ (!expect (^multi {try.#Failure error}
(exception.match? /.types_do_not_match error))))))
(_.cover [/.super]
(and (|> (/.result (/.super expected) expected)
- (!expect {#try.Success []}))
+ (!expect {try.#Success []}))
(|> (/.result (/.super expected) Any)
- (!expect {#try.Success []}))
+ (!expect {try.#Success []}))
(|> (/.result (/.super Nothing) expected)
- (!expect {#try.Success []}))
+ (!expect {try.#Success []}))
(|> (/.result (/.super expected) dummy)
- (!expect (^multi {#try.Failure error}
+ (!expect (^multi {try.#Failure error}
(exception.match? /.types_do_not_match error))))))
)))
@@ -81,13 +81,13 @@
[(_.cover [<parser> <exception>]
(and (|> (/.result (<parser> ($_ //.and /.any /.any /.any))
(<good_constructor> (list expected_left expected_middle expected_right)))
- (!expect (^multi {#try.Success [actual_left actual_middle actual_right]}
+ (!expect (^multi {try.#Success [actual_left actual_middle actual_right]}
(and (type\= expected_left actual_left)
(type\= expected_middle actual_middle)
(type\= expected_right actual_right)))))
(|> (/.result (<parser> ($_ //.and /.any /.any /.any))
(<bad_constructor> (list expected_left expected_middle expected_right)))
- (!expect (^multi {#try.Failure error}
+ (!expect (^multi {try.#Failure error}
(exception.match? <exception> error))))))]
[/.variant /.not_variant type.variant type.tuple]
@@ -97,24 +97,24 @@
(_.cover [/.function /.not_function]
(and (|> (/.result (/.function ($_ //.and /.any /.any) /.any)
(type.function (list expected_left expected_middle) expected_right))
- (!expect (^multi {#try.Success [[actual_left actual_middle] actual_right]}
+ (!expect (^multi {try.#Success [[actual_left actual_middle] actual_right]}
(and (type\= expected_left actual_left)
(type\= expected_middle actual_middle)
(type\= expected_right actual_right)))))
(|> (/.result (/.function ($_ //.and /.any /.any) /.any)
(type.variant (list expected_left expected_middle expected_right)))
- (!expect (^multi {#try.Failure error}
+ (!expect (^multi {try.#Failure error}
(exception.match? /.not_function error))))))
(_.cover [/.applied /.not_application]
(and (|> (/.result (/.applied ($_ //.and /.any /.any /.any))
(type.application (list expected_middle expected_right) expected_left))
- (!expect (^multi {#try.Success [actual_left actual_middle actual_right]}
+ (!expect (^multi {try.#Success [actual_left actual_middle actual_right]}
(and (type\= expected_left actual_left)
(type\= expected_middle actual_middle)
(type\= expected_right actual_right)))))
(|> (/.result (/.applied ($_ //.and /.any /.any /.any))
(type.variant (list expected_left expected_middle expected_right)))
- (!expect (^multi {#try.Failure error}
+ (!expect (^multi {try.#Failure error}
(exception.match? /.not_application error))))))
))))
@@ -128,38 +128,38 @@
($_ _.and
(_.cover [/.not_parameter]
(|> (/.result /.parameter not_parameter)
- (!expect (^multi {#try.Failure error}
+ (!expect (^multi {try.#Failure error}
(exception.match? /.not_parameter error)))))
(_.cover [/.unknown_parameter]
- (|> (/.result /.parameter {#.Parameter parameter})
- (!expect (^multi {#try.Failure error}
+ (|> (/.result /.parameter {.#Parameter parameter})
+ (!expect (^multi {try.#Failure error}
(exception.match? /.unknown_parameter error)))))
(_.cover [/.with_extension]
(|> (/.result (<| (/.with_extension quantification)
(/.with_extension argument)
/.any)
not_parameter)
- (!expect (^multi {#try.Success [quantification\\binding argument\\binding actual]}
+ (!expect (^multi {try.#Success [quantification\\binding argument\\binding actual]}
(same? not_parameter actual)))))
(_.cover [/.parameter]
(|> (/.result (<| (/.with_extension quantification)
(/.with_extension argument)
/.parameter)
- {#.Parameter 0})
- (!expect {#try.Success [quantification\\binding argument\\binding _]})))
+ {.#Parameter 0})
+ (!expect {try.#Success [quantification\\binding argument\\binding _]})))
(_.cover [/.wrong_parameter]
(|> (/.result (<| (/.with_extension quantification)
(/.with_extension argument)
(/.parameter! 1))
- {#.Parameter 0})
- (!expect (^multi {#try.Failure error}
+ {.#Parameter 0})
+ (!expect (^multi {try.#Failure error}
(exception.match? /.wrong_parameter error)))))
(_.cover [/.parameter!]
(|> (/.result (<| (/.with_extension quantification)
(/.with_extension argument)
(/.parameter! 0))
- {#.Parameter 0})
- (!expect {#try.Success [quantification\\binding argument\\binding _]})))
+ {.#Parameter 0})
+ (!expect {try.#Success [quantification\\binding argument\\binding _]})))
)))
(def: polymorphic
@@ -171,16 +171,16 @@
(_.cover [/.not_polymorphic]
(and (|> (/.result (/.polymorphic /.any)
not_polymorphic)
- (!expect (^multi {#try.Failure error}
+ (!expect (^multi {try.#Failure error}
(exception.match? /.not_polymorphic error))))
(|> (/.result (/.polymorphic /.any)
(type.univ_q 0 not_polymorphic))
- (!expect (^multi {#try.Failure error}
+ (!expect (^multi {try.#Failure error}
(exception.match? /.not_polymorphic error))))))
(_.cover [/.polymorphic]
(|> (/.result (/.polymorphic /.any)
(type.univ_q expected_inputs not_polymorphic))
- (!expect (^multi {#try.Success [g!poly actual_inputs bodyT]}
+ (!expect (^multi {try.#Success [g!poly actual_inputs bodyT]}
(and (n.= expected_inputs (list.size actual_inputs))
(same? not_polymorphic bodyT))))))
)))
@@ -194,7 +194,7 @@
[expected ..primitive]
(_.cover [/.result /.any]
(|> (/.result /.any expected)
- (!expect (^multi {#try.Success actual}
+ (!expect (^multi {try.#Success actual}
(type\= expected actual))))))
(do [! random.monad]
[expected ..primitive]
@@ -204,10 +204,10 @@
_ /.any]
(in actual))
expected)
- (!expect (^multi {#try.Success actual}
+ (!expect (^multi {try.#Success actual}
(type\= expected actual))))
(|> (/.result /.next expected)
- (!expect (^multi {#try.Failure error}
+ (!expect (^multi {try.#Failure error}
(exception.match? /.unconsumed_input error)))))))
(do [! random.monad]
[expected ..primitive]
@@ -217,7 +217,7 @@
[_ /.any]
<parser>)
expected)
- (!expect (^multi {#try.Failure error}
+ (!expect (^multi {try.#Failure error}
(exception.match? /.empty_input error))))]
[/.any]
@@ -231,7 +231,7 @@
_ /.any]
(in env))
expected)
- (!expect (^multi {#try.Success environment}
+ (!expect (^multi {try.#Success environment}
(same? /.fresh environment))))))
(do [! random.monad]
[expected ..primitive
@@ -243,14 +243,14 @@
(/.local (list expected)
/.any))
dummy)
- (!expect (^multi {#try.Success actual}
+ (!expect (^multi {try.#Success actual}
(type\= expected actual))))))
(do [! random.monad]
[expected random.nat]
(_.cover [/.existential /.not_existential]
(|> (/.result /.existential
- {#.Ex expected})
- (!expect (^multi {#try.Success actual}
+ {.#Ex expected})
+ (!expect (^multi {try.#Success actual}
(n.= expected actual))))))
(do [! random.monad]
[expected_name (random.and (random.ascii/alpha_num 1)
@@ -258,8 +258,8 @@
expected_type ..primitive]
(_.cover [/.named /.not_named]
(|> (/.result /.named
- {#.Named expected_name expected_type})
- (!expect (^multi {#try.Success [actual_name actual_type]}
+ {.#Named expected_name expected_type})
+ (!expect (^multi {try.#Success [actual_name actual_type]}
(and (name\= expected_name actual_name)
(type\= expected_type actual_type)))))))
..aggregate