From a4b64bf1cdf47160b6b615d2c6493039abfd7a94 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Thu, 28 Jul 2022 17:39:01 -0400 Subject: Extracted unit-testing machinery into its own module. --- stdlib/source/test/aedifex/command/build.lux | 31 ++++++++++++++-------------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'stdlib/source/test/aedifex/command/build.lux') diff --git a/stdlib/source/test/aedifex/command/build.lux b/stdlib/source/test/aedifex/command/build.lux index 7ae2a8c72..81907a9ad 100644 --- a/stdlib/source/test/aedifex/command/build.lux +++ b/stdlib/source/test/aedifex/command/build.lux @@ -1,7 +1,6 @@ (.require [library [lux (.except) - ["_" test (.only Test)] [abstract [monad (.only do)]] [control @@ -22,7 +21,9 @@ [world ["[0]" file] ["[0]" shell (.only Shell)] - ["[0]" program]]]] + ["[0]" program]] + ["_" test (.only Test) + ["[0]" unit]]]] ["[0]" // ["@[0]" version] ["$/[1]" // @@ -162,7 +163,7 @@ (in (do async.monad [outcome (/.do! (@version.echo "") (program.async (program.mock environment.empty home working_directory)) fs shell ///dependency/resolution.empty (with_target empty_profile))] - (_.coverage' [/.no_specified_program] + (unit.coverage [/.no_specified_program] (case outcome {try.#Success _} false @@ -171,7 +172,7 @@ (exception.match? /.no_specified_program error))))) (in (do async.monad [outcome (/.do! (@version.echo "") (program.async (program.mock environment.empty home working_directory)) fs shell ///dependency/resolution.empty profile)] - (_.coverage' [/.Lux /.no_available_lux] + (unit.coverage [/.Lux /.no_available_lux] (case outcome {try.#Success _} false @@ -190,15 +191,15 @@ end (at console read_line [])] (in (and (text#= /.start start) (text#= /.success end))))] - (_.coverage' [/.do! - /.lux_group - /.jvm_lux_name - /.js_lux_name - /.python_lux_name - /.lua_lux_name - /.ruby_lux_name - /.start - /.success] + (unit.coverage [/.do! + /.lux_group + /.jvm_lux_name + /.js_lux_name + /.python_lux_name + /.lua_lux_name + /.ruby_lux_name + /.start + /.success] (try.else false verdict))))) (do ! [.let [console (@version.echo "")] @@ -212,7 +213,7 @@ end (at console read_line [])] (in (and (text#= /.start start) (text#= /.failure end))))] - (_.coverage' [/.failure] + (unit.coverage [/.failure] (try.else false verdict))))) (do ! [expected/0 (random.alphabetic 5) @@ -243,7 +244,7 @@ (text#= expected/1 actual/1) (text#= expected/2 actual/2) end!)))] - (_.coverage' [] + (unit.coverage [] (try.else false verdict)))))] [#0 /.log_output!] -- cgit v1.2.3