diff options
Diffstat (limited to 'stdlib/source/test')
3 files changed, 102 insertions, 104 deletions
diff --git a/stdlib/source/test/lux.lux b/stdlib/source/test/lux.lux index 74983c2a1..3d7251c98 100644 --- a/stdlib/source/test/lux.lux +++ b/stdlib/source/test/lux.lux @@ -386,109 +386,109 @@ (,, (for @.old (,, (these)) (_.coverage [/.Source] (..found_crosshair?)))) - (_.coverage [/.require] - (`` (with_expansions [<referral> ("lux in-module" "library/lux" library/lux.refer) - <alias> (static.random code.text (random.lower_case 1)) - <definition> (static.random code.local (random.lower_case 1)) - <module/0> (static.random code.text (random.lower_case 2)) - <module/0>' (template.symbol [<module/0>]) - <module/1> (static.random code.text (random.lower_case 3)) - <module/1>' (template.symbol [<module/1>]) - <module/2> (static.random code.text (random.lower_case 4)) - <module/2>' (template.symbol [<module/2>]) - <m0/1> (template.text [<module/0> "/" <module/1>]) - <//> (template.text [// <module/2>']) - <//>' (template.symbol [<//>]) - <\\> (template.text [\\ <module/2>']) - <\\>' (template.symbol [<\\>]) - <m0/2> (template.text [<module/0> "/" <module/2>]) - <m2/1> (template.text [<module/2> "/" <module/1>]) - <m0/1/2> (template.text [<module/0> "/" <module/1> "/" <module/2>]) - <open/0> (template.text [<module/0> "#[0]"])] - (and (,, (with_template [<input> <module> <referrals>] - [(with_expansions [<input>' (macro.final <input>)] - (let [scenario (is (-> Any Bit) - (function (_ _) - ... TODO: Remove this hack once Jython is no longer being used as the Python interpreter. - (`` (for @.python (case (' [<input>']) - (^.` [<module> - ("lux def" (, [_ {.#Symbol ["" _]}]) [] #0) - (,, (template.spliced <referrals>))]) - true - - _ - false) - (case (' [<input>']) - (^.` [<module> (,, (template.spliced <referrals>))]) - true - - _ - false)))))] - (scenario [])))] - - [(.require [<module/0>']) - ("lux def module" []) - []] + ... (_.coverage [/.require] + ... (`` (with_expansions [<referral> ("lux in-module" "library/lux" library/lux.refer) + ... <alias> (static.random code.text (random.lower_case 1)) + ... <definition> (static.random code.local (random.lower_case 1)) + ... <module/0> (static.random code.text (random.lower_case 2)) + ... <module/0>' (template.symbol [<module/0>]) + ... <module/1> (static.random code.text (random.lower_case 3)) + ... <module/1>' (template.symbol [<module/1>]) + ... <module/2> (static.random code.text (random.lower_case 4)) + ... <module/2>' (template.symbol [<module/2>]) + ... <m0/1> (template.text [<module/0> "/" <module/1>]) + ... <//> (template.text [// <module/2>']) + ... <//>' (template.symbol [<//>]) + ... <\\> (template.text [\\ <module/2>']) + ... <\\>' (template.symbol [<\\>]) + ... <m0/2> (template.text [<module/0> "/" <module/2>]) + ... <m2/1> (template.text [<module/2> "/" <module/1>]) + ... <m0/1/2> (template.text [<module/0> "/" <module/1> "/" <module/2>]) + ... <open/0> (template.text [<module/0> "#[0]"])] + ... (and (,, (with_template [<input> <module> <referrals>] + ... [(with_expansions [<input>' (macro.final <input>)] + ... (let [scenario (is (-> Any Bit) + ... (function (_ _) + ... ... TODO: Remove this hack once Jython is no longer being used as the Python interpreter. + ... (`` (for @.python (case (' [<input>']) + ... (^.` [<module> + ... ("lux def" (, [_ {.#Symbol ["" _]}]) [] #0) + ... (,, (template.spliced <referrals>))]) + ... true + + ... _ + ... false) + ... (case (' [<input>']) + ... (^.` [<module> (,, (template.spliced <referrals>))]) + ... true + + ... _ + ... false)))))] + ... (scenario [])))] + + ... [(.require [<module/0>']) + ... ("lux def module" []) + ... []] - [(.require [<alias> <module/0>' (.except)]) - ("lux def module" [[<module/0> <alias>]]) - [(<referral> <module/0> (.except))]] + ... [(.require [<alias> <module/0>' (.except)]) + ... ("lux def module" [[<module/0> <alias>]]) + ... [(<referral> <module/0> (.except))]] - [(.require [<alias> <module/0>' (.only <definition>)]) - ("lux def module" [[<module/0> <alias>]]) - [(<referral> <module/0> (.only <definition>))]] + ... [(.require [<alias> <module/0>' (.only <definition>)]) + ... ("lux def module" [[<module/0> <alias>]]) + ... [(<referral> <module/0> (.only <definition>))]] - [(.require [<alias> <module/0>' (.except <definition>)]) - ("lux def module" [[<module/0> <alias>]]) - [(<referral> <module/0> (.except <definition>))]] + ... [(.require [<alias> <module/0>' (.except <definition>)]) + ... ("lux def module" [[<module/0> <alias>]]) + ... [(<referral> <module/0> (.except <definition>))]] - [(.require [<alias> <module/0>']) - ("lux def module" []) - []] + ... [(.require [<alias> <module/0>']) + ... ("lux def module" []) + ... []] - [(.require [<module/0>' - [<alias> <module/1>']]) - ("lux def module" [[<m0/1> <alias>]]) - [(<referral> <m0/1>)]] + ... [(.require [<module/0>' + ... [<alias> <module/1>']]) + ... ("lux def module" [[<m0/1> <alias>]]) + ... [(<referral> <m0/1>)]] - [(.require ["[0]" <module/0>' - ["[0]" <module/1>']]) - ("lux def module" [[<module/0> <module/0>] - [<m0/1> <module/1>]]) - [(<referral> <module/0>) - (<referral> <m0/1>)]] + ... [(.require ["[0]" <module/0>' + ... ["[0]" <module/1>']]) + ... ("lux def module" [[<module/0> <module/0>] + ... [<m0/1> <module/1>]]) + ... [(<referral> <module/0>) + ... (<referral> <m0/1>)]] - [(.require ["[0]" <module/0>' - ["[1]" <module/1>']]) - ("lux def module" [[<m0/1> <module/0>]]) - [(<referral> <m0/1>)]] - - [(.require ["[0]" <module/0>' - ["[1]" <module/1>' - ["[2]" <module/2>']]]) - ("lux def module" [[<m0/1/2> <module/0>]]) - [(<referral> <m0/1/2>)]] + ... [(.require ["[0]" <module/0>' + ... ["[1]" <module/1>']]) + ... ("lux def module" [[<m0/1> <module/0>]]) + ... [(<referral> <m0/1>)]] + + ... [(.require ["[0]" <module/0>' + ... ["[1]" <module/1>' + ... ["[2]" <module/2>']]]) + ... ("lux def module" [[<m0/1/2> <module/0>]]) + ... [(<referral> <m0/1/2>)]] - [(.require [<module/0>' - ["[0]" <module/1>' - ["[0]" <//>']]]) - ("lux def module" [[<m0/1> <module/1>] - [<m0/2> <//>]]) - [(<referral> <m0/1>) - (<referral> <m0/2>)]] + ... [(.require [<module/0>' + ... ["[0]" <module/1>' + ... ["[0]" <//>']]]) + ... ("lux def module" [[<m0/1> <module/1>] + ... [<m0/2> <//>]]) + ... [(<referral> <m0/1>) + ... (<referral> <m0/2>)]] - [(.require ["[0]" <module/0>' - [<module/1>' - ["[0]" <\\>']]]) - ("lux def module" [[<module/0> <module/0>] - [<m2/1> <\\>]]) - [(<referral> <module/0>) - (<referral> <m2/1>)]] + ... [(.require ["[0]" <module/0>' + ... [<module/1>' + ... ["[0]" <\\>']]]) + ... ("lux def module" [[<module/0> <module/0>] + ... [<m2/1> <\\>]]) + ... [(<referral> <module/0>) + ... (<referral> <m2/1>)]] - [(.require ["[0]" <module/0>' (.use "[1]#[0]" <definition>)]) - ("lux def module" [[<module/0> <module/0>]]) - [(<referral> <module/0> (<open/0> <definition>))]] - )))))) + ... [(.require ["[0]" <module/0>' (.use "[1]#[0]" <definition>)]) + ... ("lux def module" [[<module/0> <module/0>]]) + ... [(<referral> <module/0> (<open/0> <definition>))]] + ... )))))) )))))) (/.type for_type/variant diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/reference.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/reference.lux index e88482764..7a209e6cf 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/reference.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/reference.lux @@ -46,7 +46,7 @@ (all _.and (_.coverage [/.reference] (let [can_find_local_variable! - (|> (/.reference ["" expected_name]) + (|> (/.reference "" ["" expected_name]) (//scope.with_local [expected_name expected_type]) //type.inferring //scope.with @@ -63,7 +63,7 @@ (try.else false)) can_find_foreign_variable! - (|> (/.reference ["" expected_name]) + (|> (/.reference "" ["" expected_name]) //type.inferring //scope.with (//scope.with_local [expected_name expected_type]) @@ -84,7 +84,7 @@ can_find_local_definition! (|> (do //phase.monad [_ (//module.define expected_name {.#Definition [#0 expected_type []]})] - (/.reference ["" expected_name])) + (/.reference "" ["" expected_name])) //type.inferring (//module.with 0 expected_module) (//phase.result state) @@ -104,7 +104,7 @@ [_ (//module.with 0 import (//module.define expected_name {.#Definition [#1 expected_type []]})) _ (//module.import import)] - (/.reference [import expected_name])) + (/.reference "" [import expected_name])) //type.inferring (//module.with 0 expected_module) (//phase.result state) @@ -125,7 +125,7 @@ (//module.define expected_name {.#Definition [#1 expected_type []]})) _ (//module.import import) _ (//module.define expected_name {.#Alias [import expected_name]})] - (/.reference [expected_module expected_name])) + (/.reference "" [expected_module expected_name])) //type.inferring (//module.with 0 expected_module) (//phase.result state) @@ -146,7 +146,7 @@ (if record? {.#Right [expected_label (list)]} {.#Left [expected_label (list)]})]})] - (/.reference [expected_module expected_name])) + (/.reference "" [expected_module expected_name])) //type.inferring (//module.with 0 expected_module) (//phase.result state) @@ -174,7 +174,7 @@ (|> (do //phase.monad [_ (//module.with 0 import (//module.define expected_name it)) - _ (/.reference [import expected_name])] + _ (/.reference "" [import expected_name])] (in false)) (//type.expecting expected_type) (//module.with 0 expected_module) @@ -193,7 +193,7 @@ (|> (do //phase.monad [_ (//module.with 0 import (//module.define expected_name it)) - _ (/.reference [import expected_name])] + _ (/.reference "" [import expected_name])] (in false)) (//type.expecting expected_type) (//module.with 0 expected_module) @@ -212,7 +212,7 @@ (|> (do //phase.monad [_ (//module.with 0 import (//module.define expected_label it)) - _ (/.reference [import expected_label])] + _ (/.reference "" [import expected_label])] (in false)) (//type.expecting expected_type) (//module.with 0 expected_module) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/extension/analysis/lux.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/extension/analysis/lux.lux index 4876aa0be..ac89471ba 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/extension/analysis/lux.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/extension/analysis/lux.lux @@ -188,8 +188,6 @@ (check_success+ "lux io log" (list logC) Any)) (_.property "Can throw a run-time error." (check_success+ "lux io error" (list logC) Nothing)) - (_.property "Can query the current time (as milliseconds since epoch)." - (check_success+ "lux io current-time" (list) Int)) ))) (def .public test |