aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/debug.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/test/lux/debug.lux')
-rw-r--r--stdlib/source/test/lux/debug.lux63
1 files changed, 35 insertions, 28 deletions
diff --git a/stdlib/source/test/lux/debug.lux b/stdlib/source/test/lux/debug.lux
index 29e4493f8..5c0a950dc 100644
--- a/stdlib/source/test/lux/debug.lux
+++ b/stdlib/source/test/lux/debug.lux
@@ -228,31 +228,38 @@
(def: #export test
Test
(<| (_.covering /._)
- ($_ _.and
- ..inspection
- ..representation
- (_.cover [/.:hole /.type_hole]
- (let [error (: My_Text (..macro_error (/.:hole)))]
- (and (exception.match? /.type_hole error)
- (text.contains? (%.type My_Text) error))))
- (do random.monad
- [foo (random.ascii/upper 10)
- bar random.nat
- baz random.bit]
- (_.cover [/.here]
- (with_expansions [<no_parameters> (for {@.js (~~ (as_is))}
- (~~ (as_is (/.here))))]
- (`` (exec
- <no_parameters>
- (/.here foo
- {bar %.nat})
- true)))))
- (_.cover [/.unknown_local_binding]
- (exception.match? /.unknown_local_binding
- (..macro_error (/.here yolo))))
- (_.cover [/.private]
- (exec
- (: (/.private /.Inspector)
- /.inspect)
- true))
- )))
+ (do random.monad
+ [message (random.ascii/lower 5)]
+ ($_ _.and
+ ..inspection
+ ..representation
+ (_.cover [/.:hole /.type_hole]
+ (let [error (: My_Text (..macro_error (/.:hole)))]
+ (and (exception.match? /.type_hole error)
+ (text.contains? (%.type My_Text) error))))
+ (do random.monad
+ [foo (random.ascii/upper 10)
+ bar random.nat
+ baz random.bit]
+ (_.cover [/.here]
+ (with_expansions [<no_parameters> (for {@.js (~~ (as_is))}
+ (~~ (as_is (/.here))))]
+ (`` (exec
+ <no_parameters>
+ (/.here foo
+ {bar %.nat})
+ true)))))
+ (_.cover [/.unknown_local_binding]
+ (exception.match? /.unknown_local_binding
+ (..macro_error (/.here yolo))))
+ (_.cover [/.private]
+ (exec
+ (: (/.private /.Inspector)
+ /.inspect)
+ true))
+ (_.cover [/.log!]
+ (exec
+ (/.log! (format (%.name (name_of /.log!))
+ " works: " (%.text message)))
+ true))
+ ))))