diff options
author | Eduardo Julian | 2020-10-24 09:08:00 -0400 |
---|---|---|
committer | Eduardo Julian | 2020-10-24 09:08:00 -0400 |
commit | 0ebabc6e307d161ac4ef837aa492066d4320f6a9 (patch) | |
tree | 96e685c95eb4c99c6e6347521c35b70ad23d172e /stdlib/source/test/aedifex | |
parent | bcd68d4691e7b2f6d56e0ab92b591c14d7a26a48 (diff) |
Re-named some list functions.
Diffstat (limited to 'stdlib/source/test/aedifex')
-rw-r--r-- | stdlib/source/test/aedifex/pom.lux | 48 |
1 files changed, 48 insertions, 0 deletions
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 (<xml>.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))))) |