diff options
Diffstat (limited to 'stdlib/source/test')
6 files changed, 26 insertions, 14 deletions
diff --git a/stdlib/source/test/lux/control/parser.lux b/stdlib/source/test/lux/control/parser.lux index 49e40ab5f..5a76942ed 100644 --- a/stdlib/source/test/lux/control/parser.lux +++ b/stdlib/source/test/lux/control/parser.lux @@ -250,8 +250,7 @@ (_.cover [/.else] (and (|> (/.result (/.else wrong (# /.monad in expected)) (list)) (match actual (n.= expected actual))) - (|> (/.result (/.else expected (: (Parser (List Code) Nat) - (/.failure "yolo"))) + (|> (/.result (/.else expected (/.failure "yolo")) (list)) (match actual (n.= expected actual))) )) diff --git a/stdlib/source/test/lux/meta.lux b/stdlib/source/test/lux/meta.lux index 871cc155c..3aa4fc763 100644 --- a/stdlib/source/test/lux/meta.lux +++ b/stdlib/source/test/lux/meta.lux @@ -52,10 +52,13 @@ expected_seed random.nat expected random.nat dummy (random.only (|>> (n.= expected) not) random.nat) - .let [expected_lux [.#info [.#target target + configuration_feature (random.ascii/upper 1) + configuration_value (random.ascii/upper 1) + .let [configuration (list [configuration_feature configuration_value]) + expected_lux [.#info [.#target target .#version version .#mode {.#Build} - .#configuration (list)] + .#configuration configuration] .#source [location.dummy 0 source_code] .#location location.dummy .#current_module {.#Some expected_current_module} @@ -87,6 +90,16 @@ (/.result expected_lux) (!expect (^multi {try.#Success actual_lux} (same? expected_lux actual_lux))))) + (_.cover [/.version] + (|> /.version + (/.result expected_lux) + (!expect (^multi {try.#Success it} + (same? version it))))) + (_.cover [/.configuration] + (|> /.configuration + (/.result expected_lux) + (!expect (^multi {try.#Success it} + (same? configuration it))))) ))) (def: error_handling diff --git a/stdlib/source/test/lux/tool/compiler/meta/cache.lux b/stdlib/source/test/lux/tool/compiler/meta/cache.lux index c826d030a..66d5cfc9c 100644 --- a/stdlib/source/test/lux/tool/compiler/meta/cache.lux +++ b/stdlib/source/test/lux/tool/compiler/meta/cache.lux @@ -29,10 +29,10 @@ fs (file.mock /)] context $//context.random] ($_ _.and - (in (do async.monad + (in (do [! async.monad] [pre/0 (# fs directory? (/.path fs context)) pre/1 (/.enabled? fs context) - outcome (/.enable! fs context) + outcome (/.enable! ! fs context) post/0 (# fs directory? (/.path fs context)) post/1 (/.enabled? fs context)] (_.cover' [/.path /.enabled? /.enable!] diff --git a/stdlib/source/test/lux/tool/compiler/meta/cache/archive.lux b/stdlib/source/test/lux/tool/compiler/meta/cache/archive.lux index 03a0d376b..34f3693f6 100644 --- a/stdlib/source/test/lux/tool/compiler/meta/cache/archive.lux +++ b/stdlib/source/test/lux/tool/compiler/meta/cache/archive.lux @@ -66,9 +66,9 @@ (in [archive (archive.export ///.version archive)])) try.trusted)]] ($_ _.and - (in (do async.monad + (in (do [! async.monad] [pre/0 (# fs file? (/.descriptor fs context)) - enabled? (//.enable! fs context) + enabled? (//.enable! ! fs context) cached? (/.cache! fs context archive) actual (# fs read (/.descriptor fs context)) post/0 (# fs file? (/.descriptor fs context))] diff --git a/stdlib/source/test/lux/tool/compiler/meta/cache/artifact.lux b/stdlib/source/test/lux/tool/compiler/meta/cache/artifact.lux index d3ba700a2..34aa31b78 100644 --- a/stdlib/source/test/lux/tool/compiler/meta/cache/artifact.lux +++ b/stdlib/source/test/lux/tool/compiler/meta/cache/artifact.lux @@ -35,9 +35,9 @@ @artifact random.nat expected ($binary.random 1)] ($_ _.and - (in (do async.monad + (in (do [! async.monad] [pre (# fs file? (/.path fs context @module @artifact)) - _ (//module.enable! fs context @module) + _ (//module.enable! ! fs context @module) write! (/.cache! fs context @module @artifact expected) post (# fs file? (/.path fs context @module @artifact)) read! (/.cache fs context @module @artifact)] diff --git a/stdlib/source/test/lux/tool/compiler/meta/cache/module.lux b/stdlib/source/test/lux/tool/compiler/meta/cache/module.lux index 98415b367..b73f420aa 100644 --- a/stdlib/source/test/lux/tool/compiler/meta/cache/module.lux +++ b/stdlib/source/test/lux/tool/compiler/meta/cache/module.lux @@ -54,10 +54,10 @@ context $///context.random @module random.nat] ($_ _.and - (in (do async.monad + (in (do [! async.monad] [pre/0 (# fs directory? (/.path fs context @module)) pre/1 (/.enabled? fs context @module) - outcome (/.enable! fs context @module) + outcome (/.enable! ! fs context @module) post/0 (# fs directory? (/.path fs context @module)) post/1 (/.enabled? fs context @module)] (_.cover' [/.path /.enabled? /.enable!] @@ -70,10 +70,10 @@ post/0 post/1)))) - (in (do async.monad + (in (do [! async.monad] [pre/0 (# fs directory? (/.path fs context @module)) pre/1 (/.enabled? fs context @module) - outcome (/.enable! (..bad fs) context @module) + outcome (/.enable! ! (..bad fs) context @module) post/0 (# fs directory? (/.path fs context @module)) post/1 (/.enabled? fs context @module)] (_.cover' [/.cannot_enable] |