diff options
author | Eduardo Julian | 2021-07-16 02:23:00 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-07-16 02:23:00 -0400 |
commit | bfacc0c96e56eedf788aba44bd8ad2848a35c390 (patch) | |
tree | 7d5f637d589ac68c645d6d726967d6fac51da15d /stdlib/source/test/aedifex | |
parent | 0abd5bd3c0e38e352e9ba38268e04e1c858ab01e (diff) |
Fixed some inconsistent naming.
Diffstat (limited to 'stdlib/source/test/aedifex')
-rw-r--r-- | stdlib/source/test/aedifex/artifact.lux | 14 | ||||
-rw-r--r-- | stdlib/source/test/aedifex/artifact/extension.lux | 8 | ||||
-rw-r--r-- | stdlib/source/test/aedifex/artifact/time.lux | 12 |
3 files changed, 30 insertions, 4 deletions
diff --git a/stdlib/source/test/aedifex/artifact.lux b/stdlib/source/test/aedifex/artifact.lux index 6afbbf27c..ce0af7e7f 100644 --- a/stdlib/source/test/aedifex/artifact.lux +++ b/stdlib/source/test/aedifex/artifact.lux @@ -6,7 +6,9 @@ [monad (#+ do)] [hash (#+ Hash)] [\\specification - ["$." equivalence]]] + ["$." equivalence] + ["$." order] + ["$." hash]]] [control [concurrency [promise (#+ Promise)]]] @@ -37,11 +39,21 @@ (def: #export test Test (<| (_.covering /._) + (do random.monad + [sample ..random]) (_.for [/.Group /.Name /.Version /.Artifact] ($_ _.and (_.for [/.equivalence] ($equivalence.spec /.equivalence ..random)) + (_.for [/.order] + ($order.spec /.order ..random)) + (_.for [/.hash] + ($hash.spec /.hash ..random)) + + (_.cover [/.format /.identity] + (and (text.ends_with? (/.identity sample) (/.format sample)) + (not (text\= (/.identity sample) (/.format sample))))) /extension.test /snapshot.test diff --git a/stdlib/source/test/aedifex/artifact/extension.lux b/stdlib/source/test/aedifex/artifact/extension.lux index fd28c5d92..b8a2144aa 100644 --- a/stdlib/source/test/aedifex/artifact/extension.lux +++ b/stdlib/source/test/aedifex/artifact/extension.lux @@ -29,10 +29,12 @@ uniques (set.from_list text.hash options)] (n.= (list.size options) (set.size uniques)))) - (_.cover [/.extension] + (_.cover [/.extension /.type] (`` (and (~~ (template [<type> <extension>] - [(text\= <extension> - (/.extension <type>))] + [(and (text\= <extension> + (/.extension <type>)) + (text\= <type> + (/.type (/.extension <type>))))] [//.lux_library /.lux_library] [//.jvm_library /.jvm_library] diff --git a/stdlib/source/test/aedifex/artifact/time.lux b/stdlib/source/test/aedifex/artifact/time.lux index f69566096..131155500 100644 --- a/stdlib/source/test/aedifex/artifact/time.lux +++ b/stdlib/source/test/aedifex/artifact/time.lux @@ -10,6 +10,8 @@ ["." try ("#\." functor)] [parser ["<.>" text]]] + [time + ["." instant ("#\." equivalence)]] [math ["." random (#+ Random)] [number @@ -43,6 +45,16 @@ (<text>.run /.parser) (try\map (\ /.equivalence = expected)) (try.default false)))) + (do random.monad + [expected ..random] + (_.cover [/.instant /.from_instant] + (|> expected + /.instant + /.from_instant + (try\map (\ /.equivalence = expected)) + (try.default false)))) + (_.cover [/.epoch] + (instant\= instant.epoch (/.instant /.epoch))) /date.test /time.test |