diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/test/lux/meta.lux | 120 |
1 files changed, 60 insertions, 60 deletions
diff --git a/stdlib/source/test/lux/meta.lux b/stdlib/source/test/lux/meta.lux index d20c3d22c..2c92a430b 100644 --- a/stdlib/source/test/lux/meta.lux +++ b/stdlib/source/test/lux/meta.lux @@ -2,7 +2,7 @@ [library [lux "*" ["_" test {"+" [Test]}] - ["[0]" type ("[1]\[0]" equivalence)] + ["[0]" type ("[1]#[0]" equivalence)] [abstract [equivalence {"+" [Equivalence]}] [monad {"+" [do]}] @@ -12,15 +12,15 @@ ["$[0]" monad]]] [control ["[0]" maybe] - ["[0]" try {"+" [Try]} ("[1]\[0]" functor)]] + ["[0]" try {"+" [Try]} ("[1]#[0]" functor)]] [data ["[0]" product] - ["[0]" bit ("[1]\[0]" equivalence)] - ["[0]" name ("[1]\[0]" equivalence)] - ["[0]" text ("[1]\[0]" equivalence) + ["[0]" bit ("[1]#[0]" equivalence)] + ["[0]" name ("[1]#[0]" equivalence)] + ["[0]" text ("[1]#[0]" equivalence) ["%" format {"+" [format]}]] [collection - ["[0]" list ("[1]\[0]" functor monoid)] + ["[0]" list ("[1]#[0]" functor monoid)] ["[0]" set]]] [meta ["[0]" location]] @@ -68,12 +68,12 @@ .#host []]]] ($_ _.and (_.cover [/.result] - (|> (\ /.monad in expected) + (|> (# /.monad in expected) (/.result expected_lux) (!expect (^multi {try.#Success actual} (n.= expected actual))))) (_.cover [/.result'] - (|> (\ /.monad in expected) + (|> (# /.monad in expected) (/.result' expected_lux) (!expect (^multi {try.#Success [actual_lux actual]} (and (same? expected_lux actual_lux) @@ -120,7 +120,7 @@ (: (Meta Any)) (/.result expected_lux) (!expect (^multi {try.#Failure actual_error} - (text\= (location.with location.dummy expected_error) + (text#= (location.with location.dummy expected_error) actual_error))))) (_.cover [/.assertion] (and (|> (/.assertion expected_error true) @@ -130,9 +130,9 @@ (|> (/.assertion expected_error false) (/.result expected_lux) (!expect (^multi {try.#Failure actual_error} - (text\= expected_error actual_error)))))) + (text#= expected_error actual_error)))))) (_.cover [/.either] - (and (|> (/.either (\ /.monad in expected) + (and (|> (/.either (# /.monad in expected) (: (Meta Nat) (/.failure expected_error))) (/.result expected_lux) @@ -140,7 +140,7 @@ (n.= expected actual)))) (|> (/.either (: (Meta Nat) (/.failure expected_error)) - (\ /.monad in expected)) + (# /.monad in expected)) (/.result expected_lux) (!expect (^multi {try.#Success actual} (n.= expected actual)))) @@ -150,10 +150,10 @@ (/.failure expected_error))) (/.result expected_lux) (!expect (^multi {try.#Failure actual_error} - (text\= (location.with location.dummy expected_error) + (text#= (location.with location.dummy expected_error) actual_error)))) - (|> (/.either (\ /.monad in expected) - (\ /.monad in dummy)) + (|> (/.either (# /.monad in expected) + (# /.monad in dummy)) (/.result expected_lux) (!expect (^multi {try.#Success actual} (n.= expected actual)))) @@ -167,7 +167,7 @@ version (random.ascii/upper 1) source_code (random.ascii/upper 1) expected_current_module (random.ascii/upper 1) - imported_module_name (random.only (|>> (text\= expected_current_module) not) + imported_module_name (random.only (|>> (text#= expected_current_module) not) (random.ascii/upper 1)) primitive_type (random.ascii/upper 1) expected_seed random.nat @@ -175,8 +175,8 @@ dummy (random.only (|>> (n.= expected) not) random.nat) expected_short (random.ascii/upper 1) dummy_module (random.only (function (_ module) - (not (or (text\= expected_current_module module) - (text\= imported_module_name module)))) + (not (or (text#= expected_current_module module) + (text#= imported_module_name module)))) (random.ascii/upper 1)) .let [imported_module [.#module_hash 0 .#module_aliases (list) @@ -215,7 +215,7 @@ (|> /.current_module_name (/.result expected_lux) (!expect (^multi {try.#Success actual_current_module} - (text\= expected_current_module actual_current_module))))) + (text#= expected_current_module actual_current_module))))) (_.cover [/.current_module] (|> /.current_module (/.result expected_lux) @@ -241,12 +241,12 @@ (_.cover [/.imported_modules] (and (|> (/.imported_modules expected_current_module) (/.result expected_lux) - (try\each (\ (list.equivalence text.equivalence) = + (try#each (# (list.equivalence text.equivalence) = (list imported_module_name))) (try.else false)) (|> (/.imported_modules imported_module_name) (/.result expected_lux) - (try\each (\ (list.equivalence text.equivalence) = + (try#each (# (list.equivalence text.equivalence) = (list))) (try.else false)))) (_.cover [/.imported_by?] @@ -261,12 +261,12 @@ (and (|> (/.normal ["" expected_short]) (/.result expected_lux) (!expect (^multi {try.#Success [actual_module actual_short]} - (and (text\= expected_current_module actual_module) + (and (text#= expected_current_module actual_module) (same? expected_short actual_short))))) (|> (/.normal [dummy_module expected_short]) (/.result expected_lux) (!expect (^multi {try.#Success [actual_module actual_short]} - (and (text\= dummy_module actual_module) + (and (text#= dummy_module actual_module) (same? expected_short actual_short))))))) )))) @@ -283,7 +283,7 @@ version (random.ascii/upper 1) source_code (random.ascii/upper 1) expected_current_module (random.ascii/upper 1) - expected_type (\ ! each (function (_ name) + expected_type (# ! each (function (_ name) {.#Primitive name (list)}) (random.ascii/upper 1)) expected_seed random.nat @@ -331,7 +331,7 @@ (_.cover [.Type_Context /.type_context] (|> /.type_context (/.result expected_lux) - (try\each (same? type_context)) + (try#each (same? type_context)) (try.else false))) ))) @@ -339,10 +339,10 @@ Test (do [! random.monad] [expected_current_module (random.ascii/upper 1) - expected_macro_module (random.only (|>> (text\= expected_current_module) not) + expected_macro_module (random.only (|>> (text#= expected_current_module) not) (random.ascii/upper 1)) expected_short (random.ascii/upper 1) - expected_type (\ ! each (function (_ name) + expected_type (# ! each (function (_ name) {.#Primitive name (list)}) (random.ascii/upper 1)) expected_value (random.either (in .def:) @@ -454,10 +454,10 @@ (do [! random.monad] [expected_exported? random.bit expected_current_module (random.ascii/upper 1) - expected_macro_module (random.only (|>> (text\= expected_current_module) not) + expected_macro_module (random.only (|>> (text#= expected_current_module) not) (random.ascii/upper 1)) expected_short (random.ascii/upper 1) - expected_type (\ ! each (function (_ name) + expected_type (# ! each (function (_ name) {.#Primitive name (list)}) (random.ascii/upper 1)) expected_value (random.either (in .def:) @@ -560,11 +560,11 @@ (expected_lux true {.#Some .Macro})] (and (|> (/.de_aliased [expected_macro_module expected_short]) (/.result expected_lux) - (try\each (name\= [expected_macro_module expected_short])) + (try#each (name#= [expected_macro_module expected_short])) (try.else false)) (|> (/.de_aliased [expected_current_module expected_short]) (/.result expected_lux) - (try\each (name\= [expected_macro_module expected_short])) + (try#each (name#= [expected_macro_module expected_short])) (try.else false))))) (_.cover [/.definition] (let [[current_globals macro_globals expected_lux] @@ -574,7 +574,7 @@ (|> (/.definition [expected_macro_module expected_short]) (/.result expected_lux) (!expect (^multi {try.#Success {.#Definition [actual_exported? actual_type actual_value]}} - (and (bit\= expected_exported? actual_exported?) + (and (bit#= expected_exported? actual_exported?) (same? expected_type actual_type) (same? (:as Any expected_value) actual_value))))) @@ -626,22 +626,22 @@ Test (do [! random.monad] [current_module (random.ascii/upper 1) - tag_module (random.only (|>> (text\= current_module) not) + tag_module (random.only (|>> (text#= current_module) not) (random.ascii/upper 1)) name_0 (random.ascii/upper 1) - name_1 (random.only (|>> (text\= name_0) not) + name_1 (random.only (|>> (text#= name_0) not) (random.ascii/upper 1)) - .let [random_tag (\ ! each (|>> [tag_module]) + .let [random_tag (# ! each (|>> [tag_module]) (random.ascii/upper 1)) random_labels (: (Random [Text (List Text)]) (do ! [head (random.ascii/lower 5)] (|> (random.ascii/lower 5) - (random.only (|>> (text\= head) not)) + (random.only (|>> (text#= head) not)) (random.set text.hash 3) - (\ ! each set.list) + (# ! each set.list) (random.and (in head)))))] tags_0 random_labels tags_1 (let [set/0 (set.of_list text.hash {.#Item tags_0})] @@ -671,14 +671,14 @@ .#module_aliases (list) .#definitions (list& [name_0 {.#Type [false type_0 {.#Left tags_0}]}] [name_1 {.#Type [true type_1 {.#Right tags_1}]}] - ($_ list\composite + ($_ list#composite (|> {.#Item tags_0} list.enumeration - (list\each (function (_ [index short]) + (list#each (function (_ [index short]) [short {.#Label [false type_0 {.#Item tags_0} index]}]))) (|> {.#Item tags_1} list.enumeration - (list\each (function (_ [index short]) + (list#each (function (_ [index short]) [short {.#Slot [true type_1 {.#Item tags_1} index]}]))))) .#imports (list) .#module_state {.#Active}]]) @@ -700,13 +700,13 @@ type.equivalence))] (|> (/.tag_lists tag_module) (/.result expected_lux) - (try\each (\ equivalence = (list [(list\each (|>> [tag_module]) {.#Item tags_1}) + (try#each (# equivalence = (list [(list#each (|>> [tag_module]) {.#Item tags_1}) type_1]))) (try.else false)))) (_.cover [/.tags_of] (|> (/.tags_of [tag_module name_1]) (/.result expected_lux) - (try\each (\ (maybe.equivalence (list.equivalence name.equivalence)) = {.#Some (list\each (|>> [tag_module]) {.#Item tags_1})})) + (try#each (# (maybe.equivalence (list.equivalence name.equivalence)) = {.#Some (list#each (|>> [tag_module]) {.#Item tags_1})})) (try.else false))) (_.cover [/.slot] (|> {.#Item tags_1} @@ -721,12 +721,12 @@ actual_index) correct_tags! - (\ (list.equivalence name.equivalence) = - (list\each (|>> [tag_module]) {.#Item tags_1}) + (# (list.equivalence name.equivalence) = + (list#each (|>> [tag_module]) {.#Item tags_1}) actual_tags) correct_type! - (type\= type_1 + (type#= type_1 actual_type)] (and correct_index! correct_tags! @@ -740,7 +740,7 @@ [current_module (random.ascii/upper 1) [name_0 name_1 name_2 name_3 name_4] (|> (random.ascii/upper 1) (random.set text.hash 5) - (\ ! each set.list) + (# ! each set.list) (random.one (function (_ values) (case values (^ (list name_0 name_1 name_2 name_3 name_4)) @@ -811,57 +811,57 @@ type.equivalence))))] (|> /.locals (/.result expected_lux) - (try\each (\ equivalence = (list (list [name_3 type_3]) + (try#each (# equivalence = (list (list [name_3 type_3]) (list [name_1 type_1] [name_2 type_2])))) (try.else false)))) (_.cover [/.var_type] (and (|> (/.var_type name_0) (/.result expected_lux) - (try\each (\ type.equivalence = type_0)) + (try#each (# type.equivalence = type_0)) (try.else false)) (|> (/.var_type name_1) (/.result expected_lux) - (try\each (\ type.equivalence = type_1)) + (try#each (# type.equivalence = type_1)) (try.else false)) (|> (/.var_type name_2) (/.result expected_lux) - (try\each (\ type.equivalence = type_2)) + (try#each (# type.equivalence = type_2)) (try.else false)) (|> (/.var_type name_3) (/.result expected_lux) - (try\each (\ type.equivalence = type_3)) + (try#each (# type.equivalence = type_3)) (try.else false)))) (_.cover [/.type] (and (|> (/.type ["" name_0]) (/.result expected_lux) - (try\each (\ type.equivalence = type_0)) + (try#each (# type.equivalence = type_0)) (try.else false)) (|> (/.type ["" name_1]) (/.result expected_lux) - (try\each (\ type.equivalence = type_1)) + (try#each (# type.equivalence = type_1)) (try.else false)) (|> (/.type ["" name_2]) (/.result expected_lux) - (try\each (\ type.equivalence = type_2)) + (try#each (# type.equivalence = type_2)) (try.else false)) (|> (/.type ["" name_3]) (/.result expected_lux) - (try\each (\ type.equivalence = type_3)) + (try#each (# type.equivalence = type_3)) (try.else false)) (|> (/.type [current_module name_4]) (/.result expected_lux) - (try\each (\ type.equivalence = type_4)) + (try#each (# type.equivalence = type_4)) (try.else false)) (|> (/.type ["" name_4]) (/.result expected_lux) - (try\each (\ type.equivalence = type_4)) + (try#each (# type.equivalence = type_4)) (try.else false)))) ))) (def: injection (Injection Meta) - (\ /.monad in)) + (# /.monad in)) (def: (comparison init) (-> Lux (Comparison Meta)) @@ -884,7 +884,7 @@ version (random.ascii/upper 1) source_code (random.ascii/upper 1) expected_current_module (random.ascii/upper 1) - expected_type (\ ! each (function (_ name) + expected_type (# ! each (function (_ name) {.#Primitive name (list)}) (random.ascii/upper 1)) expected_seed random.nat @@ -926,7 +926,7 @@ /.lifted (/.result expected_lux) (!expect (^multi {try.#Failure actual} - (text\= (location.with expected_location expected_error) + (text#= (location.with expected_location expected_error) actual)))) (|> expected_value {try.#Success} |