From 1797521191746640e761cc1b4973d46b8c403dee Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Thu, 28 Jan 2021 20:14:11 -0400 Subject: Implemented arithmetic right-shift in terms of logic right-shift. --- .../test/aedifex/artifact/snapshot/version.lux | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 stdlib/source/test/aedifex/artifact/snapshot/version.lux (limited to 'stdlib/source/test/aedifex/artifact/snapshot/version.lux') diff --git a/stdlib/source/test/aedifex/artifact/snapshot/version.lux b/stdlib/source/test/aedifex/artifact/snapshot/version.lux new file mode 100644 index 000000000..e08691c3c --- /dev/null +++ b/stdlib/source/test/aedifex/artifact/snapshot/version.lux @@ -0,0 +1,46 @@ +(.module: + [lux #* + ["_" test (#+ Test)] + [abstract + [monad (#+ do)] + {[0 #spec] + [/ + ["$." equivalence]]}] + [control + ["." try ("#\." functor)] + [parser + ["<.>" xml]]] + [math + ["." random (#+ Random)]]] + {#program + ["." /]} + ["$." /// #_ + ["#." type] + ["#." time]]) + +(def: #export random + (Random /.Version) + ($_ random.and + $///type.random + (random.ascii/alpha 1) + $///time.random + )) + +(def: #export test + Test + (<| (_.covering /._) + (_.for [/.Version]) + ($_ _.and + (_.for [/.equivalence] + ($equivalence.spec /.equivalence ..random)) + + (do random.monad + [expected ..random] + (_.cover [/.format /.parser] + (|> expected + /.format + list + (.run /.parser) + (try\map (\ /.equivalence = expected)) + (try.default false)))) + ))) -- cgit v1.2.3