From 39325bb36c6f6459c861ef12f9e99b9e66b52594 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 8 Jul 2022 17:18:30 -0400 Subject: Moved "lux/static" to "lux/meta/static". --- stdlib/source/test/lux.lux | 4 +- stdlib/source/test/lux/ffi.jvm.lux | 2 +- stdlib/source/test/lux/ffi/export.js.lux | 5 +- stdlib/source/test/lux/ffi/export.jvm.lux | 2 +- stdlib/source/test/lux/ffi/export.lua.lux | 5 +- stdlib/source/test/lux/ffi/export.py.lux | 5 +- stdlib/source/test/lux/ffi/export.rb.lux | 5 +- stdlib/source/test/lux/meta.lux | 2 + .../lux/meta/compiler/language/lux/analysis.lux | 2 +- stdlib/source/test/lux/meta/macro.lux | 2 +- stdlib/source/test/lux/meta/static.lux | 93 ++++++++++++++++++++++ stdlib/source/test/lux/meta/target/js.lux | 2 +- stdlib/source/test/lux/meta/target/lua.lux | 2 +- stdlib/source/test/lux/meta/target/python.lux | 2 +- stdlib/source/test/lux/meta/version.lux | 2 +- stdlib/source/test/lux/static.lux | 93 ---------------------- 16 files changed, 116 insertions(+), 112 deletions(-) create mode 100644 stdlib/source/test/lux/meta/static.lux delete mode 100644 stdlib/source/test/lux/static.lux (limited to 'stdlib/source/test') diff --git a/stdlib/source/test/lux.lux b/stdlib/source/test/lux.lux index 23d89ee6e..0f03b346d 100644 --- a/stdlib/source/test/lux.lux +++ b/stdlib/source/test/lux.lux @@ -3,7 +3,6 @@ ["/" lux (.except) [program (.only program:)] ["_" test (.only Test)] - ["[0]" static] [abstract [monad (.only do)]] [control @@ -32,6 +31,7 @@ ["[0]" i64]]] ["[0]" meta (.use "[1]#[0]" monad) ["@" target] + ["[0]" static] ["[0]" location (.use "[1]#[0]" equivalence)] ["[0]" code (.use "[1]#[0]" equivalence) ["<[1]>" \\parser]] @@ -51,7 +51,6 @@ ["[1][0]" meta] ["[1][0]" program] - ["[1][0]" static] ["[1][0]" test] ["[1][0]" world] @@ -1207,7 +1206,6 @@ /meta.test /program.test - /static.test /test.test /world.test diff --git a/stdlib/source/test/lux/ffi.jvm.lux b/stdlib/source/test/lux/ffi.jvm.lux index 9e900469a..91b97276f 100644 --- a/stdlib/source/test/lux/ffi.jvm.lux +++ b/stdlib/source/test/lux/ffi.jvm.lux @@ -3,7 +3,6 @@ [lux (.except) ["_" test (.only Test)] ["[0]" debug] - ["[0]" static] [abstract [monad (.only do)]] [control @@ -25,6 +24,7 @@ ["i" int (.use "[1]#[0]" equivalence)] ["f" frac (.use "[1]#[0]" equivalence)]]] ["[0]" meta (.only) + ["[0]" static] ["[0]" type (.use "[1]#[0]" equivalence)] ["[0]" code (.only) ["<[1]>" \\parser]] diff --git a/stdlib/source/test/lux/ffi/export.js.lux b/stdlib/source/test/lux/ffi/export.js.lux index 073463498..852eee961 100644 --- a/stdlib/source/test/lux/ffi/export.js.lux +++ b/stdlib/source/test/lux/ffi/export.js.lux @@ -2,10 +2,11 @@ [library [lux (.except) ["_" test (.only Test)] - ["[0]" static] [math [number - ["n" nat]]]]] + ["n" nat]]] + [meta + ["[0]" static]]]] [\\library ["[0]" / (.only) ["/[1]" //]]]) diff --git a/stdlib/source/test/lux/ffi/export.jvm.lux b/stdlib/source/test/lux/ffi/export.jvm.lux index 81615af21..6904a33df 100644 --- a/stdlib/source/test/lux/ffi/export.jvm.lux +++ b/stdlib/source/test/lux/ffi/export.jvm.lux @@ -3,7 +3,6 @@ [lux (.except) ["_" test (.only Test)] ["[0]" debug] - ["[0]" static] [abstract [monad (.only do)]] [data @@ -17,6 +16,7 @@ ["[0]" int (.use "[1]#[0]" equivalence)] ["[0]" frac (.use "[1]#[0]" equivalence)]]] ["[0]" meta (.only) + ["[0]" static] ["[0]" code] [macro ["[0]" template]]]]] diff --git a/stdlib/source/test/lux/ffi/export.lua.lux b/stdlib/source/test/lux/ffi/export.lua.lux index 2f3c6fdeb..f0c1d7efd 100644 --- a/stdlib/source/test/lux/ffi/export.lua.lux +++ b/stdlib/source/test/lux/ffi/export.lua.lux @@ -2,10 +2,11 @@ [library [lux (.except) ["_" test (.only Test)] - ["[0]" static] [math [number - ["n" nat]]]]] + ["n" nat]]] + [meta + ["[0]" static]]]] [\\library ["[0]" / (.only) ["/[1]" //]]]) diff --git a/stdlib/source/test/lux/ffi/export.py.lux b/stdlib/source/test/lux/ffi/export.py.lux index 073463498..852eee961 100644 --- a/stdlib/source/test/lux/ffi/export.py.lux +++ b/stdlib/source/test/lux/ffi/export.py.lux @@ -2,10 +2,11 @@ [library [lux (.except) ["_" test (.only Test)] - ["[0]" static] [math [number - ["n" nat]]]]] + ["n" nat]]] + [meta + ["[0]" static]]]] [\\library ["[0]" / (.only) ["/[1]" //]]]) diff --git a/stdlib/source/test/lux/ffi/export.rb.lux b/stdlib/source/test/lux/ffi/export.rb.lux index 64b57eee8..394d16376 100644 --- a/stdlib/source/test/lux/ffi/export.rb.lux +++ b/stdlib/source/test/lux/ffi/export.rb.lux @@ -2,10 +2,11 @@ [library [lux (.except) ["_" test (.only Test)] - ["[0]" static] [math [number - ["n" nat]]]]] + ["n" nat]]] + [meta + ["[0]" static]]]] [\\library ["[0]" / (.only) ["/[1]" //]]]) diff --git a/stdlib/source/test/lux/meta.lux b/stdlib/source/test/lux/meta.lux index 9b6f168e4..4a7159fe5 100644 --- a/stdlib/source/test/lux/meta.lux +++ b/stdlib/source/test/lux/meta.lux @@ -41,6 +41,7 @@ ["[1][0]" version] ["[1][0]" type] ["[1][0]" macro] + ["[1][0]" static] ["[1][0]" target (.only) (.,, (.for "{old}" (.,, (.these ["[1]/[0]" jvm])) "JVM" (.,, (.these ["[1]/[0]" jvm])) @@ -1057,6 +1058,7 @@ /version.test /type.test /macro.test + /static.test /target.test (,, (for @.jvm (,, (these /target/jvm.test)) @.old (,, (these /target/jvm.test)) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/analysis.lux b/stdlib/source/test/lux/meta/compiler/language/lux/analysis.lux index d153ae458..09c976004 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/analysis.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/analysis.lux @@ -2,7 +2,6 @@ [library [lux (.except) ["_" test (.only Test)] - ["[0]" static] [abstract [monad (.only do)] [\\specification @@ -27,6 +26,7 @@ ["f" frac] ["r" rev]]] [meta + ["[0]" static] ["[0]" symbol (.use "[1]#[0]" equivalence)] [macro ["[0]" template]] diff --git a/stdlib/source/test/lux/meta/macro.lux b/stdlib/source/test/lux/meta/macro.lux index e2705e961..80faef121 100644 --- a/stdlib/source/test/lux/meta/macro.lux +++ b/stdlib/source/test/lux/meta/macro.lux @@ -2,7 +2,6 @@ [library [lux (.except) ["_" test (.only Test)] - ["[0]" static] [abstract [monad (.only do)]] [control @@ -18,6 +17,7 @@ [number ["n" nat]]] ["[0]" meta (.only) + ["[0]" static] ["[0]" location] ["[0]" symbol] ["[0]" code (.use "[1]#[0]" equivalence) diff --git a/stdlib/source/test/lux/meta/static.lux b/stdlib/source/test/lux/meta/static.lux new file mode 100644 index 000000000..aa67ab7a2 --- /dev/null +++ b/stdlib/source/test/lux/meta/static.lux @@ -0,0 +1,93 @@ +(.require + [library + [lux (.except) + ["_" test (.only Test)] + [data + ["[0]" text (.use "[1]#[0]" equivalence) + ["%" \\format (.only format)]] + [collection + ["[0]" list (.use "[1]#[0]" mix)]]] + [math + ["[0]" random (.use "[1]#[0]" functor)] + [number + ["n" nat] + ["i" int] + ["r" rev] + ["f" frac]]] + ["[0]" meta (.only) + ["@" target] + ["[0]" code]]]] + [\\library + ["[0]" /]]) + +(def .public test + Test + (<| (_.covering /._) + (for @.old (_.property "PLACEHOLDER" true)) + (_.for [meta.eval]) + (`` (all _.and + (,, (with_template [ <=> <+> ] + [(_.coverage [ ] + (with_expansions [ () + () + ( (<+> ))] + (case (' ) + [_ { l+r}] + (<=> l+r (<+> )) + + _ + false)))] + + [/.nat /.random_nat n.= n.+ .#Nat] + [/.int /.random_int i.= i.+ .#Int] + [/.rev /.random_rev r.= r.+ .#Rev] + )) + (_.coverage [/.frac /.random_frac] + (with_expansions [ (/.random_frac) + (/.random_frac) + (/.frac (f.+ ))] + (case (' ) + [_ {.#Frac l+r}] + (or (f.= l+r (f.+ )) + (and (f.not_a_number? l+r) + (f.not_a_number? (f.+ )) + (or (f.not_a_number? ) + (f.not_a_number? )))) + + _ + false))) + (_.coverage [/.text /.random] + (with_expansions [ (/.random code.text (random.alpha_numeric 1)) + (/.random code.text (random.alpha_numeric 1)) + (/.text (format ))] + (case (' ) + [_ {.#Text l+r}] + (text#= l+r (format )) + + _ + false))) + (_.coverage [/.randoms] + (with_expansions [ (/.random code.nat + (random#each (|>> (n.% 10) ++) random.nat)) + l/* (/.randoms code.nat (random.list random.nat))] + (and (n.= (list.size (list l/*))) + (n.= (list#mix n.+ 0 (list l/*)) + (all n.+ l/*))))) + (_.coverage [/.literal] + (with_expansions [ (/.random code.text (random.alpha_numeric 1)) + (/.random code.text (random.alpha_numeric 1)) + (/.literal code.text (format ))] + (case (' ) + [_ {.#Text l+r}] + (text#= l+r (format )) + + _ + false))) + (_.coverage [/.literals] + (with_expansions [l/0 (/.random_nat) + l/1 (/.random_nat) + l/2 (/.random_nat) + l/* (/.literals code.nat (list l/0 l/1 l/2))] + (n.= (all n.+ l/0 l/1 l/2) + (all n.+ l/*)))) + )))) diff --git a/stdlib/source/test/lux/meta/target/js.lux b/stdlib/source/test/lux/meta/target/js.lux index 0288ca3b1..9604b26b3 100644 --- a/stdlib/source/test/lux/meta/target/js.lux +++ b/stdlib/source/test/lux/meta/target/js.lux @@ -2,7 +2,6 @@ [library [lux (.except) ["_" test (.only Test)] - ["[0]" static] [abstract [monad (.only do)] ["[0]" predicate]] @@ -25,6 +24,7 @@ ["f" frac] ["[0]" i64]]] [meta + ["[0]" static] [macro ["[0]" template]]]]] [\\library diff --git a/stdlib/source/test/lux/meta/target/lua.lux b/stdlib/source/test/lux/meta/target/lua.lux index 129748613..ad8ef35d6 100644 --- a/stdlib/source/test/lux/meta/target/lua.lux +++ b/stdlib/source/test/lux/meta/target/lua.lux @@ -3,7 +3,6 @@ [lux (.except) ["_" test (.only Test)] ["[0]" ffi] - ["[0]" static] [abstract [monad (.only do)] [\\specification @@ -28,6 +27,7 @@ ["f" frac] ["[0]" i64]]] [meta + ["[0]" static] [macro ["[0]" template]]]]] [\\library diff --git a/stdlib/source/test/lux/meta/target/python.lux b/stdlib/source/test/lux/meta/target/python.lux index ac1d84974..8c553dc2d 100644 --- a/stdlib/source/test/lux/meta/target/python.lux +++ b/stdlib/source/test/lux/meta/target/python.lux @@ -3,7 +3,6 @@ [lux (.except) ["_" test (.only Test)] ["[0]" ffi] - ["[0]" static] [abstract [monad (.only do)] ["[0]" predicate] @@ -28,6 +27,7 @@ ["f" frac] ["[0]" i64]]] [meta + ["[0]" static] ["[0]" code]]]] [\\library ["[0]" / (.use "[1]#[0]" equivalence)]]) diff --git a/stdlib/source/test/lux/meta/version.lux b/stdlib/source/test/lux/meta/version.lux index eebef8c0b..1df94e003 100644 --- a/stdlib/source/test/lux/meta/version.lux +++ b/stdlib/source/test/lux/meta/version.lux @@ -2,7 +2,6 @@ [library [lux (.except) ["_" test (.only Test)] - ["[0]" static] [abstract [monad (.only do)]] [control @@ -15,6 +14,7 @@ [number ["n" nat]]] ["[0]" meta (.only) + ["[0]" static] ["[0]" code (.only) ["<[1]>" \\parser]] ["[0]" macro (.only) diff --git a/stdlib/source/test/lux/static.lux b/stdlib/source/test/lux/static.lux deleted file mode 100644 index aa67ab7a2..000000000 --- a/stdlib/source/test/lux/static.lux +++ /dev/null @@ -1,93 +0,0 @@ -(.require - [library - [lux (.except) - ["_" test (.only Test)] - [data - ["[0]" text (.use "[1]#[0]" equivalence) - ["%" \\format (.only format)]] - [collection - ["[0]" list (.use "[1]#[0]" mix)]]] - [math - ["[0]" random (.use "[1]#[0]" functor)] - [number - ["n" nat] - ["i" int] - ["r" rev] - ["f" frac]]] - ["[0]" meta (.only) - ["@" target] - ["[0]" code]]]] - [\\library - ["[0]" /]]) - -(def .public test - Test - (<| (_.covering /._) - (for @.old (_.property "PLACEHOLDER" true)) - (_.for [meta.eval]) - (`` (all _.and - (,, (with_template [ <=> <+> ] - [(_.coverage [ ] - (with_expansions [ () - () - ( (<+> ))] - (case (' ) - [_ { l+r}] - (<=> l+r (<+> )) - - _ - false)))] - - [/.nat /.random_nat n.= n.+ .#Nat] - [/.int /.random_int i.= i.+ .#Int] - [/.rev /.random_rev r.= r.+ .#Rev] - )) - (_.coverage [/.frac /.random_frac] - (with_expansions [ (/.random_frac) - (/.random_frac) - (/.frac (f.+ ))] - (case (' ) - [_ {.#Frac l+r}] - (or (f.= l+r (f.+ )) - (and (f.not_a_number? l+r) - (f.not_a_number? (f.+ )) - (or (f.not_a_number? ) - (f.not_a_number? )))) - - _ - false))) - (_.coverage [/.text /.random] - (with_expansions [ (/.random code.text (random.alpha_numeric 1)) - (/.random code.text (random.alpha_numeric 1)) - (/.text (format ))] - (case (' ) - [_ {.#Text l+r}] - (text#= l+r (format )) - - _ - false))) - (_.coverage [/.randoms] - (with_expansions [ (/.random code.nat - (random#each (|>> (n.% 10) ++) random.nat)) - l/* (/.randoms code.nat (random.list random.nat))] - (and (n.= (list.size (list l/*))) - (n.= (list#mix n.+ 0 (list l/*)) - (all n.+ l/*))))) - (_.coverage [/.literal] - (with_expansions [ (/.random code.text (random.alpha_numeric 1)) - (/.random code.text (random.alpha_numeric 1)) - (/.literal code.text (format ))] - (case (' ) - [_ {.#Text l+r}] - (text#= l+r (format )) - - _ - false))) - (_.coverage [/.literals] - (with_expansions [l/0 (/.random_nat) - l/1 (/.random_nat) - l/2 (/.random_nat) - l/* (/.literals code.nat (list l/0 l/1 l/2))] - (n.= (all n.+ l/0 l/1 l/2) - (all n.+ l/*)))) - )))) -- cgit v1.2.3