From 04c7f49a732380a2b9f72b1b937171b341c24323 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sat, 9 Apr 2022 03:03:46 -0400 Subject: Better names for testing macros (plus better indentation). --- stdlib/source/library/lux/test.lux | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'stdlib/source/library') diff --git a/stdlib/source/library/lux/test.lux b/stdlib/source/library/lux/test.lux index 9a42e0735..ac03309eb 100644 --- a/stdlib/source/library/lux/test.lux +++ b/stdlib/source/library/lux/test.lux @@ -133,7 +133,7 @@ [..success_tally (format ..success_prefix message)] [..failure_tally (format ..failure_prefix message)]))) -(def: .public (test message condition) +(def: .public (property message condition) (-> Text Bit Test) (random#in (..assertion (%.text message) condition))) @@ -272,7 +272,7 @@ (%.Format Symbol) (|>> %.symbol (format ..clean_up_marker))) -(def: (|cover'| coverage condition) +(def: (|coverage'| coverage condition) (-> (List Symbol) Bit Assertion) (let [message (|> coverage (list#each ..coverage_format) @@ -283,9 +283,9 @@ [(revised #actual_coverage (set.union coverage) tally) documentation]))))) -(def: (|cover| coverage condition) +(def: (|coverage| coverage condition) (-> (List Symbol) Bit Test) - (|> (..|cover'| coverage condition) + (|> (..|coverage'| coverage condition) random#in)) (def: (|for| coverage test) @@ -321,7 +321,7 @@ _ (format aggregate ..coverage_separator short))) "")) -(def: (coverage module encoding) +(def: (coverage_definitions module encoding) (-> Text Text (Set Symbol)) (loop (again [remaining encoding output (set.of_list symbol.hash (list))]) @@ -343,8 +343,8 @@ (.list (~+ coverage))) (~ condition)))))))] - [cover' ..|cover'|] - [cover ..|cover|] + [coverage' ..|coverage'|] + [coverage ..|coverage|] ) (syntax: .public (for [coverage (.tuple (<>.many .any)) @@ -359,7 +359,7 @@ (def: (covering' module coverage test) (-> Text Text Test Test) - (let [coverage (..coverage module coverage)] + (let [coverage (..coverage_definitions module coverage)] (|> (..context' module test) (random#each (async#each (function (_ [tally documentation]) [(revised #expected_coverage (set.union coverage) tally) -- cgit v1.2.3