aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/test/aedifex/artifact/extension.lux4
-rw-r--r--stdlib/source/test/aedifex/artifact/type.lux6
-rw-r--r--stdlib/source/test/aedifex/command/deploy.lux18
-rw-r--r--stdlib/source/test/aedifex/dependency/deployment.lux4
-rw-r--r--stdlib/source/test/aedifex/dependency/resolution.lux52
-rw-r--r--stdlib/source/test/aedifex/dependency/status.lux4
-rw-r--r--stdlib/source/test/aedifex/hash.lux10
-rw-r--r--stdlib/source/test/aedifex/package.lux4
-rw-r--r--stdlib/source/test/lux.lux6
-rw-r--r--stdlib/source/test/lux/meta/macro/context.lux192
-rw-r--r--stdlib/source/test/lux/meta/macro/local.lux6
-rw-r--r--stdlib/source/test/lux/world/time/instant.lux15
12 files changed, 197 insertions, 124 deletions
diff --git a/stdlib/source/test/aedifex/artifact/extension.lux b/stdlib/source/test/aedifex/artifact/extension.lux
index 17267bdab..b2a2b9586 100644
--- a/stdlib/source/test/aedifex/artifact/extension.lux
+++ b/stdlib/source/test/aedifex/artifact/extension.lux
@@ -25,8 +25,8 @@
(_.for [/.Extension]
(all _.and
(_.coverage [/.lux_library /.jvm_library /.pom
- /.sha-1 /.md5]
- (let [options (list /.lux_library /.jvm_library /.pom /.sha-1 /.md5)
+ /.sha1 /.md5]
+ (let [options (list /.lux_library /.jvm_library /.pom /.sha1 /.md5)
uniques (set.of_list text.hash options)]
(n.= (list.size options)
(set.size uniques))))
diff --git a/stdlib/source/test/aedifex/artifact/type.lux b/stdlib/source/test/aedifex/artifact/type.lux
index 60ec8e199..220212f70 100644
--- a/stdlib/source/test/aedifex/artifact/type.lux
+++ b/stdlib/source/test/aedifex/artifact/type.lux
@@ -26,7 +26,7 @@
(all random.either
(random#in /.pom)
(random#in /.md5)
- (random#in /.sha-1))
+ (random#in /.sha1))
))
(def .public test
@@ -35,9 +35,9 @@
(_.for [/.Type]
(all _.and
(_.coverage [/.lux_library /.jvm_library /.js_library
- /.pom /.md5 /.sha-1]
+ /.pom /.md5 /.sha1]
(let [options (list /.lux_library /.jvm_library /.js_library
- /.pom /.md5 /.sha-1)
+ /.pom /.md5 /.sha1)
uniques (set.of_list text.hash options)]
(n.= (list.size options)
(set.size uniques))))
diff --git a/stdlib/source/test/aedifex/command/deploy.lux b/stdlib/source/test/aedifex/command/deploy.lux
index 6e8d38d31..88da67576 100644
--- a/stdlib/source/test/aedifex/command/deploy.lux
+++ b/stdlib/source/test/aedifex/command/deploy.lux
@@ -128,11 +128,11 @@
actual_pom (at remote download (///repository/remote.uri (the ///artifact.#version artifact) artifact ///artifact/extension.pom))
actual_library (at remote download (///repository/remote.uri (the ///artifact.#version artifact) artifact ///artifact/extension.lux_library))
- actual_sha-1 (at remote download (///repository/remote.uri (the ///artifact.#version artifact) artifact (format ///artifact/extension.lux_library ///artifact/extension.sha-1)))
- actual_sha-1 (at async.monad in
- (do try.monad
- [actual_sha-1 (at utf8.codec decoded actual_sha-1)]
- (at ///hash.sha-1_codec decoded actual_sha-1)))
+ actual_sha1 (at remote download (///repository/remote.uri (the ///artifact.#version artifact) artifact (format ///artifact/extension.lux_library ///artifact/extension.sha1)))
+ actual_sha1 (at async.monad in
+ (do try.monad
+ [actual_sha1 (at utf8.codec decoded actual_sha1)]
+ (at ///hash.sha1_codec decoded actual_sha1)))
actual_md5 (at remote download (///repository/remote.uri (the ///artifact.#version artifact) artifact (format ///artifact/extension.lux_library ///artifact/extension.md5)))
actual_md5 (at async.monad in
(do try.monad
@@ -151,10 +151,10 @@
(binary#= (|> expected_pom (at xml.codec encoded) (at utf8.codec encoded))
actual_pom)
- deployed_sha-1!
+ deployed_sha1!
(at ///hash.equivalence =
- (///hash.sha-1 expected_library)
- actual_sha-1)
+ (///hash.sha1 expected_library)
+ actual_sha1)
deployed_md5!
(at ///hash.equivalence =
@@ -163,7 +163,7 @@
(in (and succeeded!
deployed_library!
deployed_pom!
- deployed_sha-1!
+ deployed_sha1!
deployed_md5!)))]
(unit.coverage [/.do! /.success]
(try.else false verdict)))))))
diff --git a/stdlib/source/test/aedifex/dependency/deployment.lux b/stdlib/source/test/aedifex/dependency/deployment.lux
index f94ef4421..79b3210ff 100644
--- a/stdlib/source/test/aedifex/dependency/deployment.lux
+++ b/stdlib/source/test/aedifex/dependency/deployment.lux
@@ -110,7 +110,7 @@
(dictionary.value library_url)
(maybe#each (binary#= expected_library))
(maybe.else false))
- (dictionary.key? cache (format library_url artifact/extension.sha-1))
+ (dictionary.key? cache (format library_url artifact/extension.sha1))
(dictionary.key? cache (format library_url artifact/extension.md5)))
correct_pom_upload!
@@ -118,7 +118,7 @@
(dictionary.value pom_url)
(maybe#each (binary#= expected_pom))
(maybe.else false))
- (dictionary.key? cache (format pom_url artifact/extension.sha-1))
+ (dictionary.key? cache (format pom_url artifact/extension.sha1))
(dictionary.key? cache (format pom_url artifact/extension.md5)))
artifact_metadata_upload!
diff --git a/stdlib/source/test/aedifex/dependency/resolution.lux b/stdlib/source/test/aedifex/dependency/resolution.lux
index ad9d9033f..c6c14fec4 100644
--- a/stdlib/source/test/aedifex/dependency/resolution.lux
+++ b/stdlib/source/test/aedifex/dependency/resolution.lux
@@ -61,26 +61,26 @@
package
/.empty))))
-(def lux_sha-1
+(def lux_sha1
Text
- (format ///artifact/extension.lux_library ///artifact/extension.sha-1))
+ (format ///artifact/extension.lux_library ///artifact/extension.sha1))
(def lux_md5
Text
(format ///artifact/extension.lux_library ///artifact/extension.md5))
-(def pom_sha-1
+(def pom_sha1
Text
- (format ///artifact/extension.pom ///artifact/extension.sha-1))
+ (format ///artifact/extension.pom ///artifact/extension.sha1))
(def pom_md5
Text
(format ///artifact/extension.pom ///artifact/extension.md5))
-(def sha-1
+(def sha1
(-> Binary Binary)
- (|>> ///hash.sha-1
- (at ///hash.sha-1_codec encoded)
+ (|>> ///hash.sha1
+ (at ///hash.sha1_codec encoded)
(at utf8.codec encoded)))
(def md5
@@ -120,8 +120,8 @@
(cond (text.ends_with? ///artifact/extension.lux_library uri)
{try.#Success [state library]}
- (text.ends_with? ..lux_sha-1 uri)
- {try.#Success [state (..sha-1 library)]}
+ (text.ends_with? ..lux_sha1 uri)
+ {try.#Success [state (..sha1 library)]}
(text.ends_with? ..lux_md5 uri)
{try.#Success [state (..md5 library)]}
@@ -129,8 +129,8 @@
(text.ends_with? ///artifact/extension.pom uri)
{try.#Success [state pom]}
- (text.ends_with? ..pom_sha-1 uri)
- {try.#Success [state (..sha-1 pom)]}
+ (text.ends_with? ..pom_sha1 uri)
+ {try.#Success [state (..sha1 pom)]}
(text.ends_with? ..pom_md5 uri)
{try.#Success [state (..md5 pom)]}
@@ -141,11 +141,11 @@
(def (on_upload uri binary state)
{try.#Failure "NOPE"}))))
-(def (bad_sha-1 expected_artifact expected_package dummy_package)
+(def (bad_sha1 expected_artifact expected_package dummy_package)
(-> Artifact Package Package (Mock Any))
(implementation
(def the_description
- "[~SHA-1]")
+ "[~SHA1]")
(def (on_download uri state)
(if (text.contains? (///artifact.uri (the ///artifact.#version expected_artifact) expected_artifact) uri)
(cond (text.ends_with? ///artifact/extension.lux_library uri)
@@ -153,11 +153,11 @@
(the ///package.#library)
product.left)]}
- (text.ends_with? ..lux_sha-1 uri)
+ (text.ends_with? ..lux_sha1 uri)
{try.#Success [state (|> expected_package
(the ///package.#library)
product.left
- ..sha-1)]}
+ ..sha1)]}
(text.ends_with? ..lux_md5 uri)
{try.#Success [state (|> expected_package
@@ -172,13 +172,13 @@
(at xml.codec encoded)
(at utf8.codec encoded))]}
- (text.ends_with? ..pom_sha-1 uri)
+ (text.ends_with? ..pom_sha1 uri)
{try.#Success [state (|> dummy_package
(the ///package.#pom)
product.left
(at xml.codec encoded)
(at utf8.codec encoded)
- ..sha-1)]}
+ ..sha1)]}
(text.ends_with? ..pom_md5 uri)
{try.#Success [state (|> expected_package
@@ -206,11 +206,11 @@
(the ///package.#library)
product.left)]}
- (text.ends_with? ..lux_sha-1 uri)
+ (text.ends_with? ..lux_sha1 uri)
{try.#Success [state (|> expected_package
(the ///package.#library)
product.left
- ..sha-1)]}
+ ..sha1)]}
(text.ends_with? ..lux_md5 uri)
{try.#Success [state (|> dummy_package
@@ -225,13 +225,13 @@
(at xml.codec encoded)
(at utf8.codec encoded))]}
- (text.ends_with? ..pom_sha-1 uri)
+ (text.ends_with? ..pom_sha1 uri)
{try.#Success [state (|> expected_package
(the ///package.#pom)
product.left
(at xml.codec encoded)
(at utf8.codec encoded)
- ..sha-1)]}
+ ..sha1)]}
(text.ends_with? ..pom_md5 uri)
{try.#Success [state (|> dummy_package
@@ -258,7 +258,7 @@
not)
$///package.random)
.let [good (..single expected_artifact expected_package)
- bad_sha-1 (..bad_sha-1 expected_artifact expected_package dummy_package)
+ bad_sha1 (..bad_sha1 expected_artifact expected_package dummy_package)
bad_md5 (..bad_md5 expected_artifact expected_package dummy_package)]]
(`` (.all _.and
(in (do async.monad
@@ -287,7 +287,7 @@
{try.#Success _}
false))))]
- [/.sha-1_does_not_match bad_sha-1]
+ [/.sha1_does_not_match bad_sha1]
[/.md5_does_not_match bad_md5]
))
))))
@@ -303,13 +303,13 @@
not)
$///package.random)
.let [good (..single expected_artifact expected_package)
- bad_sha-1 (..bad_sha-1 expected_artifact expected_package dummy_package)
+ bad_sha1 (..bad_sha1 expected_artifact expected_package dummy_package)
bad_md5 (..bad_md5 expected_artifact expected_package dummy_package)]]
(.all _.and
(in (do async.monad
[.let [console ($///version.echo "")]
actual_package (/.any console
- (list (///repository.mock bad_sha-1 [])
+ (list (///repository.mock bad_sha1 [])
(///repository.mock bad_md5 [])
(///repository.mock good []))
[///dependency.#artifact expected_artifact
@@ -326,7 +326,7 @@
(in (do async.monad
[.let [console ($///version.echo "")]
actual_package (/.any console
- (list (///repository.mock bad_sha-1 [])
+ (list (///repository.mock bad_sha1 [])
(///repository.mock bad_md5 []))
[///dependency.#artifact expected_artifact
///dependency.#type ///artifact/type.lux_library])]
diff --git a/stdlib/source/test/aedifex/dependency/status.lux b/stdlib/source/test/aedifex/dependency/status.lux
index 85edbdbf8..074394b99 100644
--- a/stdlib/source/test/aedifex/dependency/status.lux
+++ b/stdlib/source/test/aedifex/dependency/status.lux
@@ -23,9 +23,9 @@
(Random /.Status)
(all random.or
(random#in [])
- (random.or ($///hash.random ///hash.sha-1)
+ (random.or ($///hash.random ///hash.sha1)
($///hash.random ///hash.md5))
- (random.and ($///hash.random ///hash.sha-1)
+ (random.and ($///hash.random ///hash.sha1)
($///hash.random ///hash.md5))
))
diff --git a/stdlib/source/test/aedifex/hash.lux b/stdlib/source/test/aedifex/hash.lux
index 7271458b9..ea6d6435e 100644
--- a/stdlib/source/test/aedifex/hash.lux
+++ b/stdlib/source/test/aedifex/hash.lux
@@ -37,11 +37,11 @@
(def .public test
Test
(<| (_.covering /._)
- (_.for [/.Hash /.SHA-1 /.MD5])
+ (_.for [/.Hash /.SHA1 /.MD5])
(`` (all _.and
(_.for [/.equivalence]
(all _.and
- ($equivalence.spec /.equivalence (..random /.sha-1))
+ ($equivalence.spec /.equivalence (..random /.sha1))
($equivalence.spec /.equivalence (..random /.md5))
))
(_.for [/.data]
@@ -65,14 +65,14 @@
{try.#Failure error}
(exception.match? <exception> error)))))]
- [/.sha-1 /.as_sha-1 /.not_a_sha-1]
+ [/.sha1 /.as_sha1 /.not_a_sha1]
[/.md5 /.as_md5 /.not_a_md5]
))))
(,, (with_template [<codec> <hash>]
[(_.for [<codec>]
($codec.spec /.equivalence <codec> (..random <hash>)))]
- [/.sha-1_codec /.sha-1]
+ [/.sha1_codec /.sha1]
[/.md5_codec /.md5]
))
(_.for [/.not_a_hash]
@@ -90,7 +90,7 @@
{try.#Failure error}
(exception.match? /.not_a_hash error))))]
- [/.sha-1_codec /.sha-1]
+ [/.sha1_codec /.sha1]
[/.md5_codec /.md5]
))))
))))
diff --git a/stdlib/source/test/aedifex/package.lux b/stdlib/source/test/aedifex/package.lux
index dc03b1671..fd8a2c372 100644
--- a/stdlib/source/test/aedifex/package.lux
+++ b/stdlib/source/test/aedifex/package.lux
@@ -79,7 +79,7 @@
(and (when (the /.#origin local)
{//origin.#Local ""} true
_ false)
- (let [expected_sha1 (//hash.sha-1 expected_library)
+ (let [expected_sha1 (//hash.sha1 expected_library)
expected_md5 (//hash.md5 expected_library)]
(and (same? expected_library actual_library)
(when library_status
@@ -89,7 +89,7 @@
_
false)))
- (let [expected_sha1 (//hash.sha-1 binary_pom)
+ (let [expected_sha1 (//hash.sha1 binary_pom)
expected_md5 (//hash.md5 binary_pom)]
(and (same? expected_pom actual_pom)
(|> (do try.monad
diff --git a/stdlib/source/test/lux.lux b/stdlib/source/test/lux.lux
index f970099ec..e4dbc056b 100644
--- a/stdlib/source/test/lux.lux
+++ b/stdlib/source/test/lux.lux
@@ -361,9 +361,9 @@
(_.coverage [/.unquote]
(exec
(is /.UnQuote
- (/.unquote ("lux macro" (/.unquote_macro /.,))))
+ (/.unquote (macro.macro (/.unquote_macro /.,))))
(is /.UnQuote
- (/.unquote ("lux macro" (/.unquote_macro /.,'))))
+ (/.unquote (macro.macro (/.unquote_macro /.,'))))
true))
(_.coverage [/., /.but]
(with_expansions [<nat> (code.nat example_nat)]
@@ -426,7 +426,7 @@
(same? macro)))
(_.coverage [/.Macro]
(|> macro
- "lux macro"
+ macro.macro
(is /.Macro)
(is Any)
(same? (is Any macro))))
diff --git a/stdlib/source/test/lux/meta/macro/context.lux b/stdlib/source/test/lux/meta/macro/context.lux
index cbcdf60e0..095fed836 100644
--- a/stdlib/source/test/lux/meta/macro/context.lux
+++ b/stdlib/source/test/lux/meta/macro/context.lux
@@ -18,7 +18,8 @@
["<[1]>" \\parser]]
[macro
[syntax (.only syntax)]
- ["[0]" expansion]]]
+ ["[0]" expansion]
+ ["[0]" template]]]
[test
["_" property (.only Test)]]]]
[\\library
@@ -34,70 +35,129 @@
{try.#Success _}
{try.#Failure "OOPS!"}))))
-(/.def [stack expression declaration] Nat)
+(template.with_locals [<real_stack>' <real_expression> <real_declaration>
+ <fake_stack>' <fake_expression> <fake_declaration>]
+ (these (/.def [<real_stack>' <real_expression> <real_declaration>] Nat)
-(with_expansions [<top> (static.random_nat)]
- (<| static.expansion
- (declaration <top>)
- (` (def (,' declaration!) true))))
-
-(def .public test
- Test
- (<| (_.covering /._)
- (all _.and
- (_.coverage [/.def]
- (and declaration!
- (with_expansions [<top> (static.random_nat)]
- (<| static.expansion
- (do meta.monad
- [it (expression <top> (` true))]
- (in (list it)))))))
- (_.coverage [/.peek /.peek'
- /.push /.push']
- (with_expansions [<expected> (static.random_nat)]
- (n.= <expected>
- (<| static.expansion
- (do meta.monad
- [_ (/.push <expected> ..stack)
- actual (/.peek ..stack)
- _ (/.pop ..stack)]
- (in (list (code.nat actual))))))))
- (_.coverage [/.no_active_context]
- (<| (text.contains? (the exception.#label /.no_active_context))
- macro_error
- static.expansion
- (do meta.monad
- [top (/.peek ..stack)]
- (in (list (code.nat top))))))
- (_.coverage [/.pop /.pop' /.pop'']
- (with_expansions [<dummy> (static.random_nat)
- <expected> (static.nat (++ <dummy>))]
- (n.= <expected>
+ (with_expansions [<real_stack> (template.symbol [.._] [<real_stack>'])
+ <fake_stack> (template.symbol [.._] [<fake_stack>'])]
+ (these (with_expansions [<top> (static.random_nat)]
(<| static.expansion
- (do meta.monad
- [_ (/.push <dummy> ..stack)
- _ (/.pop ..stack)
- _ (/.push <expected> ..stack)
- actual (/.peek ..stack)
- _ (/.pop ..stack)]
- (in (list (code.nat actual))))))))
- (_.coverage [/.search /.search']
- (with_expansions [<expected> (static.random_nat)]
- (n.= <expected>
- (<| static.expansion
- (do meta.monad
- [_ (/.push <expected> ..stack)
- actual (/.search (n.= <expected>) ..stack)
- _ (/.pop ..stack)]
- (in (list (code.nat actual))))))))
- (_.coverage [/.no_example]
- (with_expansions [<expected> (static.random_nat)]
- (<| (text.contains? (the exception.#label /.no_example))
- macro_error
- static.expansion
- (do meta.monad
- [_ (/.push <expected> ..stack)
- actual (/.search (|>> (n.= <expected>) not) ..stack)
- _ (/.pop ..stack)]
- (in (list (code.nat actual)))))))
- )))
+ (<real_declaration> <top>)
+ (` (def (,' declaration!) true))))
+
+ (def .public test
+ Test
+ (<| (_.covering /._)
+ (_.for [/.Stack])
+ (all _.and
+ (_.coverage [/.def]
+ (and declaration!
+ (with_expansions [<top> (static.random_nat)]
+ (<| static.expansion
+ (do meta.monad
+ [it (<real_expression> <top> (` true))]
+ (in (list it)))))))
+ (_.coverage [/.peek /.peek'
+ /.push /.push']
+ (with_expansions [<expected> (static.random_nat)]
+ (n.= <expected>
+ (<| static.expansion
+ (do meta.monad
+ [_ (/.push <expected> <real_stack>)
+ actual (/.peek <real_stack>)
+ _ (/.pop <real_stack>)]
+ (in (list (code.nat actual))))))))
+ (_.coverage [/.no_active_context]
+ (<| (text.contains? (the exception.#label /.no_active_context))
+ macro_error
+ static.expansion
+ (do meta.monad
+ [top (/.peek <real_stack>)]
+ (in (list (code.nat top))))))
+ (_.coverage [/.pop /.pop' /.pop'']
+ (with_expansions [<dummy> (static.random_nat)
+ <expected> (static.nat (++ <dummy>))]
+ (n.= <expected>
+ (<| static.expansion
+ (do meta.monad
+ [_ (/.push <dummy> <real_stack>)
+ _ (/.pop <real_stack>)
+ _ (/.push <expected> <real_stack>)
+ actual (/.peek <real_stack>)
+ _ (/.pop <real_stack>)]
+ (in (list (code.nat actual))))))))
+ (_.coverage [/.search /.search']
+ (with_expansions [<expected> (static.random_nat)]
+ (n.= <expected>
+ (<| static.expansion
+ (do meta.monad
+ [_ (/.push <expected> <real_stack>)
+ actual (/.search (n.= <expected>) <real_stack>)
+ _ (/.pop <real_stack>)]
+ (in (list (code.nat actual))))))))
+ (_.coverage [/.no_example]
+ (with_expansions [<expected> (static.random_nat)]
+ (and (<| (text.contains? (the exception.#label /.no_example))
+ macro_error
+ static.expansion
+ (do meta.monad
+ [_ (/.push <expected> <real_stack>)
+ actual (/.search (|>> (n.= <expected>) not) <real_stack>)
+ _ (/.pop <real_stack>)]
+ (in (list (code.nat actual)))))
+ (<| (text.contains? (the exception.#label /.no_example))
+ macro_error
+ static.expansion
+ (do meta.monad
+ [_ (/.revised {.#None} ++ <real_stack>)]
+ (in (list)))))))
+ (_.coverage [/.not_a_definition]
+ (and (<| (text.contains? (the exception.#label /.not_a_definition))
+ macro_error
+ static.expansion
+ (do meta.monad
+ [actual (/.peek' [<real_stack> (symbol <fake_stack>)])]
+ (in (list))))
+ (with_expansions [<expected> (static.random_nat)]
+ (<| (text.contains? (the exception.#label /.not_a_definition))
+ macro_error
+ static.expansion
+ (do meta.monad
+ [_ (/.push' <expected> [<real_stack> (symbol .#Item)])]
+ (in (list)))))))
+ (_.coverage [/.not_a_global]
+ (with_expansions [<expected> (static.random_nat)]
+ (<| (text.contains? (the exception.#label /.not_a_global))
+ macro_error
+ static.expansion
+ (do meta.monad
+ [_ (/.push' <expected> [<real_stack> (symbol <fake_stack>)])]
+ (in (list))))))
+ (_.coverage [/.not_a_module]
+ (with_expansions [<expected> (static.random_nat)]
+ (<| (text.contains? (the exception.#label /.not_a_module))
+ macro_error
+ static.expansion
+ (do meta.monad
+ [_ (/.push' <expected> [<real_stack> [(%.nat <expected>) (%.nat <expected>)]])]
+ (in (list))))))
+ (_.coverage [/.revised /.revised']
+ (with_expansions [<expected> (static.random_nat)]
+ (and (n.= (++ <expected>)
+ (<| static.expansion
+ (do meta.monad
+ [_ (/.push <expected> <real_stack>)
+ _ (/.revised {.#None} ++ <real_stack>)
+ actual (/.peek <real_stack>)
+ _ (/.pop <real_stack>)]
+ (in (list (code.nat actual))))))
+ (n.= (++ <expected>)
+ (<| static.expansion
+ (do meta.monad
+ [_ (/.push <expected> <real_stack>)
+ _ (/.revised {.#Some (n.= <expected>)} ++ <real_stack>)
+ actual (/.peek <real_stack>)
+ _ (/.pop <real_stack>)]
+ (in (list (code.nat actual)))))))))
+ )))))))
diff --git a/stdlib/source/test/lux/meta/macro/local.lux b/stdlib/source/test/lux/meta/macro/local.lux
index 244c8ddd7..8605bc0ff 100644
--- a/stdlib/source/test/lux/meta/macro/local.lux
+++ b/stdlib/source/test/lux/meta/macro/local.lux
@@ -46,9 +46,9 @@
(def (constant output)
(-> Code Macro)
- ("lux macro"
- (function (_ inputs lux)
- {try.#Success [lux (list output)]})))
+ (macro.macro
+ (function (_ inputs lux)
+ {try.#Success [lux (list output)]})))
(def with
(syntax (_ [name (<code>.tuple (<>.and <code>.text <code>.text))
diff --git a/stdlib/source/test/lux/world/time/instant.lux b/stdlib/source/test/lux/world/time/instant.lux
index 32b4c71f3..d81a5ad27 100644
--- a/stdlib/source/test/lux/world/time/instant.lux
+++ b/stdlib/source/test/lux/world/time/instant.lux
@@ -5,14 +5,17 @@
[monad (.only do)]
[\\specification
["$[0]" equivalence]
+ ["$[0]" hash]
["$[0]" order]
["$[0]" enum]
["$[0]" codec]]]
[control
["[0]" function]
- ["[0]" try]
+ ["[0]" try (.use "[1]#[0]" functor)]
["[0]" io]]
[data
+ ["[0]" text
+ ["?[1]" \\parser]]
[collection
["[0]" list (.use "[1]#[0]" mix)]]]
[math
@@ -32,6 +35,8 @@
(all _.and
(_.for [/.equivalence]
($equivalence.spec /.equivalence random.instant))
+ (_.for [/.hash]
+ ($hash.spec /.hash random.instant))
(_.for [/.order]
($order.spec /.order random.instant))
(_.for [/.enum]
@@ -104,4 +109,12 @@
{try.#Failure _}
false))
+ (do random.monad
+ [expected random.instant]
+ (_.coverage [/.format /.parser]
+ (|> expected
+ /.format
+ (?text.result /.parser)
+ (try#each (at /.equivalence = expected))
+ (try.else false))))
)))