aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/aedifex/artifact
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/test/aedifex/artifact')
-rw-r--r--stdlib/source/test/aedifex/artifact/snapshot.lux48
-rw-r--r--stdlib/source/test/aedifex/artifact/snapshot/stamp.lux4
2 files changed, 50 insertions, 2 deletions
diff --git a/stdlib/source/test/aedifex/artifact/snapshot.lux b/stdlib/source/test/aedifex/artifact/snapshot.lux
new file mode 100644
index 000000000..1bdb9ca2d
--- /dev/null
+++ b/stdlib/source/test/aedifex/artifact/snapshot.lux
@@ -0,0 +1,48 @@
+(.module:
+ [lux #*
+ ["_" test (#+ Test)]
+ [abstract
+ [monad (#+ do)]
+ {[0 #spec]
+ [/
+ ["$." equivalence]]}]
+ [control
+ ["." try ("#\." functor)]
+ [parser
+ ["<.>" xml]]]
+ [math
+ ["." random (#+ Random) ("#\." monad)]]]
+ ["$." / #_
+ ["#." build]
+ ["#." time]
+ ["#." stamp]]
+ {#program
+ ["." /]})
+
+(def: #export random
+ (Random /.Snapshot)
+ (random.or (random\wrap [])
+ $/stamp.random))
+
+(def: #export test
+ Test
+ (<| (_.covering /._)
+ (_.for [/.Snapshot]
+ ($_ _.and
+ (_.for [/.equivalence]
+ ($equivalence.spec /.equivalence ..random))
+
+ (do random.monad
+ [expected ..random]
+ (_.cover [/.format /.parser]
+ (|> expected
+ /.format
+ list
+ (<xml>.run /.parser)
+ (try\map (\ /.equivalence = expected))
+ (try.default false))))
+
+ $/build.test
+ $/time.test
+ $/stamp.test
+ ))))
diff --git a/stdlib/source/test/aedifex/artifact/snapshot/stamp.lux b/stdlib/source/test/aedifex/artifact/snapshot/stamp.lux
index aab722cad..a36e5af9d 100644
--- a/stdlib/source/test/aedifex/artifact/snapshot/stamp.lux
+++ b/stdlib/source/test/aedifex/artifact/snapshot/stamp.lux
@@ -41,8 +41,8 @@
(_.cover [/.format /.parser]
(|> expected
/.format
- (<xml>.run' /.parser)
- (try\map (\ instant.equivalence = expected))
+ (<xml>.run /.parser)
+ (try\map (\ /.equivalence = expected))
(try.default false)))
))
)))