diff options
author | Eduardo Julian | 2022-10-02 19:25:33 -0400 |
---|---|---|
committer | Eduardo Julian | 2022-10-02 19:25:33 -0400 |
commit | ed779c7bbbf3c625461fd1c09c1a3c39eaabd9d6 (patch) | |
tree | 0875aef89507986149c24f771feb7852c7170a89 /stdlib/source/test | |
parent | ba150e8a206ffba1c5313c26fa88c6dcba6a08aa (diff) |
New format for extensions [part 4]
Diffstat (limited to 'stdlib/source/test')
-rw-r--r-- | stdlib/source/test/lux/control/function/trampoline.lux | 21 | ||||
-rw-r--r-- | stdlib/source/test/lux/meta/extension.lux | 2 | ||||
-rw-r--r-- | stdlib/source/test/lux/world.lux | 8 | ||||
-rw-r--r-- | stdlib/source/test/lux/world/net.lux | 34 |
4 files changed, 48 insertions, 17 deletions
diff --git a/stdlib/source/test/lux/control/function/trampoline.lux b/stdlib/source/test/lux/control/function/trampoline.lux index 18d29110c..bba85385a 100644 --- a/stdlib/source/test/lux/control/function/trampoline.lux +++ b/stdlib/source/test/lux/control/function/trampoline.lux @@ -38,13 +38,16 @@ (_.for [/.monad] ($monad.spec ..injection ..comparison /.monad)) - (_.coverage [/.return /.result] - (|> (/.return expected) - /.result - (same? expected))) - (_.coverage [/.jump] - (with_expansions [<expected> (n.+ left right)] - (|> (/.jump (/.return <expected>)) - /.result - (n.= <expected>)))) + (_.for [/.result] + (all _.and + (_.coverage [/.#Return /.return] + (|> (/.return expected) + /.result + (same? expected))) + (_.coverage [/.#Jump /.jump] + (with_expansions [<expected> (n.+ left right)] + (|> (/.jump (/.return <expected>)) + /.result + (n.= <expected>)))) + )) ))) diff --git a/stdlib/source/test/lux/meta/extension.lux b/stdlib/source/test/lux/meta/extension.lux index bef9aabb3..3675c0d64 100644 --- a/stdlib/source/test/lux/meta/extension.lux +++ b/stdlib/source/test/lux/meta/extension.lux @@ -23,8 +23,6 @@ ["[0]" meta (.only) ["[0]" code ["<[1]>" \\parser]] - [macro - ["[0]" template]] ["@" target (.only) ["[0]" js] ["[0]" python] diff --git a/stdlib/source/test/lux/world.lux b/stdlib/source/test/lux/world.lux index 0694d559c..2229ef10e 100644 --- a/stdlib/source/test/lux/world.lux +++ b/stdlib/source/test/lux/world.lux @@ -13,10 +13,7 @@ ["[1][0]" output ["[1]/[0]" video ["[1]/[0]" resolution]]] - ["[1][0]" net - ["[1]/[0]" http - ["[1]/[0]" client] - ["[1]/[0]" status]]] + ["[1][0]" net] ["[1][0]" time] ["[1][0]" locale]]) @@ -29,8 +26,7 @@ /environment.test /input/keyboard.test /output/video/resolution.test - /net/http/client.test - /net/http/status.test + /net.test /time.test /locale.test )) diff --git a/stdlib/source/test/lux/world/net.lux b/stdlib/source/test/lux/world/net.lux new file mode 100644 index 000000000..a6d74f5c6 --- /dev/null +++ b/stdlib/source/test/lux/world/net.lux @@ -0,0 +1,34 @@ +(.require + [library + [lux (.except) + [abstract + [monad (.only do)]] + [math + ["[0]" random (.only Random)]] + [test + ["_" property (.only Test)]]]] + [\\library + ["[0]" /]] + ["[0]" / + ["[1][0]" http + ["[1]/[0]" client] + ["[1]/[0]" status]]]) + +(def .public test + Test + (<| (_.covering /._) + (do [! random.monad] + []) + (all _.and + (_.coverage [/.Host] + true) + (_.coverage [/.Port] + true) + (_.coverage [/.URL] + true) + (_.coverage [/.Address] + true) + + /http/client.test + /http/status.test + ))) |