aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/aedifex
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/test/aedifex')
-rw-r--r--stdlib/source/test/aedifex/artifact.lux9
-rw-r--r--stdlib/source/test/aedifex/artifact/time/date.lux36
-rw-r--r--stdlib/source/test/aedifex/artifact/type.lux4
-rw-r--r--stdlib/source/test/aedifex/command/auto.lux2
-rw-r--r--stdlib/source/test/aedifex/command/build.lux10
5 files changed, 46 insertions, 15 deletions
diff --git a/stdlib/source/test/aedifex/artifact.lux b/stdlib/source/test/aedifex/artifact.lux
index ce0af7e7f..9152a3d22 100644
--- a/stdlib/source/test/aedifex/artifact.lux
+++ b/stdlib/source/test/aedifex/artifact.lux
@@ -31,10 +31,11 @@
(def: #export random
(Random /.Artifact)
- ($_ random.and
- (random.ascii/alpha 1)
- (random.ascii/alpha 1)
- (random.ascii/alpha 1)))
+ (let [size 4]
+ ($_ random.and
+ (random.ascii/lower size)
+ (random.ascii/lower size)
+ (random.ascii/lower size))))
(def: #export test
Test
diff --git a/stdlib/source/test/aedifex/artifact/time/date.lux b/stdlib/source/test/aedifex/artifact/time/date.lux
index e68645b8a..35ae3a157 100644
--- a/stdlib/source/test/aedifex/artifact/time/date.lux
+++ b/stdlib/source/test/aedifex/artifact/time/date.lux
@@ -3,9 +3,12 @@
[lux #*
["_" test (#+ Test)]
[abstract
- [monad (#+ do)]]
+ [monad (#+ do)]
+ [\\specification
+ ["$." equivalence]]]
[control
["." try ("#\." functor)]
+ ["." exception]
[parser
["<.>" text]]]
[math
@@ -14,7 +17,7 @@
["n" nat]
["i" int]]]
[time
- ["." date]
+ ["." date ("#\." equivalence)]
["." year]]]]
[\\program
["." /]])
@@ -35,13 +38,32 @@
Test
(<| (_.covering /._)
(_.for [/.Date])
- ($_ _.and
- (do random.monad
- [expected ..random]
+ (do random.monad
+ [expected ..random
+ candidate random.date]
+ ($_ _.and
+ (_.for [/.equivalence]
+ ($equivalence.spec /.equivalence ..random))
+
(_.cover [/.format /.parser]
(|> expected
/.format
(<text>.run /.parser)
(try\map (\ /.equivalence = expected))
- (try.default false))))
- )))
+ (try.default false)))
+ (_.cover [/.value /.date]
+ (|> expected
+ /.value
+ /.date
+ (try\map (\ /.equivalence = expected))
+ (try.default false)))
+ (_.cover [/.year_is_out_of_range]
+ (case (/.date candidate)
+ (#try.Success date)
+ (is? candidate (/.value date))
+
+ (#try.Failure error)
+ (exception.match? /.year_is_out_of_range error)))
+ (_.cover [/.epoch]
+ (date\= date.epoch (/.value /.epoch)))
+ ))))
diff --git a/stdlib/source/test/aedifex/artifact/type.lux b/stdlib/source/test/aedifex/artifact/type.lux
index 8418febee..93a13e26a 100644
--- a/stdlib/source/test/aedifex/artifact/type.lux
+++ b/stdlib/source/test/aedifex/artifact/type.lux
@@ -33,9 +33,9 @@
(<| (_.covering /._)
(_.for [/.Type]
($_ _.and
- (_.cover [/.lux_library /.jvm_library
+ (_.cover [/.lux_library /.jvm_library /.js_library
/.pom /.md5 /.sha-1]
- (let [options (list /.lux_library /.jvm_library
+ (let [options (list /.lux_library /.jvm_library /.js_library
/.pom /.md5 /.sha-1)
uniques (set.from_list text.hash options)]
(n.= (list.size options)
diff --git a/stdlib/source/test/aedifex/command/auto.lux b/stdlib/source/test/aedifex/command/auto.lux
index 8539ce672..a7ea2795b 100644
--- a/stdlib/source/test/aedifex/command/auto.lux
+++ b/stdlib/source/test/aedifex/command/auto.lux
@@ -93,6 +93,8 @@
dummy_path (\ ! map (|>> (format source /)) (random.ascii/alpha 5))
[compiler resolution] $build.resolution]
($_ _.and
+ (_.cover [/.delay]
+ (n.> 0 /.delay))
(wrap (do promise.monad
[verdict (do ///action.monad
[_ (\ fs make_directory source)
diff --git a/stdlib/source/test/aedifex/command/build.lux b/stdlib/source/test/aedifex/command/build.lux
index a702d4c3d..1292c232f 100644
--- a/stdlib/source/test/aedifex/command/build.lux
+++ b/stdlib/source/test/aedifex/command/build.lux
@@ -158,8 +158,14 @@
(wrap (and (text\= /.start start)
(text\= /.success end))))]
(_.cover' [/.do!
- /.lux_group /.jvm_compiler_name /.js_compiler_name
- /.start /.success]
+ /.lux_group
+ /.jvm_compiler_name
+ /.js_compiler_name
+ /.python_compiler_name
+ /.lua_compiler_name
+ /.ruby_compiler_name
+ /.start
+ /.success]
(try.default false verdict)))))
(do !
[#let [console (@version.echo "")]