diff options
Diffstat (limited to 'stdlib/source/test')
18 files changed, 42 insertions, 42 deletions
diff --git a/stdlib/source/test/lux.lux b/stdlib/source/test/lux.lux index e33bdf2f0..da7c16c26 100644 --- a/stdlib/source/test/lux.lux +++ b/stdlib/source/test/lux.lux @@ -266,11 +266,11 @@ (def: for_module Test ($_ _.and - (let [[module short] (/.name_of .example)] - (_.cover [/.name_of /.prelude_module] + (let [[module short] (/.symbol .example)] + (_.cover [/.symbol /.prelude_module] (and (text#= /.prelude_module module) (text#= short "example")))) - (let [[module short] (/.name_of ..example)] + (let [[module short] (/.symbol ..example)] (_.cover [/.module_separator] (and (text.contains? /.module_separator module) (not (text.contains? /.module_separator short))))) @@ -302,7 +302,7 @@ (def: current_module Text - (let [[module _] (name_of .._)] + (let [[module _] (symbol .._)] module)) (def: for_code/' diff --git a/stdlib/source/test/lux/debug.lux b/stdlib/source/test/lux/debug.lux index 3ad2747e8..3cc3e18f5 100644 --- a/stdlib/source/test/lux/debug.lux +++ b/stdlib/source/test/lux/debug.lux @@ -262,7 +262,7 @@ true)) (_.cover [/.log!] (exec - (/.log! (format (%.symbol (name_of /.log!)) + (/.log! (format (%.symbol (symbol /.log!)) " works: " (%.text message))) true)) )))) diff --git a/stdlib/source/test/lux/macro.lux b/stdlib/source/test/lux/macro.lux index 0b8fdced8..8553e6e16 100644 --- a/stdlib/source/test/lux/macro.lux +++ b/stdlib/source/test/lux/macro.lux @@ -61,8 +61,8 @@ (do [! random.monad] [seed random.nat identifier_prefix (random.ascii/upper 1) - .let [macro_module (symbol.module (name_of /._)) - current_module (symbol.module (name_of .._))]] + .let [macro_module (symbol.module (symbol /._)) + current_module (symbol.module (symbol .._))]] (in [seed identifier_prefix [.#info [.#target "" @@ -161,7 +161,7 @@ (|> (/.single_expansion (` (/.log_single_expansion!))) (meta.result lux) (!expect (^multi {try.#Failure error} - (text.contains? (/.wrong_syntax_error (name_of /.log_single_expansion!)) + (text.contains? (/.wrong_syntax_error (symbol /.log_single_expansion!)) error))))) (_.cover [/.with_identifiers] (with_expansions [<expected> (fresh_identifier)] diff --git a/stdlib/source/test/lux/macro/template.lux b/stdlib/source/test/lux/macro/template.lux index f65cdaa27..c2001cb23 100644 --- a/stdlib/source/test/lux/macro/template.lux +++ b/stdlib/source/test/lux/macro/template.lux @@ -62,10 +62,10 @@ <short>' true _ false)) (_.cover [/.identifier] - (and (case (`` (name_of (~~ (/.identifier <short>)))) + (and (case (`` (symbol (~~ (/.identifier <short>)))) ["" <short>'] true _ false) - (case (`` (name_of (~~ (/.identifier <module> <short>)))) + (case (`` (symbol (~~ (/.identifier <module> <short>)))) [<module>' <short>'] true _ false) )) diff --git a/stdlib/source/test/lux/meta/symbol.lux b/stdlib/source/test/lux/meta/symbol.lux index 85598a159..84f87e9fa 100644 --- a/stdlib/source/test/lux/meta/symbol.lux +++ b/stdlib/source/test/lux/meta/symbol.lux @@ -58,12 +58,12 @@ (_.cover [/.module /.short] (and (same? module1 (/.module symbol1)) (same? short1 (/.short symbol1)))) - (_.for [.name_of] + (_.for [.symbol] (let [(^open "/#[0]") /.equivalence] ($_ _.and (_.test "Can obtain Symbol from identifier." - (and (/#= [.prelude_module "yolo"] (.name_of .yolo)) - (/#= ["test/lux/meta/symbol" "yolo"] (.name_of ..yolo)) - (/#= ["" "yolo"] (.name_of yolo)) - (/#= ["library/lux/test" "yolo"] (.name_of library/lux/test.yolo))))))) + (and (/#= [.prelude_module "yolo"] (.symbol .yolo)) + (/#= ["test/lux/meta/symbol" "yolo"] (.symbol ..yolo)) + (/#= ["" "yolo"] (.symbol yolo)) + (/#= ["library/lux/test" "yolo"] (.symbol library/lux/test.yolo))))))) ))))) diff --git a/stdlib/source/test/lux/target/jvm.lux b/stdlib/source/test/lux/target/jvm.lux index 7aaefe214..2508ae7fc 100644 --- a/stdlib/source/test/lux/target/jvm.lux +++ b/stdlib/source/test/lux/target/jvm.lux @@ -1722,7 +1722,7 @@ (def: .public test Test - (<| (_.context (%.symbol (name_of .._))) + (<| (_.context (%.symbol (symbol .._))) ($_ _.and (<| (_.context "instruction") ..instruction) diff --git a/stdlib/source/test/lux/test.lux b/stdlib/source/test/lux/test.lux index fad4845ac..c67db2d55 100644 --- a/stdlib/source/test/lux/test.lux +++ b/stdlib/source/test/lux/test.lux @@ -188,9 +188,9 @@ [covering _] covering] (/.cover' [/.cover] (and (and (not (set.empty? (value@ /.#expected_coverage not_covering))) - (not (set.member? (value@ /.#actual_coverage not_covering) (name_of ..dummy_target)))) + (not (set.member? (value@ /.#actual_coverage not_covering) (symbol ..dummy_target)))) (and (not (set.empty? (value@ /.#expected_coverage covering))) - (set.member? (value@ /.#actual_coverage covering) (name_of ..dummy_target)))))))) + (set.member? (value@ /.#actual_coverage covering) (symbol ..dummy_target)))))))) (do random.monad [not_covering (/.covering .._ (/.test "" true)) covering (/.covering .._ (in (/.cover' [..dummy_target] true)))] @@ -199,9 +199,9 @@ [covering _] covering] (/.cover' [/.cover'] (and (and (not (set.empty? (value@ /.#expected_coverage not_covering))) - (not (set.member? (value@ /.#actual_coverage not_covering) (name_of ..dummy_target)))) + (not (set.member? (value@ /.#actual_coverage not_covering) (symbol ..dummy_target)))) (and (not (set.empty? (value@ /.#expected_coverage covering))) - (set.member? (value@ /.#actual_coverage covering) (name_of ..dummy_target)))))))) + (set.member? (value@ /.#actual_coverage covering) (symbol ..dummy_target)))))))) (do random.monad [not_covering (/.covering .._ (/.test "" true)) covering (/.covering .._ (/.for [..dummy_target] (/.test "" true)))] @@ -210,9 +210,9 @@ [covering _] covering] (/.cover' [/.for] (and (and (not (set.empty? (value@ /.#expected_coverage not_covering))) - (not (set.member? (value@ /.#actual_coverage not_covering) (name_of ..dummy_target)))) + (not (set.member? (value@ /.#actual_coverage not_covering) (symbol ..dummy_target)))) (and (not (set.empty? (value@ /.#expected_coverage covering))) - (set.member? (value@ /.#actual_coverage covering) (name_of ..dummy_target)))))))) + (set.member? (value@ /.#actual_coverage covering) (symbol ..dummy_target)))))))) )) (def: .public test diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux index b75932d8d..8cf740847 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux @@ -140,7 +140,7 @@ [pattern body]) (def: .public test - (<| (_.context (symbol.module (name_of /._))) + (<| (_.context (symbol.module (symbol /._))) (do [! r.monad] [module_name (r.unicode 5) variant_name (r.unicode 5) diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/function.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/function.lux index 66f8a82ab..8ab7706c7 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/function.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/function.lux @@ -58,7 +58,7 @@ [outputT outputC] _primitive.primitive [inputT _] _primitive.primitive .let [g!arg (code.local_identifier arg_name)]] - (<| (_.context (%.symbol (name_of /.function))) + (<| (_.context (%.symbol (symbol /.function))) ($_ _.and (_.test "Can analyse function." (and (|> (//type.with_type (All (_ a) (-> a outputT)) @@ -105,7 +105,7 @@ (type.function {.#Item varT partial_poly_inputsT}) varT) dummy_function {////analysis.#Function (list) {////analysis.#Reference (////reference.local 1)}}]] - (<| (_.context (%.symbol (name_of /.apply))) + (<| (_.context (%.symbol (symbol /.apply))) ($_ _.and (_.test "Can analyse monomorphic type application." (|> (/.apply _primitive.phase inputsC funcT dummy_function archive.empty (' [])) @@ -126,7 +126,7 @@ (def: .public test Test - (<| (_.context (symbol.module (name_of /._))) + (<| (_.context (symbol.module (symbol /._))) ($_ _.and ..abstraction ..apply 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 8ce35da36..b0bb9903e 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 @@ -86,9 +86,9 @@ {try.#Failure error}))) (def: .public test - (<| (_.context (symbol.module (name_of /._))) + (<| (_.context (symbol.module (symbol /._))) (`` ($_ _.and - (_.test (%.symbol (name_of ////analysis.#Unit)) + (_.test (%.symbol (symbol ////analysis.#Unit)) (|> (infer Any (..phase archive.empty (' []))) (case> (^ {try.#Success {////analysis.#Primitive {////analysis.#Unit output}}}) (same? [] output) @@ -98,7 +98,7 @@ (~~ (template [<type> <tag> <random> <constructor>] [(do r.monad [sample <random>] - (_.test (%.symbol (name_of <tag>)) + (_.test (%.symbol (symbol <tag>)) (|> (infer <type> (..phase archive.empty (<constructor> sample))) (case> {try.#Success {////analysis.#Primitive {<tag> output}}} (same? sample output) diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/reference.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/reference.lux index a1683c75d..b8da226ad 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/reference.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/reference.lux @@ -64,7 +64,7 @@ check!)) (def: .public test - (<| (_.context (symbol.module (name_of /._))) + (<| (_.context (symbol.module (symbol /._))) (do r.monad [[expectedT _] _primitive.primitive def_module (r.unicode 5) diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/structure.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/structure.lux index 062ec96dc..d10dc39d4 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/structure.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/structure.lux @@ -133,7 +133,7 @@ (list.after choice primitives))) [+valueT +valueC] (maybe.trusted (list.item +choice +primitives)) +variantT (type.variant (list#each product.left +primitives))]] - (<| (_.context (%.symbol (name_of /.sum))) + (<| (_.context (%.symbol (symbol /.sum))) ($_ _.and (_.test "Can analyse." (check_sum variantT choice size @@ -182,7 +182,7 @@ (list [{.#Parameter 1} +valueC]) (list.after choice primitives))) +tupleT (type.tuple (list#each product.left +primitives))]] - (<| (_.context (%.symbol (name_of /.product))) + (<| (_.context (%.symbol (symbol /.product))) ($_ _.and (_.test "Can analyse." (|> (//type.with_type tupleT @@ -251,7 +251,7 @@ (type.univ_q 1)) choice_tag (maybe.trusted (list.item choice tags)) other_choice_tag (maybe.trusted (list.item other_choice tags))]] - (<| (_.context (%.symbol (name_of /.tagged_sum))) + (<| (_.context (%.symbol (symbol /.tagged_sum))) ($_ _.and (_.test "Can infer." (|> (/.tagged_sum _primitive.phase [module_name choice_tag] archive.empty choiceC) @@ -295,14 +295,14 @@ (list.after (++ choice) primitivesT)))) (type.univ_q 1) {.#Named [module_name type_name]})]] - (<| (_.context (%.symbol (name_of /.record))) + (<| (_.context (%.symbol (symbol /.record))) (_.test "Can infer." (|> (/.record archive.empty _primitive.phase recordC) (check_record module_name tags monoT monoT size)))))) (def: .public test Test - (<| (_.context (symbol.module (name_of /._))) + (<| (_.context (symbol.module (symbol /._))) ($_ _.and ..sum ..product diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux index 17ce8036e..41d8cb44b 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux @@ -194,7 +194,7 @@ (def: .public test Test - (<| (_.context (symbol.module (name_of /._))) + (<| (_.context (symbol.module (symbol /._))) ($_ _.and ..lux ..i64 diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/primitive.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/primitive.lux index 136635e38..ac1973b9f 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/primitive.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/primitive.lux @@ -73,12 +73,12 @@ (def: .public test Test - (<| (_.context (%.symbol (name_of ////synthesis.#Primitive))) + (<| (_.context (%.symbol (symbol ////synthesis.#Primitive))) (`` ($_ _.and (~~ (template [<analysis> <synthesis> <generator>] [(do r.monad [expected <generator>] - (_.test (%.symbol (name_of <synthesis>)) + (_.test (%.symbol (symbol <synthesis>)) (|> {////analysis.#Primitive {<analysis> expected}} (//.phase archive.empty) (phase.result [///bundle.empty ////synthesis.init]) diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/structure.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/structure.lux index f08463d54..29adddd53 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/structure.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/structure.lux @@ -76,7 +76,7 @@ (def: .public test Test - (<| (_.context (%.symbol (name_of ////synthesis.#Structure))) + (<| (_.context (%.symbol (symbol ////synthesis.#Structure))) ($_ _.and ..variant ..tuple diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/syntax.lux b/stdlib/source/test/lux/tool/compiler/language/lux/syntax.lux index 306ab931b..639132d1b 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/syntax.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/syntax.lux @@ -139,7 +139,7 @@ (def: .public test Test - (<| (_.context (symbol.module (name_of /._))) + (<| (_.context (symbol.module (symbol /._))) ($_ _.and ..code ..comments diff --git a/stdlib/source/test/lux/type.lux b/stdlib/source/test/lux/type.lux index 774e95513..4033af819 100644 --- a/stdlib/source/test/lux/type.lux +++ b/stdlib/source/test/lux/type.lux @@ -1,6 +1,6 @@ (.module: [library - [lux "*" + [lux {"-" symbol} ["_" test {"+" Test}] [abstract ["[0]" monad {"+" do}] diff --git a/stdlib/source/test/lux/type/check.lux b/stdlib/source/test/lux/type/check.lux index c4d14054e..cd4fc5426 100644 --- a/stdlib/source/test/lux/type/check.lux +++ b/stdlib/source/test/lux/type/check.lux @@ -1,6 +1,6 @@ (.module: [library - [lux {"-" type} + [lux {"-" type symbol} ["_" test {"+" Test}] ["[0]" type ("[1]#[0]" equivalence)] [abstract |