diff options
Diffstat (limited to 'stdlib/source/test/lux/meta/macro.lux')
-rw-r--r-- | stdlib/source/test/lux/meta/macro.lux | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/stdlib/source/test/lux/meta/macro.lux b/stdlib/source/test/lux/meta/macro.lux index 80faef121..59dbf995f 100644 --- a/stdlib/source/test/lux/meta/macro.lux +++ b/stdlib/source/test/lux/meta/macro.lux @@ -21,13 +21,13 @@ ["[0]" location] ["[0]" symbol] ["[0]" code (.use "[1]#[0]" equivalence) - ["<[1]>" \\parser]] - [macro - ["^" pattern]]]]] + ["<[1]>" \\parser]]]]] [\\library ["[0]" / (.only) + ["^" pattern] [syntax (.only syntax)] - ["[0]" template]]] + ["[0]" template] + ["[0]" expansion]]] ["[0]" / ["[1][0]" local] ["[1][0]" syntax] @@ -85,9 +85,9 @@ [.#module_hash 0 .#module_aliases (list) .#definitions (is (List [Text .Global]) - (list (!global /.log_single_expansion!) - (!global /.log_expansion!) - (!global /.log_full_expansion!))) + (list (!global expansion.log_single!) + (!global expansion.log_complete!) + (!global expansion.log_total!))) .#imports (list) .#module_state {.#Active}]] [current_module @@ -131,33 +131,33 @@ full_expansion (` (n.* (n.* (, pow/1) (, pow/1)) (n.* (, pow/1) (, pow/1))))]] (`` (all _.and - (,, (with_template [<expander> <logger> <expansion>] - [(_.coverage [<expander>] - (|> (<expander> (` (..pow/4 (, pow/1)))) - (meta.result lux) - (try#each (at (list.equivalence code.equivalence) = - (list <expansion>))) - (try.else false))) - - (_.coverage [<logger>] - (and (|> (/.single_expansion (` (<logger> "omit" (..pow/4 (, pow/1))))) - (meta.result lux) - (try#each (at (list.equivalence code.equivalence) = (list))) - (try.else false)) - (|> (/.single_expansion (` (<logger> (..pow/4 (, pow/1))))) - (meta.result lux) - (try#each (at (list.equivalence code.equivalence) = (list <expansion>))) - (try.else false))))] - - [/.single_expansion /.log_single_expansion! single_expansion] - [/.expansion /.log_expansion! expansion] - [/.full_expansion /.log_full_expansion! full_expansion] - )) - (_.coverage [/.one_expansion] - (bit#= (not (n.= 1 repetitions)) - (|> (/.one_expansion (` (..repeated (, (code.nat repetitions)) (, pow/1)))) - (meta.result lux) - (!expect {try.#Failure _})))) + ... (,, (with_template [<expander> <logger> <expansion>] + ... [(_.coverage [<expander>] + ... (|> (<expander> (` (..pow/4 (, pow/1)))) + ... (meta.result lux) + ... (try#each (at (list.equivalence code.equivalence) = + ... (list <expansion>))) + ... (try.else false))) + + ... (_.coverage [<logger>] + ... (and (|> (expansion.single (` (<logger> "omit" (..pow/4 (, pow/1))))) + ... (meta.result lux) + ... (try#each (at (list.equivalence code.equivalence) = (list))) + ... (try.else false)) + ... (|> (expansion.single (` (<logger> (..pow/4 (, pow/1))))) + ... (meta.result lux) + ... (try#each (at (list.equivalence code.equivalence) = (list <expansion>))) + ... (try.else false))))] + + ... [expansion.single expansion.log_single! single_expansion] + ... [expansion.complete expansion.log_complete! expansion] + ... [expansion.total expansion.log_total! full_expansion] + ... )) + ... (_.coverage [expansion.one] + ... (bit#= (not (n.= 1 repetitions)) + ... (|> (expansion.one (` (..repeated (, (code.nat repetitions)) (, pow/1)))) + ... (meta.result lux) + ... (!expect {try.#Failure _})))) (_.coverage [/.final] (with_expansions [<expected> (static.random_nat) <cycles> (static.random code.nat @@ -219,10 +219,10 @@ (and (text.contains? symbol_prefix actual_symbol) (text.contains? (%.nat seed) actual_symbol)))))) (_.coverage [/.wrong_syntax_error] - (|> (/.single_expansion (` (/.log_single_expansion!))) + (|> (expansion.single (` (expansion.log_single!))) (meta.result lux) (!expect (^.multi {try.#Failure error} - (text.contains? (/.wrong_syntax_error (symbol /.log_single_expansion!)) + (text.contains? (/.wrong_syntax_error (symbol expansion.log_single!)) error))))) (_.coverage [/.with_symbols] (with_expansions [<expected> (fresh_symbol)] |