From ae56acf791c2ed9bd5865f85fffa00b025d310fe Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 13 Jan 2021 17:42:20 -0400 Subject: Removed the (ultimately redundant) on_stop function for actors. --- stdlib/source/test/aedifex/artifact/build.lux | 34 --------------- .../test/aedifex/artifact/snapshot/build.lux | 39 ++++++++++++++++++ .../test/aedifex/artifact/snapshot/stamp.lux | 48 ++++++++++++++++++++++ .../source/test/aedifex/artifact/snapshot/time.lux | 42 +++++++++++++++++++ stdlib/source/test/aedifex/artifact/time_stamp.lux | 33 --------------- 5 files changed, 129 insertions(+), 67 deletions(-) delete mode 100644 stdlib/source/test/aedifex/artifact/build.lux create mode 100644 stdlib/source/test/aedifex/artifact/snapshot/build.lux create mode 100644 stdlib/source/test/aedifex/artifact/snapshot/stamp.lux create mode 100644 stdlib/source/test/aedifex/artifact/snapshot/time.lux delete mode 100644 stdlib/source/test/aedifex/artifact/time_stamp.lux (limited to 'stdlib/source/test/aedifex') diff --git a/stdlib/source/test/aedifex/artifact/build.lux b/stdlib/source/test/aedifex/artifact/build.lux deleted file mode 100644 index d0920b44c..000000000 --- a/stdlib/source/test/aedifex/artifact/build.lux +++ /dev/null @@ -1,34 +0,0 @@ -(.module: - [lux #* - ["_" test (#+ Test)] - [abstract - [monad (#+ do)] - {[0 #spec] - [/ - ["$." equivalence]]}] - [control - ["." try ("#\." functor)] - [parser - ["<.>" xml]]] - [math - ["." random]]] - {#program - ["." /]}) - -(def: #export test - Test - (<| (_.covering /._) - (_.for [/.Build] - ($_ _.and - (_.for [/.equivalence] - ($equivalence.spec /.equivalence random.nat)) - - (do random.monad - [expected random.nat] - (_.cover [/.format /.parser] - (|> expected - /.format - (.run /.parser) - (try\map (\ /.equivalence = expected)) - (try.default false)))) - )))) diff --git a/stdlib/source/test/aedifex/artifact/snapshot/build.lux b/stdlib/source/test/aedifex/artifact/snapshot/build.lux new file mode 100644 index 000000000..e3fdcab62 --- /dev/null +++ b/stdlib/source/test/aedifex/artifact/snapshot/build.lux @@ -0,0 +1,39 @@ +(.module: + [lux #* + ["_" test (#+ Test)] + [abstract + [monad (#+ do)] + {[0 #spec] + [/ + ["$." equivalence]]}] + [control + ["." try ("#\." functor)] + [parser + ["<.>" xml]]] + [math + ["." random (#+ Random)]]] + {#program + ["." /]}) + +(def: #export random + (Random /.Build) + random.nat) + +(def: #export test + Test + (<| (_.covering /._) + (_.for [/.Build] + ($_ _.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)))) + )))) 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 + (.run' /.parser) + (try\map (\ instant.equivalence = expected)) + (try.default false))) + )) + ))) diff --git a/stdlib/source/test/aedifex/artifact/snapshot/time.lux b/stdlib/source/test/aedifex/artifact/snapshot/time.lux new file mode 100644 index 000000000..567c70ce4 --- /dev/null +++ b/stdlib/source/test/aedifex/artifact/snapshot/time.lux @@ -0,0 +1,42 @@ +(.module: + [lux #* + ["_" test (#+ Test)] + [abstract + [monad (#+ do)] + {[0 #spec] + [/ + ["$." equivalence]]}] + [control + ["." try ("#\." functor)] + [parser + ["<.>" text]]] + [math + ["." random (#+ Random)]] + [time + ["." instant]]] + {#program + ["." /]}) + +(def: #export random + (Random /.Time) + random.instant) + +(def: #export test + Test + (<| (_.covering /._) + (_.for [/.Time]) + ($_ _.and + (_.for [/.equivalence] + ($equivalence.spec /.equivalence ..random)) + + (do random.monad + [expected ..random] + ($_ _.and + (_.cover [/.format /.parser] + (|> expected + /.format + (.run /.parser) + (try\map (\ instant.equivalence = expected)) + (try.default false))) + )) + ))) diff --git a/stdlib/source/test/aedifex/artifact/time_stamp.lux b/stdlib/source/test/aedifex/artifact/time_stamp.lux deleted file mode 100644 index 7dea57392..000000000 --- a/stdlib/source/test/aedifex/artifact/time_stamp.lux +++ /dev/null @@ -1,33 +0,0 @@ -(.module: - [lux #* - ["_" test (#+ Test)] - [abstract - [monad (#+ do)]] - [control - ["." try ("#\." functor)] - [parser - ["<.>" text]]] - [math - ["." random (#+ Random)] - [number - ["n" nat] - ["i" int]]] - [time - ["." instant]]] - {#program - ["." /]}) - -(def: #export test - Test - (<| (_.covering /._) - (_.for [/.Time_Stamp]) - ($_ _.and - (do random.monad - [expected random.instant] - (_.cover [/.format /.parser] - (|> expected - /.format - (.run /.parser) - (try\map (\ instant.equivalence = expected)) - (try.default false)))) - ))) -- cgit v1.2.3