aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/test.lux
diff options
context:
space:
mode:
authorEduardo Julian2022-07-10 18:00:23 -0400
committerEduardo Julian2022-07-10 18:00:23 -0400
commit1bbc4251230cee13d46df7b706859e834778aee0 (patch)
tree6e9aa1b7e079ffd01041c510ac201f16a57842e9 /stdlib/source/library/lux/test.lux
parent7db42ab1b9d3c764772ca63c74bf44bb2b8b8325 (diff)
Removed the need for ,! unquoting.
Diffstat (limited to '')
-rw-r--r--stdlib/source/library/lux/test.lux39
1 files changed, 17 insertions, 22 deletions
diff --git a/stdlib/source/library/lux/test.lux b/stdlib/source/library/lux/test.lux
index e6690c522..5c3b9451e 100644
--- a/stdlib/source/library/lux/test.lux
+++ b/stdlib/source/library/lux/test.lux
@@ -272,7 +272,7 @@
(%.Format Symbol)
(|>> %.symbol (format ..clean_up_marker)))
-(def (|coverage'| coverage condition)
+(def .public (with_coverage' coverage condition)
(-> (List Symbol) Bit Assertion)
(let [message (|> coverage
(list#each ..coverage_format)
@@ -283,12 +283,12 @@
[(revised #actual_coverage (set.union coverage) tally)
documentation])))))
-(def (|coverage| coverage condition)
+(def .public (with_coverage coverage condition)
(-> (List Symbol) Bit Test)
- (|> (..|coverage'| coverage condition)
+ (|> (..with_coverage' coverage condition)
random#in))
-(def (|for| coverage test)
+(def .public (for' coverage test)
(-> (List Symbol) Test Test)
(let [context (|> coverage
(list#each ..coverage_format)
@@ -304,7 +304,7 @@
(code.tuple (list (code.text (symbol.module symbol))
(code.text (symbol.short symbol)))))
-(def reference
+(def .public reference
(syntax (_ [name <code>.symbol])
(do meta.monad
[_ (meta.export name)]
@@ -338,29 +338,27 @@
(syntax (_ [coverage (<code>.tuple (<>.many <code>.any))
condition <code>.any])
(let [coverage (list#each (function (_ definition)
- (` ((,! ..reference) (, definition))))
+ (` (..reference (, definition))))
coverage)]
- (in (list (` ((,! <function>)
- (is (.List .Symbol)
- (.list (,* coverage)))
- (, condition))))))))]
+ (in (list (` (<function> (is (.List .Symbol)
+ (.list (,* coverage)))
+ (, condition))))))))]
- [coverage' ..|coverage'|]
- [coverage ..|coverage|]
+ [coverage' ..with_coverage']
+ [coverage ..with_coverage]
)
(def .public for
(syntax (_ [coverage (<code>.tuple (<>.many <code>.any))
test <code>.any])
(let [coverage (list#each (function (_ definition)
- (` ((,! ..reference) (, definition))))
+ (` (..reference (, definition))))
coverage)]
- (in (list (` ((,! ..|for|)
- (is (.List .Symbol)
- (.list (,* coverage)))
- (, test))))))))
+ (in (list (` (..for' (is (.List .Symbol)
+ (.list (,* coverage)))
+ (, test))))))))
-(def (covering' module coverage test)
+(def .public (covering' module coverage test)
(-> Text Text Test Test)
(let [coverage (..coverage_definitions module coverage)]
(|> (..context' module test)
@@ -383,10 +381,7 @@
aggregate))
{.#End})
..encoded_coverage)]]
- (in (list (` ((,! ..covering')
- (, (code.text module))
- (, (code.text coverage))
- (, test))))))))
+ (in (list (` (..covering' (, (code.text module)) (, (code.text coverage)) (, test))))))))
(exception .public (error_during_execution [error Text])
(exception.report