(.module: [library [lux #* ["_" test (#+ Test)] [abstract [monad (#+ do)] [hash (#+ Hash)] [\\specification ["$." equivalence] ["$." order] ["$." hash]]] [data ["." text ("#\." equivalence)]] [math ["." random (#+ Random)]] [world ["." file] [net ["." uri]]]]] ["." / #_ ["#." extension] ["#." snapshot] ["#." time] ["#." type] ["#." versioning]] [\\program ["." /]]) (def: .public random (Random /.Artifact) (let [size 4] ($_ random.and (random.ascii/lower size) (random.ascii/lower size) (random.ascii/lower size)))) (def: .public 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 /time.test /type.test /versioning.test ))))