aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/aedifex/artifact/snapshot/stamp.lux
diff options
context:
space:
mode:
authorEduardo Julian2021-01-13 17:42:20 -0400
committerEduardo Julian2021-01-13 17:42:20 -0400
commitae56acf791c2ed9bd5865f85fffa00b025d310fe (patch)
treed02c6f67240b27c578b7e8ca17285824eae56497 /stdlib/source/test/aedifex/artifact/snapshot/stamp.lux
parent71de092a045dc70ab1c9eead477cf1512b144a87 (diff)
Removed the (ultimately redundant) on_stop function for actors.
Diffstat (limited to 'stdlib/source/test/aedifex/artifact/snapshot/stamp.lux')
-rw-r--r--stdlib/source/test/aedifex/artifact/snapshot/stamp.lux48
1 files changed, 48 insertions, 0 deletions
diff --git a/stdlib/source/test/aedifex/artifact/snapshot/stamp.lux b/stdlib/source/test/aedifex/artifact/snapshot/stamp.lux
new file mode 100644
index 000000000..aab722cad
--- /dev/null
+++ b/stdlib/source/test/aedifex/artifact/snapshot/stamp.lux
@@ -0,0 +1,48 @@
+(.module:
+ [lux #*
+ ["_" test (#+ Test)]
+ [abstract
+ [monad (#+ do)]
+ {[0 #spec]
+ [/
+ ["$." equivalence]]}]
+ [control
+ ["." try ("#\." functor)]
+ [parser
+ ["<.>" xml]]]
+ [math
+ ["." random (#+ Random)]]
+ [time
+ ["." instant]]]
+ {#program
+ ["." /]}
+ ["$." // #_
+ ["#." time]
+ ["#." build]])
+
+(def: #export random
+ (Random /.Stamp)
+ ($_ random.and
+ $//time.random
+ $//build.random
+ ))
+
+(def: #export test
+ Test
+ (<| (_.covering /._)
+ (_.for [/.Stamp])
+ ($_ _.and
+ (_.for [/.equivalence]
+ ($equivalence.spec /.equivalence ..random))
+
+ (do random.monad
+ [expected ..random]
+ ($_ _.and
+ (_.cover [/.format /.parser]
+ (|> expected
+ /.format
+ (<xml>.run' /.parser)
+ (try\map (\ instant.equivalence = expected))
+ (try.default false)))
+ ))
+ )))