From 0ebabc6e307d161ac4ef837aa492066d4320f6a9 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sat, 24 Oct 2020 09:08:00 -0400 Subject: Re-named some list functions. --- stdlib/source/test/aedifex/pom.lux | 48 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 stdlib/source/test/aedifex/pom.lux (limited to 'stdlib/source/test/aedifex/pom.lux') diff --git a/stdlib/source/test/aedifex/pom.lux b/stdlib/source/test/aedifex/pom.lux new file mode 100644 index 000000000..d1f278da7 --- /dev/null +++ b/stdlib/source/test/aedifex/pom.lux @@ -0,0 +1,48 @@ +(.module: + [lux #* + ["_" test (#+ Test)] + [abstract + [monad (#+ do)]] + [control + ["." try] + ["." exception] + ["<>" parser + ["<.>" xml]]] + [data + [format + ["." xml]]] + [math + ["." random]]] + [// + ["@." profile]] + {#program + ["." / + ["/#" // #_ + ["#" profile]]]}) + +(def: #export test + Test + (<| (_.covering /._) + (do random.monad + [expected @profile.random] + (_.cover [/.write /.parser] + (case [(/.write expected) + (get@ #//.identity expected)] + [(#try.Success pom) + (#.Some _)] + (case (.run /.parser pom) + (#try.Success actual) + (:: //.equivalence = + (|> (:: //.monoid identity) + (set@ #//.dependencies (get@ #//.dependencies expected))) + actual) + + (#try.Failure error) + false) + + [(#try.Failure error) + #.None] + (exception.match? //.no-identity error) + + _ + false))))) -- cgit v1.2.3