aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/test
diff options
context:
space:
mode:
authorEduardo Julian2022-09-03 14:31:47 -0400
committerEduardo Julian2022-09-03 14:31:47 -0400
commit1f4557bf0d904231b3b8d2b2bf73c35e9caead48 (patch)
tree30e49d4ed6cc75b3185ed9a771d2dbb004fca00f /stdlib/source/library/lux/test
parent950836e72a1b775ccab19a722566c431f56208f6 (diff)
Added support for context-oriented programming.
Diffstat (limited to 'stdlib/source/library/lux/test')
-rw-r--r--stdlib/source/library/lux/test/unit.lux26
1 files changed, 16 insertions, 10 deletions
diff --git a/stdlib/source/library/lux/test/unit.lux b/stdlib/source/library/lux/test/unit.lux
index 62e075537..14b09f014 100644
--- a/stdlib/source/library/lux/test/unit.lux
+++ b/stdlib/source/library/lux/test/unit.lux
@@ -1,6 +1,7 @@
(.require
[library
[lux (.except and for)
+ ["[0]" debug]
[abstract
[monad (.only do)]]
[control
@@ -92,7 +93,7 @@
(%.Format Symbol)
(|>> %.symbol (format ..clean_up_marker)))
-(def .public (with_coverage coverage condition)
+(def (with_coverage coverage condition)
(-> (List Symbol) Bit Test)
(let [message (|> coverage
(list#each ..coverage_format)
@@ -109,11 +110,12 @@
(let [coverage (list#each (function (_ definition)
(` (coverage.of (, definition))))
coverage)]
- (in (list (` (..with_coverage (is (.List .Symbol)
- (.list (,* coverage)))
- (, condition))))))))
+ (in (list (` ((debug.private ..with_coverage)
+ (is (.List .Symbol)
+ (.list (,* coverage)))
+ (, condition))))))))
-(def .public (for' coverage test)
+(def (for' coverage test)
(-> (List Symbol) Test Test)
(let [context (|> coverage
(list#each ..coverage_format)
@@ -130,11 +132,12 @@
(let [coverage (list#each (function (_ definition)
(` (coverage.of (, definition))))
coverage)]
- (in (list (` (..for' (is (.List .Symbol)
- (.list (,* coverage)))
- (, test))))))))
+ (in (list (` ((debug.private ..for')
+ (is (.List .Symbol)
+ (.list (,* coverage)))
+ (, test))))))))
-(def .public (covering' module coverage test)
+(def (covering' module coverage test)
(-> Text Text Test Test)
(let [coverage (coverage.decoded module coverage)]
(|> (..context' module test)
@@ -157,4 +160,7 @@
aggregate))
{.#End})
coverage.encoded)]]
- (in (list (` (..covering' (, (code.text module)) (, (code.text coverage)) (, test))))))))
+ (in (list (` ((debug.private ..covering')
+ (, (code.text module))
+ (, (code.text coverage))
+ (, test))))))))