diff options
Diffstat (limited to '')
110 files changed, 509 insertions, 343 deletions
diff --git a/stdlib/source/test/lux/abstract/equivalence.lux b/stdlib/source/test/lux/abstract/equivalence.lux index cfdb96682..fffb537ad 100644 --- a/stdlib/source/test/lux/abstract/equivalence.lux +++ b/stdlib/source/test/lux/abstract/equivalence.lux @@ -23,9 +23,27 @@ [test ["_" property (.only Test)]]]] ["[0]" \\polytypic] - ["[0]" \\specification] [\\library - ["[0]" / (.only Equivalence)]]) + ["[0]" /]]) + +(def .public (spec (open "/#[0]") random) + (All (_ of) + (-> (/.Equivalence of) (Random of) + Test)) + (do random.monad + [left random + right random] + (<| (_.for [/.Equivalence]) + (_.coverage [/.=] + (let [reflexivity! + (/#= left left) + + symmetry! + (bit#= (/#= left right) + (/#= right left))] + (and reflexivity! + symmetry! + )))))) (type Variant (.Variant @@ -82,7 +100,7 @@ (for @.old (these) (these (def equivalence - (Equivalence ..Record) + (/.Equivalence ..Record) (\\polytypic.equivalence ..Record)))) (def \\polytypic @@ -90,7 +108,7 @@ (<| (_.covering \\polytypic._) (_.for [\\polytypic.equivalence] (for @.old (_.test "PLACEHOLDER" true) - (\\specification.spec ..equivalence ..random))))) + (..spec ..equivalence ..random))))) (def .public test Test @@ -101,7 +119,7 @@ rightI random.int sample random.nat different (|> random.nat (random.only (|>> (n.= sample) not))) - .let [equivalence (is (Equivalence (Equivalence Nat)) + .let [equivalence (is (/.Equivalence (/.Equivalence Nat)) (implementation (def (= left right) (and (bit#= (of left = leftN leftN) @@ -115,7 +133,7 @@ (_.for [/.functor] (contravariantT.spec equivalence n.equivalence /.functor)) (_.coverage [/.rec] - (let [equivalence (is (Equivalence (List Nat)) + (let [equivalence (is (/.Equivalence (List Nat)) (/.rec (function (_ equivalence) (implementation (def (= left right) diff --git a/stdlib/source/test/lux/abstract/interval.lux b/stdlib/source/test/lux/abstract/interval.lux index 55f97f711..155770f07 100644 --- a/stdlib/source/test/lux/abstract/interval.lux +++ b/stdlib/source/test/lux/abstract/interval.lux @@ -4,8 +4,8 @@ [abstract [monad (.only do)] ["[0]" order] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" pipe]] [data @@ -21,6 +21,21 @@ [\\library ["[0]" / (.only Interval) (.use "[1]#[0]" equivalence)]]) +(def .public (spec (open "/#[0]") gen_sample) + (All (_ of) + (-> (/.Interval of) (Random of) + Test)) + (<| (_.for [/.Interval]) + (do random.monad + [sample gen_sample] + (all _.and + (_.test "No value is bigger than the top." + (/#< /#top sample)) + (_.test "No value is smaller than the bottom." + (order.> /#order /#bottom sample)) + )))) + + (with_template [<name> <cmp>] [(def .public <name> (Random (Interval Nat)) @@ -254,7 +269,7 @@ (<| (_.covering /._) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..interval)) + (equivalenceT.spec /.equivalence ..interval)) ..types ..boundaries diff --git a/stdlib/source/test/lux/abstract/order.lux b/stdlib/source/test/lux/abstract/order.lux index 54e8f3d8d..905813998 100644 --- a/stdlib/source/test/lux/abstract/order.lux +++ b/stdlib/source/test/lux/abstract/order.lux @@ -7,7 +7,7 @@ ["[0]" contravariant ["[1]T" \\test]]] ["[0]" equivalence - ["[1]T" \\specification]]] + ["[1]T" \\test]]] [data ["[0]" bit (.use "[1]#[0]" equivalence)]] [math diff --git a/stdlib/source/test/lux/control/lazy.lux b/stdlib/source/test/lux/control/lazy.lux index 58ce73b97..9343107fd 100644 --- a/stdlib/source/test/lux/control/lazy.lux +++ b/stdlib/source/test/lux/control/lazy.lux @@ -8,8 +8,8 @@ ["[1]T" \\test (.only Injection Comparison)]] ["[0]" apply ["[1]T" \\test]] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [data ["[0]" product]] [math @@ -47,7 +47,7 @@ (_.for [/.Lazy] (all _.and (_.for [/.equivalence] - ($equivalence.spec (/.equivalence n.equivalence) (..lazy random.nat))) + (equivalenceT.spec (/.equivalence n.equivalence) (..lazy random.nat))) (_.for [/.functor] (functorT.spec ..injection ..comparison /.functor)) (_.for [/.apply] diff --git a/stdlib/source/test/lux/control/maybe.lux b/stdlib/source/test/lux/control/maybe.lux index afa6200aa..a9b64e197 100644 --- a/stdlib/source/test/lux/control/maybe.lux +++ b/stdlib/source/test/lux/control/maybe.lux @@ -9,9 +9,10 @@ ["[0]" apply ["[1]T" \\test]] [\\specification - ["$[0]" equivalence] ["$[0]" hash]] ["[0]" monoid + ["[1]T" \\test]] + ["[0]" equivalence ["[1]T" \\test]]] [control ["[0]" io (.use "[1]#[0]" monad)] @@ -36,7 +37,7 @@ .#None .#Some]) (all _.and (_.for [/.equivalence] - ($equivalence.spec (/.equivalence n.equivalence) (random.maybe random.nat))) + (equivalenceT.spec (/.equivalence n.equivalence) (random.maybe random.nat))) (_.for [/.hash] (|> random.nat (of random.monad each (|>> {.#Some})) diff --git a/stdlib/source/test/lux/control/try.lux b/stdlib/source/test/lux/control/try.lux index c46699836..b70de3683 100644 --- a/stdlib/source/test/lux/control/try.lux +++ b/stdlib/source/test/lux/control/try.lux @@ -8,8 +8,8 @@ ["[1]T" \\test (.only Injection Comparison)]] ["[0]" apply ["[1]T" \\test]] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" pipe] ["[0]" io]] @@ -51,7 +51,7 @@ .let [(open "io#[0]") io.monad]]) (all _.and (_.for [/.equivalence] - ($equivalence.spec (/.equivalence n.equivalence) (..attempt random.nat))) + (equivalenceT.spec (/.equivalence n.equivalence) (..attempt random.nat))) (_.for [/.functor] (functorT.spec ..injection ..comparison /.functor)) (_.for [/.apply] diff --git a/stdlib/source/test/lux/data/any.lux b/stdlib/source/test/lux/data/any.lux index 1a8c31c44..da1b7dc55 100644 --- a/stdlib/source/test/lux/data/any.lux +++ b/stdlib/source/test/lux/data/any.lux @@ -3,8 +3,9 @@ [lux (.except) [abstract [monad (.only do)] + ["[0]" equivalence + ["[1]T" \\test]] [\\specification - ["[0]S" equivalence] ["[0]S" hash]]] [math ["[0]" random (.only Random) (.use "[1]#[0]" monad)]] @@ -24,7 +25,7 @@ []) (all _.and (_.for [/.equivalence] - (equivalenceS.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.hash] (hashS.spec /.hash ..random)) diff --git a/stdlib/source/test/lux/data/binary.lux b/stdlib/source/test/lux/data/binary.lux index 95d26678f..ae70dcf97 100644 --- a/stdlib/source/test/lux/data/binary.lux +++ b/stdlib/source/test/lux/data/binary.lux @@ -6,8 +6,8 @@ [equivalence (.only Equivalence)] ["[0]" monad (.only do)] ["[0]" enum] - [\\specification - ["$[0]" equivalence]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" monoid ["[1]T" \\test]]] [control @@ -489,7 +489,7 @@ length (of ! each (n.% (n.- offset size)) random.nat)] (`` (all _.and (_.for [!.=] - ($equivalence.spec (function (_ left right) + (equivalenceT.spec (function (_ left right) (!.= left right)) (..random size))) (_.coverage [!.empty] @@ -553,7 +553,7 @@ length (of ! each (n.% (n.- offset size)) random.nat)] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence (..random size))) + (equivalenceT.spec /.equivalence (..random size))) (_.for [/.monoid] (monoidT.spec /.equivalence /.monoid (..random size))) (_.coverage [/.mix] diff --git a/stdlib/source/test/lux/data/bit.lux b/stdlib/source/test/lux/data/bit.lux index 176b3114a..5b2ec3b02 100644 --- a/stdlib/source/test/lux/data/bit.lux +++ b/stdlib/source/test/lux/data/bit.lux @@ -4,8 +4,9 @@ [abstract [monad (.only do)] [\\specification - ["$[0]" equivalence] ["$[0]" hash]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" codec ["[1]T" \\test]] ["[0]" monoid @@ -26,7 +27,7 @@ [value random.bit] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence random.bit)) + (equivalenceT.spec /.equivalence random.bit)) (_.for [/.hash] ($hash.spec /.hash random.bit)) (_.for [/.disjunction] diff --git a/stdlib/source/test/lux/data/collection/array.lux b/stdlib/source/test/lux/data/collection/array.lux index 35b85392a..cad11b974 100644 --- a/stdlib/source/test/lux/data/collection/array.lux +++ b/stdlib/source/test/lux/data/collection/array.lux @@ -10,8 +10,8 @@ ["[1]T" \\test]] ["[0]" monoid ["[1]T" \\test]] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" maybe (.use "[1]#[0]" functor)]] [data @@ -45,7 +45,7 @@ [size ..bounded_size] (all _.and (_.for [/.equivalence] - ($equivalence.spec (/.equivalence n.equivalence) (random.array size random.nat))) + (equivalenceT.spec (/.equivalence n.equivalence) (random.array size random.nat))) (_.for [/.monoid] (monoidT.spec (/.equivalence n.equivalence) /.monoid (random.array size random.nat))) (_.for [/.functor] @@ -130,7 +130,7 @@ evens (random.array size (random.only n.even? random.nat))] (`` (all _.and (_.for [!.=] - ($equivalence.spec (function (_ left right) + (equivalenceT.spec (function (_ left right) (!.= n.equivalence left right)) (random.array size random.nat))) (_.for [!.composite] diff --git a/stdlib/source/test/lux/data/collection/bits.lux b/stdlib/source/test/lux/data/collection/bits.lux index 965ad8e5a..88c63c8cd 100644 --- a/stdlib/source/test/lux/data/collection/bits.lux +++ b/stdlib/source/test/lux/data/collection/bits.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control [function ["[0]" predicate]]] @@ -38,7 +38,7 @@ (_.for [/.Bits]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (do random.monad [sample ..random] diff --git a/stdlib/source/test/lux/data/collection/dictionary.lux b/stdlib/source/test/lux/data/collection/dictionary.lux index e0757bc7a..a72c0b582 100644 --- a/stdlib/source/test/lux/data/collection/dictionary.lux +++ b/stdlib/source/test/lux/data/collection/dictionary.lux @@ -6,8 +6,8 @@ [monad (.only do)] ["[0]" functor ["[1]T" \\test (.only Injection)]] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" maybe (.use "[1]#[0]" functor)] ["[0]" try] @@ -264,7 +264,7 @@ random.nat)] (all _.and (_.for [/.equivalence] - ($equivalence.spec (/.equivalence n.equivalence) + (equivalenceT.spec (/.equivalence n.equivalence) (random.dictionary n.hash size random.nat random.nat))) (_.for [/.functor] diff --git a/stdlib/source/test/lux/data/collection/dictionary/ordered.lux b/stdlib/source/test/lux/data/collection/dictionary/ordered.lux index 410580860..9b50f037c 100644 --- a/stdlib/source/test/lux/data/collection/dictionary/ordered.lux +++ b/stdlib/source/test/lux/data/collection/dictionary/ordered.lux @@ -5,8 +5,8 @@ [monad (.only do)] [equivalence (.only Equivalence)] [order (.only Order)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" maybe (.use "[1]#[0]" monad)]] [data @@ -66,7 +66,7 @@ (open "/#[0]") (/.equivalence n.equivalence)]] (all _.and (_.for [/.equivalence] - ($equivalence.spec (/.equivalence n.equivalence) (..dictionary n.order random.nat random.nat size))) + (equivalenceT.spec (/.equivalence n.equivalence) (..dictionary n.order random.nat random.nat size))) (_.coverage [/.size] (n.= size (/.size sample))) diff --git a/stdlib/source/test/lux/data/collection/list.lux b/stdlib/source/test/lux/data/collection/list.lux index 460565e5f..c9131d41a 100644 --- a/stdlib/source/test/lux/data/collection/list.lux +++ b/stdlib/source/test/lux/data/collection/list.lux @@ -13,8 +13,9 @@ ["[1]T" \\test]] ["[0]" mix ["[1]T" \\test]] + ["[0]" equivalence + ["[1]T" \\test]] [\\specification - ["$[0]" equivalence] ["$[0]" hash]]] [control ["[0]" pipe] @@ -54,7 +55,7 @@ Test (all _.and (_.for [/.equivalence] - ($equivalence.spec (/.equivalence n.equivalence) ..random)) + (equivalenceT.spec (/.equivalence n.equivalence) ..random)) (_.for [/.hash] (|> random.nat (of random.monad each (|>> list)) diff --git a/stdlib/source/test/lux/data/collection/list/property.lux b/stdlib/source/test/lux/data/collection/list/property.lux index 06d0141a2..c051e4b5c 100644 --- a/stdlib/source/test/lux/data/collection/list/property.lux +++ b/stdlib/source/test/lux/data/collection/list/property.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" monoid ["[1]T" \\test]]] [control @@ -48,7 +48,7 @@ shift random.nat] (all _.and (_.for [/.equivalence] - ($equivalence.spec (/.equivalence n.equivalence) + (equivalenceT.spec (/.equivalence n.equivalence) (..random size gen_key random.nat))) (_.for [/.monoid] (monoidT.spec (/.equivalence n.equivalence) diff --git a/stdlib/source/test/lux/data/collection/queue.lux b/stdlib/source/test/lux/data/collection/queue.lux index 56656e44a..3a388badc 100644 --- a/stdlib/source/test/lux/data/collection/queue.lux +++ b/stdlib/source/test/lux/data/collection/queue.lux @@ -5,8 +5,8 @@ [monad (.only do)] ["[0]" functor ["[1]T" \\test (.only Injection)]] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [data ["[0]" bit (.use "[1]#[0]" equivalence)] [collection @@ -39,7 +39,7 @@ sample (/.of_list members)]] (all _.and (_.for [/.equivalence] - ($equivalence.spec (/.equivalence n.equivalence) (random.queue size random.nat))) + (equivalenceT.spec (/.equivalence n.equivalence) (random.queue size random.nat))) (_.for [/.functor] (functorT.spec ..injection /.equivalence /.functor)) diff --git a/stdlib/source/test/lux/data/collection/sequence.lux b/stdlib/source/test/lux/data/collection/sequence.lux index 80f6d06fe..dd392c9e0 100644 --- a/stdlib/source/test/lux/data/collection/sequence.lux +++ b/stdlib/source/test/lux/data/collection/sequence.lux @@ -12,8 +12,8 @@ ["[1]T" \\test]] ["[0]" mix ["[1]T" \\test]] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" try (.only Try)] ["[0]" exception]] @@ -38,7 +38,7 @@ [size (of ! each (n.% 100) random.nat)] (all _.and (_.for [/.equivalence] - ($equivalence.spec (/.equivalence n.equivalence) (random.sequence size random.nat))) + (equivalenceT.spec (/.equivalence n.equivalence) (random.sequence size random.nat))) (_.for [/.monoid] (monoidT.spec (/.equivalence n.equivalence) /.monoid (random.sequence size random.nat))) (_.for [/.mix] diff --git a/stdlib/source/test/lux/data/collection/set.lux b/stdlib/source/test/lux/data/collection/set.lux index efa67edac..19b44b8bf 100644 --- a/stdlib/source/test/lux/data/collection/set.lux +++ b/stdlib/source/test/lux/data/collection/set.lux @@ -4,8 +4,9 @@ [abstract [hash (.only Hash)] [monad (.only do)] + ["[0]" equivalence + ["[1]T" \\test]] [\\specification - ["$[0]" equivalence] ["$[0]" hash]] ["[0]" monoid ["[1]T" \\test]]] @@ -35,7 +36,7 @@ [size ..gen_nat] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence (random.set n.hash size random.nat))) + (equivalenceT.spec /.equivalence (random.set n.hash size random.nat))) (_.for [/.hash] (|> random.nat (of random.monad each (|>> list (/.of_list n.hash))) diff --git a/stdlib/source/test/lux/data/collection/set/multi.lux b/stdlib/source/test/lux/data/collection/set/multi.lux index f22c4c455..981de69d6 100644 --- a/stdlib/source/test/lux/data/collection/set/multi.lux +++ b/stdlib/source/test/lux/data/collection/set/multi.lux @@ -4,8 +4,9 @@ [abstract [hash (.only Hash)] [monad (.only do)] + ["[0]" equivalence + ["[1]T" \\test]] [\\specification - ["$[0]" equivalence] ["$[0]" hash]]] [control [function @@ -45,7 +46,7 @@ [diversity (of ! each (n.% 10) random.nat)] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence (..random diversity n.hash ..count random.nat))) + (equivalenceT.spec /.equivalence (..random diversity n.hash ..count random.nat))) (_.for [/.hash] (|> random.nat (of random.monad each (function (_ single) diff --git a/stdlib/source/test/lux/data/collection/set/ordered.lux b/stdlib/source/test/lux/data/collection/set/ordered.lux index 45c8a9a9e..6579bfffd 100644 --- a/stdlib/source/test/lux/data/collection/set/ordered.lux +++ b/stdlib/source/test/lux/data/collection/set/ordered.lux @@ -4,8 +4,8 @@ [abstract [monad (.only do)] [order (.only Order)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [data ["[0]" bit (.use "[1]#[0]" equivalence)] [collection @@ -55,7 +55,7 @@ empty (/.empty n.order)]] (`` (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence (..random sizeL n.order random.nat))) + (equivalenceT.spec /.equivalence (..random sizeL n.order random.nat))) (_.coverage [/.size] (n.= sizeL (/.size setL))) diff --git a/stdlib/source/test/lux/data/collection/stack.lux b/stdlib/source/test/lux/data/collection/stack.lux index e18c44196..eb3d7cee8 100644 --- a/stdlib/source/test/lux/data/collection/stack.lux +++ b/stdlib/source/test/lux/data/collection/stack.lux @@ -5,8 +5,8 @@ [monad (.only do)] ["[0]" functor ["[1]T" \\test (.only Injection)]] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" maybe]] [data @@ -34,7 +34,7 @@ expected_top random.nat] (all _.and (_.for [/.equivalence] - ($equivalence.spec (/.equivalence n.equivalence) (random.stack size random.nat))) + (equivalenceT.spec (/.equivalence n.equivalence) (random.stack size random.nat))) (_.for [/.functor] (functorT.spec ..injection /.equivalence /.functor)) diff --git a/stdlib/source/test/lux/data/collection/tree.lux b/stdlib/source/test/lux/data/collection/tree.lux index ee6d5a83d..f8d45e7ec 100644 --- a/stdlib/source/test/lux/data/collection/tree.lux +++ b/stdlib/source/test/lux/data/collection/tree.lux @@ -7,8 +7,8 @@ ["[1]T" \\test (.only Injection Comparison)]] ["[0]" mix ["[1]T" \\test]] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["//" parser] ["[0]" try] @@ -208,7 +208,7 @@ (_.for [/.equivalence] (|> (..tree random.nat) (of random.monad each product.right) - ($equivalence.spec (/.equivalence n.equivalence)))) + (equivalenceT.spec (/.equivalence n.equivalence)))) (_.for [/.mix] (mixT.spec /.leaf /.equivalence /.mix)) (_.for [/.functor] diff --git a/stdlib/source/test/lux/data/collection/tree/zipper.lux b/stdlib/source/test/lux/data/collection/tree/zipper.lux index 77d9209d8..c8b91e2c1 100644 --- a/stdlib/source/test/lux/data/collection/tree/zipper.lux +++ b/stdlib/source/test/lux/data/collection/tree/zipper.lux @@ -7,8 +7,8 @@ ["[1]T" \\test (.only Injection Comparison)]] ["[0]" comonad ["[1]T" \\test]] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" pipe] ["[0]" maybe (.use "[1]#[0]" functor)]] @@ -167,7 +167,7 @@ (open "list#[0]") (list.equivalence n.equivalence)]] (all _.and (_.for [/.equivalence] - ($equivalence.spec (/.equivalence n.equivalence) (of ! each (|>> product.right /.zipper) (//.tree random.nat)))) + (equivalenceT.spec (/.equivalence n.equivalence) (of ! each (|>> product.right /.zipper) (//.tree random.nat)))) (_.for [/.functor] (functorT.spec (|>> tree.leaf /.zipper) /.equivalence /.functor)) (_.for [/.comonad] diff --git a/stdlib/source/test/lux/data/color/cmyk.lux b/stdlib/source/test/lux/data/color/cmyk.lux index 2eda4d6a8..9ee4b6e1d 100644 --- a/stdlib/source/test/lux/data/color/cmyk.lux +++ b/stdlib/source/test/lux/data/color/cmyk.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["[0]S" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" try (.use "[1]#[0]" functor)] ["[0]" exception]] @@ -78,16 +78,12 @@ /.#cyan /.#magenta /.#yellow /.#key] (all _.and (_.for [/.equivalence] - (equivalenceS.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) - (_.coverage [/.cmyk /.rgb] - (and (|> expected_rgb - /.cmyk - /.rgb - (of rgb.equivalence = expected_rgb)) - (|> expected_cmyk - /.rgb - /.cmyk - (of /.equivalence = expected_cmyk)))) + (_.coverage [/.of_rgb /.rgb] + (|> expected_rgb + /.of_rgb + /.rgb + (of rgb.equivalence = expected_rgb))) )) ))) diff --git a/stdlib/source/test/lux/data/color/hsb.lux b/stdlib/source/test/lux/data/color/hsb.lux index ee8d5f18a..2a3d1c69c 100644 --- a/stdlib/source/test/lux/data/color/hsb.lux +++ b/stdlib/source/test/lux/data/color/hsb.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["[0]S" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [math ["[0]" random (.only Random) (.use "[1]#[0]" monad)] [number @@ -70,20 +70,16 @@ (_.for [/.HSB] (all _.and (_.for [/.equivalence] - (equivalenceS.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.coverage [/.hsb /.hue /.saturation /.brightness] (|> (/.hsb (/.hue expected_hsb) (/.saturation expected_hsb) (/.brightness expected_hsb)) (of /.equivalence = expected_hsb))) (_.coverage [/.of_rgb /.rgb] - (and (|> expected_rgb - /.of_rgb - /.rgb - (of rgb.equivalence = expected_rgb)) - (|> expected_hsb - /.rgb - /.of_rgb - (of /.equivalence = expected_hsb)))) + (|> expected_rgb + /.of_rgb + /.rgb + (of rgb.equivalence = expected_rgb))) )) ))) diff --git a/stdlib/source/test/lux/data/color/hsl.lux b/stdlib/source/test/lux/data/color/hsl.lux index bbfd8f8da..1de637d08 100644 --- a/stdlib/source/test/lux/data/color/hsl.lux +++ b/stdlib/source/test/lux/data/color/hsl.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["[0]S" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [math ["[0]" random (.only Random) (.use "[1]#[0]" monad)] [number @@ -82,7 +82,7 @@ /.#hue /.#saturation /.#luminance] (`` (all _.and (_.for [/.equivalence] - (equivalenceS.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.coverage [/.hsl] (|> (/.hsl (the /.#hue expected_hsl) @@ -90,14 +90,10 @@ (the /.#luminance expected_hsl)) (of /.equivalence = expected_hsl))) (_.coverage [/.of_rgb /.rgb] - (and (|> expected_rgb - /.of_rgb - /.rgb - (of rgb.equivalence = expected_rgb)) - (|> expected_hsl - /.rgb - /.of_rgb - (of /.equivalence = expected_hsl)))) + (|> expected_rgb + /.of_rgb + /.rgb + (of rgb.equivalence = expected_rgb))) (_.coverage [/.saturated] (f.> (the /.#saturation mediocre) diff --git a/stdlib/source/test/lux/data/color/rgb.lux b/stdlib/source/test/lux/data/color/rgb.lux index 2723d5529..089759e56 100644 --- a/stdlib/source/test/lux/data/color/rgb.lux +++ b/stdlib/source/test/lux/data/color/rgb.lux @@ -3,8 +3,9 @@ [lux (.except) [abstract [monad (.only do)] + ["[0]" equivalence + ["[1]T" \\test]] [\\specification - ["[0]S" equivalence] ["[0]S" hash]] ["[0]" monoid ["[1]T" \\test]]] @@ -104,7 +105,7 @@ /.#red /.#green /.#blue] (all _.and (_.for [/.equivalence] - (equivalenceS.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.hash] (hashS.spec /.hash ..random)) (_.for [/.addition] diff --git a/stdlib/source/test/lux/data/color/scheme.lux b/stdlib/source/test/lux/data/color/scheme.lux index 2d9ccaf3f..be18c52cc 100644 --- a/stdlib/source/test/lux/data/color/scheme.lux +++ b/stdlib/source/test/lux/data/color/scheme.lux @@ -2,10 +2,7 @@ [library [lux (.except) [abstract - [monad (.only do)] - [\\specification - ["$[0]" equivalence] - ["$[0]" hash]]] + [monad (.only do)]] [data [collection ["[0]" list]]] diff --git a/stdlib/source/test/lux/data/color/terminal.lux b/stdlib/source/test/lux/data/color/terminal.lux index bcc080a1c..2a3b1c3e9 100644 --- a/stdlib/source/test/lux/data/color/terminal.lux +++ b/stdlib/source/test/lux/data/color/terminal.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["[0]S" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [data ["[0]" text (.use "[1]#[0]" equivalence)] [collection @@ -74,7 +74,7 @@ (_.for [/.Command]) (all _.and (_.for [/.equivalence] - (equivalenceS.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.coverage [/.with] (let [it (/.with command diff --git a/stdlib/source/test/lux/data/format/json.lux b/stdlib/source/test/lux/data/format/json.lux index 0442d17bc..b97cb1afe 100644 --- a/stdlib/source/test/lux/data/format/json.lux +++ b/stdlib/source/test/lux/data/format/json.lux @@ -5,9 +5,8 @@ [codec (.except)] [monad (.only do)] ["[0]" equivalence (.only Equivalence) - ["[0]/[1]" \\polytypic]] - [\\specification - ["$[0]" equivalence]] + ["[0]/[1]" \\polytypic] + ["[1]T" \\test]] ["[0]" codec ["[1]T" \\test]]] [control @@ -341,7 +340,7 @@ (_.for [/.JSON]) (`` (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.codec] (all _.and (codecT.spec /.equivalence /.codec ..random) diff --git a/stdlib/source/test/lux/data/format/xml.lux b/stdlib/source/test/lux/data/format/xml.lux index 337ab10b7..73612963a 100644 --- a/stdlib/source/test/lux/data/format/xml.lux +++ b/stdlib/source/test/lux/data/format/xml.lux @@ -3,8 +3,8 @@ [lux (.except char symbol) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" codec ["[1]T" \\test]]] [control @@ -232,7 +232,7 @@ (_.for [/.XML /.#Text /.#Node]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.codec] (codecT.spec /.equivalence /.codec ..random)) diff --git a/stdlib/source/test/lux/data/product.lux b/stdlib/source/test/lux/data/product.lux index 458264a0f..510c4aadf 100644 --- a/stdlib/source/test/lux/data/product.lux +++ b/stdlib/source/test/lux/data/product.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [math ["[0]" random] [number @@ -26,7 +26,7 @@ random.nat)] (all _.and (_.for [/.equivalence] - ($equivalence.spec (/.equivalence n.equivalence i.equivalence) + (equivalenceT.spec (/.equivalence n.equivalence i.equivalence) (random.and random.nat random.int))) (do random.monad [left random.int diff --git a/stdlib/source/test/lux/data/sum.lux b/stdlib/source/test/lux/data/sum.lux index ead537253..97699e4a7 100644 --- a/stdlib/source/test/lux/data/sum.lux +++ b/stdlib/source/test/lux/data/sum.lux @@ -3,8 +3,9 @@ [lux (.except) [abstract [monad (.only do)] + ["[0]" equivalence + ["[1]T" \\test]] [\\specification - ["$[0]" equivalence] ["$[0]" hash]]] [control ["[0]" pipe]] @@ -31,7 +32,7 @@ shift random.nat] (all _.and (_.for [/.equivalence] - ($equivalence.spec (/.equivalence n.equivalence n.equivalence) + (equivalenceT.spec (/.equivalence n.equivalence n.equivalence) (random.or random.nat random.nat))) (_.for [/.hash] ($hash.spec (/.hash n.hash n.hash) diff --git a/stdlib/source/test/lux/data/text.lux b/stdlib/source/test/lux/data/text.lux index e7bd6ac8b..23d12ebe1 100644 --- a/stdlib/source/test/lux/data/text.lux +++ b/stdlib/source/test/lux/data/text.lux @@ -5,11 +5,12 @@ [monad (.only do)] [equivalence (.only Equivalence)] [\\specification - ["$[0]" equivalence] ["$[0]" hash]] [functor ["[0]" contravariant ["[1]T" \\test]]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" order ["[1]T" \\test]] ["[0]" monoid @@ -863,7 +864,7 @@ (_.for [.Text]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence (random.ascii 2))) + (equivalenceT.spec /.equivalence (random.ascii 2))) (_.for [/.hash] ($hash.spec /.hash (random.ascii 1))) (_.for [/.order] diff --git a/stdlib/source/test/lux/data/text/unicode/block.lux b/stdlib/source/test/lux/data/text/unicode/block.lux index 370740c9a..88261f69a 100644 --- a/stdlib/source/test/lux/data/text/unicode/block.lux +++ b/stdlib/source/test/lux/data/text/unicode/block.lux @@ -3,8 +3,9 @@ [lux (.except) [abstract [monad (.only do)] + ["[0]" equivalence + ["[1]T" \\test]] [\\specification - ["$[0]" equivalence] ["$[0]" hash]] ["[0]" monoid ["[1]T" \\test]]] @@ -187,7 +188,7 @@ random.nat)] (`` (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.hash] ($hash.spec /.hash ..random)) (_.for [/.monoid] diff --git a/stdlib/source/test/lux/data/text/unicode/set.lux b/stdlib/source/test/lux/data/text/unicode/set.lux index 1c62d0eda..21c56d628 100644 --- a/stdlib/source/test/lux/data/text/unicode/set.lux +++ b/stdlib/source/test/lux/data/text/unicode/set.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [data ["[0]" product] ["[0]" bit (.use "[1]#[0]" equivalence)] @@ -47,7 +47,7 @@ n.equivalence)]] (`` (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.coverage [/.set] (and (n.= (block.start left) diff --git a/stdlib/source/test/lux/math/arithmetic/fixed_point.lux b/stdlib/source/test/lux/math/arithmetic/fixed_point.lux index f02901c87..a41078599 100644 --- a/stdlib/source/test/lux/math/arithmetic/fixed_point.lux +++ b/stdlib/source/test/lux/math/arithmetic/fixed_point.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["[0]S" equivalence]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" order ["[1]T" \\test]]] [control @@ -64,11 +64,11 @@ (<| (_.for [/.Fixed]) (all _.and (_.for [/.equivalence /.=] - (equivalenceS.spec (/.equivalence @) (..random @))) + (equivalenceT.spec (/.equivalence @) (..random @))) (_.for [/.order /.<] (orderT.spec (/.order @) (..random @))) - (_.for [/.arithmetic] - (arithmeticS.spec (/.equivalence @) (/.arithmetic @) (..random @))) + ... (_.for [/.arithmetic] + ... (arithmeticS.spec (/.equivalence @) (/.arithmetic @) (..random @))) (_.coverage [/.fixed /.units /.sub_units] (/.= @ diff --git a/stdlib/source/test/lux/math/arithmetic/modular.lux b/stdlib/source/test/lux/math/arithmetic/modular.lux index 0d0a85f46..d1e3708d7 100644 --- a/stdlib/source/test/lux/math/arithmetic/modular.lux +++ b/stdlib/source/test/lux/math/arithmetic/modular.lux @@ -3,10 +3,10 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]] ["[0]" codec ["[1]T" \\test]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" order ["[1]T" \\test]] ["[0]" monoid @@ -57,7 +57,7 @@ another (..random subject::%)] (`` (all _.and (_.for [/.equivalence /.=] - ($equivalence.spec /.equivalence (..random subject::%))) + (equivalenceT.spec /.equivalence (..random subject::%))) (_.for [/.order /.<] (orderT.spec /.order (..random subject::%))) (,, (with_template [<composite> <monoid>] diff --git a/stdlib/source/test/lux/math/number/complex.lux b/stdlib/source/test/lux/math/number/complex.lux index fd11abd80..b9a58dfcc 100644 --- a/stdlib/source/test/lux/math/number/complex.lux +++ b/stdlib/source/test/lux/math/number/complex.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [data [collection ["[0]" list (.use "[1]#[0]" functor)]]] @@ -274,7 +274,7 @@ /.#imaginary /.#real]) (all _.and (_.for [/.= /.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.arithmetic] (arithmeticS.spec /.equivalence /.arithmetic ..random)) diff --git a/stdlib/source/test/lux/math/number/frac.lux b/stdlib/source/test/lux/math/number/frac.lux index fbfeb7021..d62c8b287 100644 --- a/stdlib/source/test/lux/math/number/frac.lux +++ b/stdlib/source/test/lux/math/number/frac.lux @@ -5,10 +5,11 @@ [abstract [monad (.only do)] [\\specification - ["$[0]" equivalence] ["$[0]" hash]] ["[0]" codec ["[1]T" \\test]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" order ["[1]T" \\test]] ["[0]" monoid @@ -104,7 +105,7 @@ Test (`` (all _.and (_.for [/.equivalence /.=] - ($equivalence.spec /.equivalence random.safe_frac)) + (equivalenceT.spec /.equivalence random.safe_frac)) (_.for [/.hash] ($hash.spec /.hash random.frac)) (_.for [/.order /.<] diff --git a/stdlib/source/test/lux/math/number/i16.lux b/stdlib/source/test/lux/math/number/i16.lux index 529f64f4a..28b22aba2 100644 --- a/stdlib/source/test/lux/math/number/i16.lux +++ b/stdlib/source/test/lux/math/number/i16.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [math ["[0]" random (.only Random)]] [test @@ -31,7 +31,7 @@ expected (of ! each (i.% limit) random.int)] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.coverage [/.i16 /.i64 /.width] (let [actual (|> expected .i64 /.i16 /.i64)] diff --git a/stdlib/source/test/lux/math/number/i32.lux b/stdlib/source/test/lux/math/number/i32.lux index e3f00275c..1c0ba7c18 100644 --- a/stdlib/source/test/lux/math/number/i32.lux +++ b/stdlib/source/test/lux/math/number/i32.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [math ["[0]" random (.only Random)]] [test @@ -31,7 +31,7 @@ expected (of ! each (i.% limit) random.int)] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.coverage [/.i32 /.i64 /.width] (let [actual (|> expected .i64 /.i32 /.i64)] diff --git a/stdlib/source/test/lux/math/number/i64.lux b/stdlib/source/test/lux/math/number/i64.lux index 8a5028a6f..209a53fff 100644 --- a/stdlib/source/test/lux/math/number/i64.lux +++ b/stdlib/source/test/lux/math/number/i64.lux @@ -5,8 +5,9 @@ ["[0]" bit (.use "[1]#[0]" equivalence)]] [abstract [monad (.only do)] + ["[0]" equivalence + ["[1]T" \\test]] [\\specification - ["$[0]" equivalence] ["$[0]" hash]] ["[0]" monoid ["[1]T" \\test]]] @@ -142,7 +143,7 @@ (function (_ narrow) (of random.functor each narrow random.i64)))]] (all _.and - ($equivalence.spec (of sub sub_equivalence) (random (of sub narrow))) + (equivalenceT.spec (of sub sub_equivalence) (random (of sub narrow))) (_.coverage [/.sub] (let [actual (|> expected .i64 (of sub narrow) (of sub wide))] (/#= expected actual))) @@ -152,7 +153,7 @@ Test (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence random.i64)) + (equivalenceT.spec /.equivalence random.i64)) (_.for [/.hash] ($hash.spec /.hash random.i64)) (_.for [/.disjunction] diff --git a/stdlib/source/test/lux/math/number/i8.lux b/stdlib/source/test/lux/math/number/i8.lux index 67c29698e..eb36cd701 100644 --- a/stdlib/source/test/lux/math/number/i8.lux +++ b/stdlib/source/test/lux/math/number/i8.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [math ["[0]" random (.only Random)]] [test @@ -31,7 +31,7 @@ expected (of ! each (i.% limit) random.int)] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.coverage [/.i8 /.i64 /.width] (let [actual (|> expected .i64 /.i8 /.i64)] diff --git a/stdlib/source/test/lux/math/number/int.lux b/stdlib/source/test/lux/math/number/int.lux index e8f8969c8..dde18df95 100644 --- a/stdlib/source/test/lux/math/number/int.lux +++ b/stdlib/source/test/lux/math/number/int.lux @@ -4,13 +4,15 @@ [abstract [monad (.only do)] [\\specification - ["$[0]" equivalence] - ["$[0]" hash] - ["$[0]" interval]] + ["$[0]" hash]] ["[0]" enum ["[1]T" \\test]] + ["[0]" interval + ["[1]T" \\test]] ["[0]" codec ["[1]T" \\test]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" order ["[1]T" \\test]] ["[0]" monoid @@ -34,7 +36,7 @@ Test (`` (all _.and (_.for [/.equivalence /.=] - ($equivalence.spec /.equivalence random.int)) + (equivalenceT.spec /.equivalence random.int)) (_.for [/.hash] ($hash.spec /.hash random.int)) (_.for [/.order /.<] @@ -42,7 +44,7 @@ (_.for [/.enum] (enumT.spec /.enum random.int)) (_.for [/.interval] - ($interval.spec /.interval random.int)) + (intervalT.spec /.interval random.int)) (,, (with_template [<monoid>] [(_.for [<monoid>] (monoidT.spec /.equivalence <monoid> random.int))] diff --git a/stdlib/source/test/lux/math/number/nat.lux b/stdlib/source/test/lux/math/number/nat.lux index 32fca4e16..ecce84604 100644 --- a/stdlib/source/test/lux/math/number/nat.lux +++ b/stdlib/source/test/lux/math/number/nat.lux @@ -4,13 +4,15 @@ [abstract [monad (.only do)] [\\specification - ["$[0]" equivalence] - ["$[0]" hash] - ["$[0]" interval]] + ["$[0]" hash]] ["[0]" enum ["[1]T" \\test]] + ["[0]" interval + ["[1]T" \\test]] ["[0]" codec ["[1]T" \\test]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" order ["[1]T" \\test]] ["[0]" monoid @@ -32,7 +34,7 @@ Test (`` (all _.and (_.for [/.equivalence /.=] - ($equivalence.spec /.equivalence random.nat)) + (equivalenceT.spec /.equivalence random.nat)) (_.for [/.hash] ($hash.spec /.hash random.nat)) (_.for [/.order /.<] @@ -40,7 +42,7 @@ (_.for [/.enum] (enumT.spec /.enum random.nat)) (_.for [/.interval] - ($interval.spec /.interval random.nat)) + (intervalT.spec /.interval random.nat)) (,, (with_template [<composite> <monoid>] [(_.for [<monoid> <composite>] (monoidT.spec /.equivalence <monoid> random.nat))] diff --git a/stdlib/source/test/lux/math/number/ratio.lux b/stdlib/source/test/lux/math/number/ratio.lux index c4bfcac60..ecb92de4a 100644 --- a/stdlib/source/test/lux/math/number/ratio.lux +++ b/stdlib/source/test/lux/math/number/ratio.lux @@ -3,10 +3,10 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]] ["[0]" codec ["[1]T" \\test]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" order ["[1]T" \\test]] ["[0]" monoid @@ -46,7 +46,7 @@ (_.for [/.Ratio]) (`` (all _.and (_.for [/.equivalence /.=] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.order /.<] (orderT.spec /.order ..random)) (,, (with_template [<composite> <monoid>] diff --git a/stdlib/source/test/lux/math/number/rev.lux b/stdlib/source/test/lux/math/number/rev.lux index 94255a012..ce264cdef 100644 --- a/stdlib/source/test/lux/math/number/rev.lux +++ b/stdlib/source/test/lux/math/number/rev.lux @@ -4,13 +4,15 @@ [abstract [monad (.only do)] [\\specification - ["$[0]" equivalence] - ["$[0]" hash] - ["$[0]" interval]] + ["$[0]" hash]] ["[0]" enum ["[1]T" \\test]] + ["[0]" interval + ["[1]T" \\test]] ["[0]" codec ["[1]T" \\test]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" order ["[1]T" \\test]] ["[0]" monoid @@ -34,7 +36,7 @@ Test (`` (all _.and (_.for [/.equivalence /.=] - ($equivalence.spec /.equivalence random.rev)) + (equivalenceT.spec /.equivalence random.rev)) (_.for [/.hash] ($hash.spec /.hash random.rev)) (_.for [/.order /.<] @@ -42,7 +44,7 @@ (_.for [/.enum] (enumT.spec /.enum random.rev)) (_.for [/.interval] - ($interval.spec /.interval random.rev)) + (intervalT.spec /.interval random.rev)) (,, (with_template [<composite> <monoid>] [(_.for [<monoid> <composite>] (monoidT.spec /.equivalence <monoid> random.rev))] diff --git a/stdlib/source/test/lux/meta.lux b/stdlib/source/test/lux/meta.lux index 129c67b98..2dec361da 100644 --- a/stdlib/source/test/lux/meta.lux +++ b/stdlib/source/test/lux/meta.lux @@ -42,8 +42,8 @@ ["[1][0]" configuration] ["[1][0]" version] ["[1][0]" type] - ... ["[1][0]" macro] - ... ["[1][0]" static] + ["[1][0]" macro] + ["[1][0]" static] ["[1][0]" extension] ["[1][0]" global] ... ["[1][0]" target (.only) @@ -55,7 +55,6 @@ ... "Ruby" (.,, (.these ["[1]/[0]" ruby])) ... (.,, (.these))))] ["[1][0]" compiler - ... ["[1]/[0]" reference] ... ["[1]/[0]" phase] ... ["[1]/[0]" meta ... ["[1]/[0]" archive] @@ -1055,8 +1054,8 @@ /configuration.test /version.test /type.test - ... /macro.test - ... /static.test + /macro.test + /static.test ... /target.test ... (,, (for @.jvm (,, (these /target/jvm.test)) ... @.old (,, (these /target/jvm.test)) @@ -1069,7 +1068,6 @@ /global.test /compiler.test - ... /compiler/reference.test ... /compiler/meta/archive.test ... /compiler/meta/cli.test ... /compiler/meta/export.test diff --git a/stdlib/source/test/lux/meta/code.lux b/stdlib/source/test/lux/meta/code.lux index f01e5889b..d596cbbe9 100644 --- a/stdlib/source/test/lux/meta/code.lux +++ b/stdlib/source/test/lux/meta/code.lux @@ -3,8 +3,8 @@ [lux (.except local global) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["<>" parser] ["[0]" function] @@ -297,7 +297,7 @@ (<| (_.covering /._) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.format] ..for_format) diff --git a/stdlib/source/test/lux/meta/compiler.lux b/stdlib/source/test/lux/meta/compiler.lux index 6cc006874..30e4ce1d9 100644 --- a/stdlib/source/test/lux/meta/compiler.lux +++ b/stdlib/source/test/lux/meta/compiler.lux @@ -12,6 +12,7 @@ ["[0]" / ["[1][0]" arity] ["[1][0]" version] + ["[1][0]" reference] ["[1][0]" language ["[1]/[0]" lux]] ["[1][0]" meta @@ -28,6 +29,7 @@ /arity.test /version.test + /reference.test /language/lux.test diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/analysis.lux b/stdlib/source/test/lux/meta/compiler/language/lux/analysis.lux index 665322283..a83a697da 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/analysis.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/analysis.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["<>" parser] ["[0]" pipe] @@ -582,7 +582,7 @@ right (..random 2)] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence (..random 2))) + (equivalenceT.spec /.equivalence (..random 2))) ..test|simple ..test|complex diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/complex.lux b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/complex.lux index d09fdc234..b5e4e04ed 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/complex.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/complex.lux @@ -3,8 +3,9 @@ [lux (.except) [abstract [monad (.only do)] + ["[0]" equivalence + ["[1]T" \\test]] [\\specification - ["$[0]" equivalence] ["$[0]" hash]]] [data ["[0]" bit (.use "[1]#[0]" equivalence)] @@ -61,7 +62,7 @@ (_.for [/.Complex /.Variant /.Tuple]) (all _.and (_.for [/.equivalence] - ($equivalence.spec (/.equivalence n.equivalence) random)) + (equivalenceT.spec (/.equivalence n.equivalence) random)) (_.for [/.hash] ($hash.spec (/.hash n.hash) random)) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/coverage.lux b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/coverage.lux index 0d12a11fa..229eec361 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/coverage.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/coverage.lux @@ -3,8 +3,8 @@ [lux (.except Pattern) [abstract ["[0]" monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" pipe] ["[0]" try (.only Try) (.use "[1]#[0]" functor)] @@ -153,7 +153,7 @@ right ..random] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.coverage [/.exhaustive?] (bit#= (/#= {/.#Exhaustive} left) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/macro.lux b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/macro.lux index c4c5cd193..99be06385 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/macro.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/macro.lux @@ -2,9 +2,7 @@ [library [lux (.except) [abstract - [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + [monad (.only do)]] [control ["[0]" pipe] ["[0]" maybe (.use "[1]#[0]" functor)] diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/pattern.lux b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/pattern.lux index ad7342a9a..e30b0bf91 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/pattern.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/pattern.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [data ["[0]" bit (.use "[1]#[0]" equivalence)] ["[0]" text (.use "[1]#[0]" equivalence)]] @@ -50,7 +50,7 @@ right ..random]) (`` (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.coverage [/.format] (bit#= (of /.equivalence = left right) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/simple.lux b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/simple.lux index 2de2ce625..2e8a198f3 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/simple.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/simple.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [data ["[0]" bit (.use "[1]#[0]" equivalence)] ["[0]" text (.use "[1]#[0]" equivalence)]] @@ -35,7 +35,7 @@ (_.for [/.Simple]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (do random.monad [left ..random diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase.lux index faf76b112..c0ceabbd7 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/phase.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase.lux @@ -24,7 +24,11 @@ ["[0]" / (.only) [//// [meta - ["[0]" archive]]]]]) + ["[0]" archive]]]]] + ["[0]" / + ["[1][0]" translation + ["[1]/[0]" jvm + ["[1]/[0]" host]]]]) (def (injection value) (All (_ of) @@ -207,4 +211,6 @@ ..test|operation) (_.for [/.Phase] ..test|phase) + + /translation/jvm/host.test ))) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/extension.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/extension.lux index cf64648b9..2ffea9b19 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/extension.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/extension.lux @@ -3,8 +3,9 @@ [lux (.except) [abstract ["[0]" monad (.only do)] + ["[0]" equivalence + ["[1]T" \\test]] [\\specification - ["$[0]" equivalence] ["$[0]" hash]]] [control ["[0]" pipe] @@ -200,7 +201,7 @@ expected_error (random.lower_cased 1)] (all _.and (_.for [/.equivalence] - ($equivalence.spec (/.equivalence n.equivalence) ..random)) + (equivalenceT.spec (/.equivalence n.equivalence) ..random)) (_.for [/.hash] ($hash.spec (/.hash n.hash) ..random)) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/host.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/host.lux new file mode 100644 index 000000000..c311d107a --- /dev/null +++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/host.lux @@ -0,0 +1,66 @@ +(.require + [library + [lux (.except) + [abstract + [monad (.only do)]] + [control + ["[0]" io] + ["[0]" try] + ["[0]" exception]] + [data + ["[0]" text (.use "[1]#[0]" equivalence)]] + [math + ["[0]" random (.only Random)]] + [meta + [target + [jvm + ["[0]" bytecode] + ["[0]" type]]]] + [test + ["_" property (.only Test)]]]] + [\\library + ["[0]" /]]) + +(def .public test + Test + (<| (_.covering /._) + (do [! random.monad] + [$module random.nat + $artifact random.nat + .let [$unit [$module $artifact]] + expected (random.upper_cased 1)]) + (all _.and + (_.coverage [/.host] + (io.run! (do io.monad + [[class_loader host] /.host] + (in (when (of host evaluate $unit [{.#None} (bytecode.string expected)]) + {try.#Success actual} + (text#= expected (as Text actual)) + + {try.#Failure error} + false))))) + (_.coverage [/.invalid_value] + (io.run! (do io.monad + [[class_loader host] /.host] + (in (when (of host evaluate $unit [{.#None} bytecode.aconst_null]) + {try.#Success _} + false + + {try.#Failure error} + (exception.match? /.invalid_value error)))))) + (_.coverage [/.cannot_load] + (io.run! (do io.monad + [[class_loader host] /.host] + (in (when (of host evaluate $unit [{.#None} (all bytecode.composite + bytecode.lconst_0 + bytecode.lconst_0 + bytecode.ldiv + bytecode.pop2 + (bytecode.string expected) + )]) + {try.#Success _} + false + + {try.#Failure error} + (exception.match? /.cannot_load error)))))) + ))) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/synthesis/access/member.lux b/stdlib/source/test/lux/meta/compiler/language/lux/synthesis/access/member.lux index b04305686..22eef4b16 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/synthesis/access/member.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/synthesis/access/member.lux @@ -3,8 +3,9 @@ [lux (.except) [abstract [monad (.only do)] + ["[0]" equivalence + ["[1]T" \\test]] [\\specification - ["$[0]" equivalence] ["$[0]" hash]]] [data ["[0]" bit (.use "[1]#[0]" equivalence)] @@ -32,7 +33,7 @@ right ..random] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.hash] ($hash.spec /.hash ..random)) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/synthesis/access/side.lux b/stdlib/source/test/lux/meta/compiler/language/lux/synthesis/access/side.lux index 2a7456ab4..a0eac562a 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/synthesis/access/side.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/synthesis/access/side.lux @@ -3,8 +3,9 @@ [lux (.except) [abstract [monad (.only do)] + ["[0]" equivalence + ["[1]T" \\test]] [\\specification - ["$[0]" equivalence] ["$[0]" hash]]] [data ["[0]" bit (.use "[1]#[0]" equivalence)] @@ -32,7 +33,7 @@ right ..random] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.hash] ($hash.spec /.hash ..random)) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/synthesis/simple.lux b/stdlib/source/test/lux/meta/compiler/language/lux/synthesis/simple.lux index 4f076e84a..ca31f785f 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/synthesis/simple.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/synthesis/simple.lux @@ -3,8 +3,9 @@ [lux (.except) [abstract [monad (.only do)] + ["[0]" equivalence + ["[1]T" \\test]] [\\specification - ["$[0]" equivalence] ["$[0]" hash]]] [data ["[0]" bit (.use "[1]#[0]" equivalence)] @@ -36,7 +37,7 @@ right ..random] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.hash] ($hash.spec /.hash ..random)) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/translation.lux b/stdlib/source/test/lux/meta/compiler/language/lux/translation.lux index 8df8dbcbe..af90ed619 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/translation.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/translation.lux @@ -6,6 +6,7 @@ [control ["[0]" try]] [data + ["[0]" text (.use "[1]#[0]" equivalence)] [collection ["[0]" list] ["[0]" sequence]]] @@ -17,10 +18,12 @@ ["_" property (.only Test)]]]] [\\library ["[0]" / (.only) - [//// - [meta - [archive - ["[0]" registry]]]]]]) + [// + ["[0]" phase] + [/// + [meta + [archive + ["[0]" registry]]]]]]]) (def dummy_host (/.Host Any Any) @@ -43,16 +46,18 @@ Test (<| (_.covering /._) (do [! random.monad] - [expected_module (random.lower_cased 1)]) + [expected_module (random.lower_cased 1) + expected_prefix (random.lower_cased 2)]) (all _.and - (_.coverage [/.Host] + (_.coverage [/.Host + /.evaluate /.execute /.define /.ingest /.re_learn /.re_load] true) (_.coverage [/.Operation /.Phase] true) (_.for [/.State - /.#module /.#anchor /.#host /.#buffer + /.#anchor /.#host /.#buffer /.#registry /.#registry_shift - /.#counter /.#context /.#log /.#interim_artifacts] + /.#context /.#log /.#interim_artifacts] (all _.and (_.coverage [/.state] (let [it (is (/.State Any Any Any) @@ -67,6 +72,34 @@ (when (the /.#context it) {.#None} true _ false) (sequence.empty? (the /.#log it)) (list.empty? (the /.#interim_artifacts it))))) + (_.for [/.#module] + (all _.and + (_.coverage [/.enter_module /.module] + (|> (do phase.monad + [expected (/.symbol expected_prefix) + _ (/.enter_module expected) + actual /.module] + (in (same? expected actual))) + (phase.result (/.state ..dummy_host expected_module)) + (try.else false))) + )) + (_.for [/.#counter] + (all _.and + (_.coverage [/.next] + (|> (do phase.monad + [before /.next + after /.next] + (in (n.= (++ before) after))) + (phase.result (/.state ..dummy_host expected_module)) + (try.else false))) + (_.coverage [/.symbol] + (|> (do phase.monad + [it (/.symbol expected_prefix)] + (in (and (not (text#= expected_prefix it)) + (text.starts_with? expected_prefix it)))) + (phase.result (/.state ..dummy_host expected_module)) + (try.else false))) + )) )) (_.for [/.Buffer] (all _.and diff --git a/stdlib/source/test/lux/meta/compiler/meta/archive/artifact.lux b/stdlib/source/test/lux/meta/compiler/meta/archive/artifact.lux index bfd6c978e..b233a404b 100644 --- a/stdlib/source/test/lux/meta/compiler/meta/archive/artifact.lux +++ b/stdlib/source/test/lux/meta/compiler/meta/archive/artifact.lux @@ -2,8 +2,8 @@ [library [lux (.except) [abstract - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [math ["[0]" random (.only Random)]] [test @@ -27,7 +27,7 @@ (_.for [/.Artifact /.ID]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) /category.test ))) diff --git a/stdlib/source/test/lux/meta/compiler/meta/archive/artifact/category.lux b/stdlib/source/test/lux/meta/compiler/meta/archive/artifact/category.lux index 87220c0fd..c452662f9 100644 --- a/stdlib/source/test/lux/meta/compiler/meta/archive/artifact/category.lux +++ b/stdlib/source/test/lux/meta/compiler/meta/archive/artifact/category.lux @@ -2,8 +2,8 @@ [library [lux (.except) [abstract - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [math ["[0]" random (.only Random) (.use "[1]#[0]" monad)]] [test @@ -41,5 +41,5 @@ (_.for [/.Category]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) ))) diff --git a/stdlib/source/test/lux/meta/compiler/meta/archive/module/descriptor.lux b/stdlib/source/test/lux/meta/compiler/meta/archive/module/descriptor.lux index 568a27af3..0d7fbae91 100644 --- a/stdlib/source/test/lux/meta/compiler/meta/archive/module/descriptor.lux +++ b/stdlib/source/test/lux/meta/compiler/meta/archive/module/descriptor.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" try (.use "[1]#[0]" functor)]] [data @@ -45,7 +45,7 @@ [expected (..random 5)]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence (..random 1))) + (equivalenceT.spec /.equivalence (..random 1))) (_.for [/.Module] (_.coverage [/.runtime] diff --git a/stdlib/source/test/lux/meta/compiler/meta/archive/signature.lux b/stdlib/source/test/lux/meta/compiler/meta/archive/signature.lux index d8faf1590..2df2ec6cf 100644 --- a/stdlib/source/test/lux/meta/compiler/meta/archive/signature.lux +++ b/stdlib/source/test/lux/meta/compiler/meta/archive/signature.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" try (.use "[1]#[0]" functor)]] [data @@ -37,7 +37,7 @@ (_.for [/.Signature]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (do random.monad [left ..random diff --git a/stdlib/source/test/lux/meta/compiler/meta/archive/unit.lux b/stdlib/source/test/lux/meta/compiler/meta/archive/unit.lux index 21e04fb85..3381e5872 100644 --- a/stdlib/source/test/lux/meta/compiler/meta/archive/unit.lux +++ b/stdlib/source/test/lux/meta/compiler/meta/archive/unit.lux @@ -2,8 +2,9 @@ [library [lux (.except) [abstract + ["[0]" equivalence + ["[1]T" \\test]] [\\specification - ["$[0]" equivalence] ["$[0]" hash]]] [data [collection @@ -28,7 +29,7 @@ (_.for [/.ID]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.hash] ($hash.spec /.hash ..random)) diff --git a/stdlib/source/test/lux/meta/compiler/meta/cli/compiler.lux b/stdlib/source/test/lux/meta/compiler/meta/cli/compiler.lux index 20084da59..9787f26ca 100644 --- a/stdlib/source/test/lux/meta/compiler/meta/cli/compiler.lux +++ b/stdlib/source/test/lux/meta/compiler/meta/cli/compiler.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" try (.use "[1]#[0]" functor)]] [data @@ -39,7 +39,7 @@ [expected ..random] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.coverage [/.format /.parser] (|> expected diff --git a/stdlib/source/test/lux/meta/compiler/reference.lux b/stdlib/source/test/lux/meta/compiler/reference.lux index 49bd3415c..145230014 100644 --- a/stdlib/source/test/lux/meta/compiler/reference.lux +++ b/stdlib/source/test/lux/meta/compiler/reference.lux @@ -3,8 +3,9 @@ [lux (.except) [abstract [monad (.only do)] + ["[0]" equivalence + ["[1]T" \\test]] [\\specification - ["$[0]" equivalence] ["$[0]" hash]]] [data ["[0]" text (.use "[1]#[0]" equivalence) @@ -40,13 +41,16 @@ (def .public test Test (<| (_.covering /._) - (_.for [/.Reference /.Constant]) + (_.for [/.Reference + /.#Constant /.#Variable + + /.Constant]) (do random.monad [expected_register random.nat expected_constant ..constant]) (`` (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.hash] ($hash.spec /.hash ..random)) diff --git a/stdlib/source/test/lux/meta/compiler/reference/variable.lux b/stdlib/source/test/lux/meta/compiler/reference/variable.lux index 9fe14eec1..b25c0e755 100644 --- a/stdlib/source/test/lux/meta/compiler/reference/variable.lux +++ b/stdlib/source/test/lux/meta/compiler/reference/variable.lux @@ -3,8 +3,9 @@ [lux (.except) [abstract [monad (.only do)] + ["[0]" equivalence + ["[1]T" \\test]] [\\specification - ["$[0]" equivalence] ["$[0]" hash]]] [data ["[0]" text (.use "[1]#[0]" equivalence)]] @@ -25,14 +26,16 @@ (def .public test Test (<| (_.covering /._) - (_.for [/.Variable]) + (_.for [/.Variable + /.#Local /.#Foreign]) (do [! random.monad] [register random.nat] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.hash] ($hash.spec /.hash ..random)) + (_.coverage [/.self] (when (/.self) (/.self) true diff --git a/stdlib/source/test/lux/meta/configuration.lux b/stdlib/source/test/lux/meta/configuration.lux index b505f54d4..d69a1b339 100644 --- a/stdlib/source/test/lux/meta/configuration.lux +++ b/stdlib/source/test/lux/meta/configuration.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" monoid ["[1]T" \\test]]] [control @@ -57,7 +57,7 @@ [expected (..random 5)] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence (..random 5))) + (equivalenceT.spec /.equivalence (..random 5))) (_.for [/.monoid] (monoidT.spec /.equivalence /.monoid (..random 5))) diff --git a/stdlib/source/test/lux/meta/location.lux b/stdlib/source/test/lux/meta/location.lux index c9f60cbfa..f25e08ccf 100644 --- a/stdlib/source/test/lux/meta/location.lux +++ b/stdlib/source/test/lux/meta/location.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [data ["[0]" text]] [math @@ -30,7 +30,7 @@ (_.for [.Location]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.coverage [/.here] (not (of /.equivalence = (/.here) (/.here)))) diff --git a/stdlib/source/test/lux/meta/macro.lux b/stdlib/source/test/lux/meta/macro.lux index e00266211..22b727c45 100644 --- a/stdlib/source/test/lux/meta/macro.lux +++ b/stdlib/source/test/lux/meta/macro.lux @@ -46,8 +46,8 @@ (def !global (template (_ <definition>) - [(is [Text .Global] - [(template.text [<definition>]) {.#Definition [true .Macro <definition>]}])])) + [(is [Text [Bit .Global]] + [(template.text [<definition>]) [true {.#Definition [.Macro <definition>]}]])])) (def pow/2 (syntax (_ [number <code>.any]) @@ -87,7 +87,7 @@ .#modules (list [macro_module [.#module_hash 0 .#module_aliases (list) - .#definitions (is (List [Text .Global]) + .#definitions (is (List [Text [Bit .Global]]) (list (!global expansion.log_single!) (!global expansion.log_complete!) (!global expansion.log_total!))) @@ -96,7 +96,7 @@ [current_module [.#module_hash 0 .#module_aliases (list) - .#definitions (is (List [Text .Global]) + .#definitions (is (List [Text [Bit .Global]]) (list (!global ..pow/2) (!global ..pow/4) (!global ..repeated))) diff --git a/stdlib/source/test/lux/meta/macro/context.lux b/stdlib/source/test/lux/meta/macro/context.lux index 49ebbe6db..bdf896ee7 100644 --- a/stdlib/source/test/lux/meta/macro/context.lux +++ b/stdlib/source/test/lux/meta/macro/context.lux @@ -37,7 +37,11 @@ (template.with_locals [<real_stack>' <real_expression> <real_declaration> <fake_stack>' <fake_expression> <fake_declaration>] - (these (/.def [<real_stack>' <real_expression> <real_declaration>] Nat) + (these (/.def + [<real_stack>'] + [<real_expression>] + [<real_declaration>] + Nat) (with_expansions [<real_stack> (template.symbol [.._] [<real_stack>']) <fake_stack> (template.symbol [.._] [<fake_stack>'])] diff --git a/stdlib/source/test/lux/meta/macro/syntax/check.lux b/stdlib/source/test/lux/meta/macro/syntax/check.lux index aac4bc781..623b944b8 100644 --- a/stdlib/source/test/lux/meta/macro/syntax/check.lux +++ b/stdlib/source/test/lux/meta/macro/syntax/check.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["<>" parser] ["[0]" try]] @@ -33,7 +33,7 @@ (_.for [/.Check]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (do random.monad [[type value] ..random] diff --git a/stdlib/source/test/lux/meta/macro/syntax/declaration.lux b/stdlib/source/test/lux/meta/macro/syntax/declaration.lux index d92609804..5c313c2df 100644 --- a/stdlib/source/test/lux/meta/macro/syntax/declaration.lux +++ b/stdlib/source/test/lux/meta/macro/syntax/declaration.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" try]] [math @@ -35,7 +35,7 @@ (_.for [/.Declaration]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (do random.monad [expected ..random] diff --git a/stdlib/source/test/lux/meta/macro/syntax/definition.lux b/stdlib/source/test/lux/meta/macro/syntax/definition.lux index 34289885d..3a7dac855 100644 --- a/stdlib/source/test/lux/meta/macro/syntax/definition.lux +++ b/stdlib/source/test/lux/meta/macro/syntax/definition.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["<>" parser] ["[0]" try] @@ -59,7 +59,7 @@ (_.for [/.Definition]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (do random.monad [expected ..random diff --git a/stdlib/source/test/lux/meta/macro/syntax/export.lux b/stdlib/source/test/lux/meta/macro/syntax/export.lux index e56294445..888e85c6b 100644 --- a/stdlib/source/test/lux/meta/macro/syntax/export.lux +++ b/stdlib/source/test/lux/meta/macro/syntax/export.lux @@ -31,14 +31,14 @@ (<| (_.covering /._) (do random.monad [[expected_export_policy expected_un_exported] ..export] - (_.coverage [/.parser /.default] + (_.coverage [/.with /.default] (|> (when expected_export_policy {.#Some expected_export_policy} (list expected_export_policy (code.nat expected_un_exported)) {.#None} (list (code.nat expected_un_exported))) - (<code>.result (/.parser <code>.nat)) + (<code>.result (/.with <code>.nat)) (try#each (function (_ [actual_export_policy actual_un_exported]) (|> expected_export_policy (maybe.else /.default) diff --git a/stdlib/source/test/lux/meta/macro/syntax/input.lux b/stdlib/source/test/lux/meta/macro/syntax/input.lux index e623431df..cbd57d603 100644 --- a/stdlib/source/test/lux/meta/macro/syntax/input.lux +++ b/stdlib/source/test/lux/meta/macro/syntax/input.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" try]] [data @@ -37,7 +37,7 @@ (_.for [/.Input]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (do random.monad [expected ..random] diff --git a/stdlib/source/test/lux/meta/macro/syntax/type/variable.lux b/stdlib/source/test/lux/meta/macro/syntax/type/variable.lux index 45356cb5a..2df5cdd90 100644 --- a/stdlib/source/test/lux/meta/macro/syntax/type/variable.lux +++ b/stdlib/source/test/lux/meta/macro/syntax/type/variable.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" try (.use "[1]#[0]" functor)]] [math @@ -27,7 +27,7 @@ (_.for [/.Variable]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (do random.monad [expected ..random] diff --git a/stdlib/source/test/lux/meta/symbol.lux b/stdlib/source/test/lux/meta/symbol.lux index 9751bc770..430217ed4 100644 --- a/stdlib/source/test/lux/meta/symbol.lux +++ b/stdlib/source/test/lux/meta/symbol.lux @@ -4,10 +4,11 @@ [abstract [monad (.only do)] [\\specification - ["$[0]" equivalence] ["$[0]" hash]] ["[0]" codec ["[1]T" \\test]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" order ["[1]T" \\test]]] [data @@ -44,7 +45,7 @@ (_.for [.Symbol] (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence (..random sizeM1 sizeS1))) + (equivalenceT.spec /.equivalence (..random sizeM1 sizeS1))) (_.for [/.hash] (|> (random.ascii 1) (of ! each (|>> [""])) diff --git a/stdlib/source/test/lux/meta/target/lua.lux b/stdlib/source/test/lux/meta/target/lua.lux index 967f1a9f3..68012d0a8 100644 --- a/stdlib/source/test/lux/meta/target/lua.lux +++ b/stdlib/source/test/lux/meta/target/lua.lux @@ -5,8 +5,9 @@ [abstract [monad (.only do)] [\\specification - ["$[0]" equivalence] - ["$[0]" hash]]] + ["$[0]" hash]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" pipe] ["[0]" function] @@ -710,7 +711,7 @@ (_.for [/.Code /.code]) (`` (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence random)) + (equivalenceT.spec /.equivalence random)) (_.for [/.hash] ($hash.spec /.hash random)) diff --git a/stdlib/source/test/lux/meta/target/python.lux b/stdlib/source/test/lux/meta/target/python.lux index 3e0beef03..9d7e28a49 100644 --- a/stdlib/source/test/lux/meta/target/python.lux +++ b/stdlib/source/test/lux/meta/target/python.lux @@ -5,8 +5,9 @@ [abstract [monad (.only do)] [\\specification - ["$[0]" equivalence] - ["$[0]" hash]]] + ["$[0]" hash]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" maybe (.use "[1]#[0]" functor)] ["[0]" try (.only Try) (.use "[1]#[0]" functor)] @@ -828,7 +829,7 @@ (_.for [/.Code]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random_expression)) + (equivalenceT.spec /.equivalence ..random_expression)) (_.for [/.hash] ($hash.spec /.hash ..random_expression)) diff --git a/stdlib/source/test/lux/meta/target/ruby.lux b/stdlib/source/test/lux/meta/target/ruby.lux index 77cc6fa30..900e630e7 100644 --- a/stdlib/source/test/lux/meta/target/ruby.lux +++ b/stdlib/source/test/lux/meta/target/ruby.lux @@ -2,12 +2,11 @@ [library [lux (.except) ["[0]" ffi] - ["[0]" debug] [abstract [monad (.only do)] ["[0]" predicate] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" pipe] ["[0]" maybe (.use "[1]#[0]" functor)] @@ -1050,7 +1049,7 @@ (_.for [/.Code]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random_expression)) + (equivalenceT.spec /.equivalence ..random_expression)) (_.coverage [/.code /.manual] (|> (/.manual (/.code expected)) diff --git a/stdlib/source/test/lux/meta/type.lux b/stdlib/source/test/lux/meta/type.lux index 21d6d1d8e..949a46d68 100644 --- a/stdlib/source/test/lux/meta/type.lux +++ b/stdlib/source/test/lux/meta/type.lux @@ -3,8 +3,8 @@ [lux (.except symbol) [abstract ["[0]" monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["<>" parser] ["[0]" pipe] @@ -384,7 +384,7 @@ (<| (_.covering /._) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence (..random 0))) + (equivalenceT.spec /.equivalence (..random 0))) (do [! random.monad] [anonymousT (random.only (|>> (pipe.when {.#Named _ _} false diff --git a/stdlib/source/test/lux/meta/type/quotient.lux b/stdlib/source/test/lux/meta/type/quotient.lux index cc4981b31..d99d40cc5 100644 --- a/stdlib/source/test/lux/meta/type/quotient.lux +++ b/stdlib/source/test/lux/meta/type/quotient.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract ["[0]" monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [data ["[0]" text (.use "[1]#[0]" equivalence) ["%" \\format (.only format)]]] @@ -37,7 +37,7 @@ value random.nat] (all _.and (_.for [/.equivalence] - ($equivalence.spec (/.equivalence text.equivalence) + (equivalenceT.spec (/.equivalence text.equivalence) (..random (/.class class) random.nat))) (_.for [/.Class] diff --git a/stdlib/source/test/lux/meta/type/unit.lux b/stdlib/source/test/lux/meta/type/unit.lux index 0a9979c03..074b2fb20 100644 --- a/stdlib/source/test/lux/meta/type/unit.lux +++ b/stdlib/source/test/lux/meta/type/unit.lux @@ -4,10 +4,10 @@ [abstract [monad (.only do)] [equivalence (.only Equivalence)] - [\\specification - ["$[0]" equivalence]] ["[0]" enum ["[1]T" \\test]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" order ["[1]T" \\test]]] [data @@ -43,7 +43,7 @@ Test (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence (..meter 1,000))) + (equivalenceT.spec /.equivalence (..meter 1,000))) (_.for [/.order] (orderT.spec /.order (..meter 1,000))) (_.for [/.enum] diff --git a/stdlib/source/test/lux/world/finance/market/price.lux b/stdlib/source/test/lux/world/finance/market/price.lux index d5b8232b5..28c0db1f5 100644 --- a/stdlib/source/test/lux/world/finance/market/price.lux +++ b/stdlib/source/test/lux/world/finance/market/price.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["[0]S" equivalence]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" order ["[1]T" \\test]]] [control @@ -43,7 +43,7 @@ (_.for [/.Price /.Action]) (all _.and (_.for [/.equivalence /.=] - (equivalenceS.spec /.equivalence (..random currency.usd))) + (equivalenceT.spec /.equivalence (..random currency.usd))) (_.for [/.order /.<] (orderT.spec /.order (..random currency.usd))) diff --git a/stdlib/source/test/lux/world/finance/money.lux b/stdlib/source/test/lux/world/finance/money.lux index dd5108cac..872414dbf 100644 --- a/stdlib/source/test/lux/world/finance/money.lux +++ b/stdlib/source/test/lux/world/finance/money.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["[0]S" equivalence]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" order ["[1]T" \\test]]] [control @@ -46,7 +46,7 @@ (_.for [/.Money]) (all _.and (_.for [/.equivalence /.=] - (equivalenceS.spec /.equivalence (..random currency.usd 1000,00))) + (equivalenceT.spec /.equivalence (..random currency.usd 1000,00))) (_.for [/.order /.<] (orderT.spec /.order (..random currency.usd 1000,00))) diff --git a/stdlib/source/test/lux/world/finance/money/currency.lux b/stdlib/source/test/lux/world/finance/money/currency.lux index eeb59e9fc..8bc474b4e 100644 --- a/stdlib/source/test/lux/world/finance/money/currency.lux +++ b/stdlib/source/test/lux/world/finance/money/currency.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["[0]S" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [data ["[0]" text] [collection @@ -217,7 +217,7 @@ (_.for [/.Currency]) (all _.and (_.for [/.equivalence] - (equivalenceS.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (with_expansions [<shorts> (with_template [<short> <type> <long>] [<short>] diff --git a/stdlib/source/test/lux/world/finance/trade/session.lux b/stdlib/source/test/lux/world/finance/trade/session.lux index 6c8be3332..1356e040b 100644 --- a/stdlib/source/test/lux/world/finance/trade/session.lux +++ b/stdlib/source/test/lux/world/finance/trade/session.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["[0]S" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [data ["[0]" bit (.use "[1]#[0]" equivalence)] ["[0]" text (.use "[1]#[0]" equivalence)] @@ -60,7 +60,7 @@ /.#open /.#high /.#low /.#close /.#volume]) (all _.and (_.for [/.equivalence] - (equivalenceS.spec /.equivalence (..random currency.usd 1000,00))) + (equivalenceT.spec /.equivalence (..random currency.usd 1000,00))) (_.coverage [/.composite] (let [both (/.composite before after)] diff --git a/stdlib/source/test/lux/world/locale.lux b/stdlib/source/test/lux/world/locale.lux index 57ae892a0..92510dd26 100644 --- a/stdlib/source/test/lux/world/locale.lux +++ b/stdlib/source/test/lux/world/locale.lux @@ -4,8 +4,9 @@ [abstract [monad (.only do)] [\\specification - ["$[0]" equivalence] - ["$[0]" hash]]] + ["$[0]" hash]] + ["[0]" equivalence + ["[1]T" \\test]]] [math ["[0]" random (.only Random) (.use "[1]#[0]" monad)]] [data @@ -52,7 +53,7 @@ (_.for [/.Locale]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random_locale)) + (equivalenceT.spec /.equivalence ..random_locale)) (_.for [/.hash] (do [! random.monad] [fixed_language ..random_language diff --git a/stdlib/source/test/lux/world/net/http/cookie.lux b/stdlib/source/test/lux/world/net/http/cookie.lux index 057da292b..ac1f9629a 100644 --- a/stdlib/source/test/lux/world/net/http/cookie.lux +++ b/stdlib/source/test/lux/world/net/http/cookie.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract ["[0]" monad (.only do)] - [\\specification - ["[0]S" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["|" pipe] ["[0]" try (.use "[1]#[0]" functor)]] @@ -53,7 +53,7 @@ (_.for [/.Cookie /.#name /.#in /.#out]) (all _.and (_.for [/.equivalence] - (equivalenceS.spec /.equivalence (..random (list [cookie (random.lower_cased 1)])))) + (equivalenceT.spec /.equivalence (..random (list [cookie (random.lower_cased 1)])))) (_.for [/.Jar] (all _.and (_.coverage [/.empty] diff --git a/stdlib/source/test/lux/world/net/http/version.lux b/stdlib/source/test/lux/world/net/http/version.lux index 0aa682b1a..5891f3768 100644 --- a/stdlib/source/test/lux/world/net/http/version.lux +++ b/stdlib/source/test/lux/world/net/http/version.lux @@ -4,8 +4,9 @@ [abstract [monad (.only do)] [\\specification - ["$[0]" equivalence] - ["$[0]" hash]]] + ["$[0]" hash]] + ["[0]" equivalence + ["[1]T" \\test]]] [data [collection ["[0]" list] @@ -36,7 +37,7 @@ (_.for [/.Version]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.hash] ($hash.spec /.hash ..random)) diff --git a/stdlib/source/test/lux/world/net/mime.lux b/stdlib/source/test/lux/world/net/mime.lux index 30b34affc..18f6521c1 100644 --- a/stdlib/source/test/lux/world/net/mime.lux +++ b/stdlib/source/test/lux/world/net/mime.lux @@ -3,8 +3,9 @@ [lux (.except) [abstract [monad (.only do)] + ["[0]" equivalence + ["[1]T" \\test]] [\\specification - ["[0]S" equivalence] ["[0]S" hash]]] [data ["[0]" text (.only) @@ -157,7 +158,7 @@ (_.for [/.MIME]) (all _.and (_.for [/.equivalence] - (equivalenceS.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.hash] (hashS.spec /.hash ..random)) diff --git a/stdlib/source/test/lux/world/net/uri/query.lux b/stdlib/source/test/lux/world/net/uri/query.lux index 4ac981426..dd48316e2 100644 --- a/stdlib/source/test/lux/world/net/uri/query.lux +++ b/stdlib/source/test/lux/world/net/uri/query.lux @@ -3,8 +3,8 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["[0]S" equivalence]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" codec ["[1]T" \\test]]] [data @@ -35,7 +35,7 @@ (_.for [/.Query]) (all _.and (_.for [/.equivalence] - (equivalenceS.spec /.equivalence (..random 2))) + (equivalenceT.spec /.equivalence (..random 2))) (_.for [/.codec] (codecT.spec /.equivalence /.codec (..random 3))) diff --git a/stdlib/source/test/lux/world/net/uri/scheme.lux b/stdlib/source/test/lux/world/net/uri/scheme.lux index 66d51ea0d..200b0fce5 100644 --- a/stdlib/source/test/lux/world/net/uri/scheme.lux +++ b/stdlib/source/test/lux/world/net/uri/scheme.lux @@ -4,8 +4,9 @@ [abstract [monad (.only do)] [\\specification - ["$[0]" equivalence] - ["$[0]" hash]]] + ["$[0]" hash]] + ["[0]" equivalence + ["[1]T" \\test]]] [data [collection ["[0]" list] @@ -58,7 +59,7 @@ (_.for [/.Scheme]) (`` (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.hash] ($hash.spec /.hash ..random)) diff --git a/stdlib/source/test/lux/world/output/video/resolution.lux b/stdlib/source/test/lux/world/output/video/resolution.lux index 4123a0b7d..c05173d2a 100644 --- a/stdlib/source/test/lux/world/output/video/resolution.lux +++ b/stdlib/source/test/lux/world/output/video/resolution.lux @@ -4,8 +4,9 @@ [abstract [monad (.only do)] [\\specification - ["$[0]" equivalence] - ["$[0]" hash]]] + ["$[0]" hash]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["[0]" maybe]] [data @@ -57,7 +58,7 @@ (_.for [/.Resolution]) (`` (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.hash] ($hash.spec /.hash ..random)) diff --git a/stdlib/source/test/lux/world/shell.lux b/stdlib/source/test/lux/world/shell.lux index 03dff9dba..12788d7b2 100644 --- a/stdlib/source/test/lux/world/shell.lux +++ b/stdlib/source/test/lux/world/shell.lux @@ -86,7 +86,10 @@ Test (<| (_.covering /._) (all _.and - (_.for [/.async /.mock /.Mock] + (_.for [/.Mock /.mock + /.on_read /.on_fail /.on_write /.on_destroy /.on_await + + /.async] ($/.spec (/.async (/.mock (|>> ..mock {try.#Success}) false)))) (_.coverage [/.error] diff --git a/stdlib/source/test/lux/world/time.lux b/stdlib/source/test/lux/world/time.lux index bc049bc44..44f9bee82 100644 --- a/stdlib/source/test/lux/world/time.lux +++ b/stdlib/source/test/lux/world/time.lux @@ -3,12 +3,12 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]] ["[0]" enum ["[1]T" \\test]] ["[0]" codec ["[1]T" \\test]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" order ["[1]T" \\test]]] [control @@ -42,7 +42,7 @@ Test (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence random.time)) + (equivalenceT.spec /.equivalence random.time)) (_.for [/.order] (orderT.spec /.order random.time)) (_.for [/.enum] diff --git a/stdlib/source/test/lux/world/time/date.lux b/stdlib/source/test/lux/world/time/date.lux index 306b3e252..4e9fa5c0a 100644 --- a/stdlib/source/test/lux/world/time/date.lux +++ b/stdlib/source/test/lux/world/time/date.lux @@ -3,12 +3,12 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]] ["[0]" enum ["[1]T" \\test]] ["[0]" codec ["[1]T" \\test]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" order ["[1]T" \\test]]] [control @@ -34,7 +34,7 @@ (_.for [/.Date]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence random.date)) + (equivalenceT.spec /.equivalence random.date)) (_.for [/.order] (orderT.spec /.order random.date)) (_.for [/.enum] diff --git a/stdlib/source/test/lux/world/time/day.lux b/stdlib/source/test/lux/world/time/day.lux index d0ac6f1d6..be1812d92 100644 --- a/stdlib/source/test/lux/world/time/day.lux +++ b/stdlib/source/test/lux/world/time/day.lux @@ -4,12 +4,13 @@ [abstract [monad (.only do)] [\\specification - ["$[0]" equivalence] ["$[0]" hash]] ["[0]" enum ["[1]T" \\test]] ["[0]" codec ["[1]T" \\test]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" order ["[1]T" \\test]]] [control @@ -51,7 +52,7 @@ random.nat)]) (`` (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.hash] ($hash.spec /.hash ..random)) (_.for [/.order] diff --git a/stdlib/source/test/lux/world/time/duration.lux b/stdlib/source/test/lux/world/time/duration.lux index 7900331b8..e38755dc0 100644 --- a/stdlib/source/test/lux/world/time/duration.lux +++ b/stdlib/source/test/lux/world/time/duration.lux @@ -3,12 +3,12 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]] ["[0]" enum ["[1]T" \\test]] ["[0]" codec ["[1]T" \\test]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" order ["[1]T" \\test]] ["[0]" monoid @@ -31,7 +31,7 @@ (_.for [/.Duration]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence random.duration)) + (equivalenceT.spec /.equivalence random.duration)) (_.for [/.order] (orderT.spec /.order random.duration)) (_.for [/.enum] diff --git a/stdlib/source/test/lux/world/time/instant.lux b/stdlib/source/test/lux/world/time/instant.lux index 03abc29c7..889cfa612 100644 --- a/stdlib/source/test/lux/world/time/instant.lux +++ b/stdlib/source/test/lux/world/time/instant.lux @@ -4,12 +4,13 @@ [abstract [monad (.only do)] [\\specification - ["$[0]" equivalence] ["$[0]" hash]] ["[0]" enum ["[1]T" \\test]] ["[0]" codec ["[1]T" \\test]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" order ["[1]T" \\test]]] [control @@ -37,7 +38,7 @@ (_.for [/.Instant]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence random.instant)) + (equivalenceT.spec /.equivalence random.instant)) (_.for [/.hash] ($hash.spec /.hash random.instant)) (_.for [/.order] diff --git a/stdlib/source/test/lux/world/time/month.lux b/stdlib/source/test/lux/world/time/month.lux index 9d1f05ab6..29cb2d725 100644 --- a/stdlib/source/test/lux/world/time/month.lux +++ b/stdlib/source/test/lux/world/time/month.lux @@ -4,12 +4,13 @@ [abstract [monad (.only do)] [\\specification - ["$[0]" equivalence] ["$[0]" hash]] ["[0]" enum ["[1]T" \\test]] ["[0]" codec ["[1]T" \\test]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" order ["[1]T" \\test]]] [control @@ -45,7 +46,7 @@ (_.for [/.Month]) (`` (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.hash] ($hash.spec /.hash ..random)) (_.for [/.order] diff --git a/stdlib/source/test/lux/world/time/series.lux b/stdlib/source/test/lux/world/time/series.lux index a43c1b682..26ca412de 100644 --- a/stdlib/source/test/lux/world/time/series.lux +++ b/stdlib/source/test/lux/world/time/series.lux @@ -7,8 +7,8 @@ ["[1]T" \\test (.only Injection)]] ["[0]" mix ["[1]T" \\test]] - [\\specification - ["[0]S" equivalence]]] + ["[0]" equivalence + ["[1]T" \\test]]] [control ["|" pipe] ["[0]" try (.use "[1]#[0]" functor)] @@ -77,7 +77,7 @@ /.#start /.#interval /.#data]) (`` (all _.and (_.for [/.equivalence] - (equivalenceS.spec (/.equivalence n.equivalence) (..random expected_size random.nat))) + (equivalenceT.spec (/.equivalence n.equivalence) (..random expected_size random.nat))) (_.for [/.mix] (mixT.spec (..injection expected_start expected_interval) /.equivalence /.mix)) (_.for [/.functor] diff --git a/stdlib/source/test/lux/world/time/solar.lux b/stdlib/source/test/lux/world/time/solar.lux index 5ffe2f1bd..069470205 100644 --- a/stdlib/source/test/lux/world/time/solar.lux +++ b/stdlib/source/test/lux/world/time/solar.lux @@ -2,9 +2,7 @@ [library [lux (.except) [abstract - [monad (.only do)] - [\\specification - ["$[0]" equivalence]]] + [monad (.only do)]] [control ["[0]" try] ["[0]" exception] diff --git a/stdlib/source/test/lux/world/time/year.lux b/stdlib/source/test/lux/world/time/year.lux index fc8504e80..c3ad7a790 100644 --- a/stdlib/source/test/lux/world/time/year.lux +++ b/stdlib/source/test/lux/world/time/year.lux @@ -3,10 +3,10 @@ [lux (.except) [abstract [monad (.only do)] - [\\specification - ["$[0]" equivalence]] ["[0]" codec ["[1]T" \\test]] + ["[0]" equivalence + ["[1]T" \\test]] ["[0]" order ["[1]T" \\test]]] [control @@ -40,7 +40,7 @@ (_.for [/.Year]) (all _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (equivalenceT.spec /.equivalence ..random)) (_.for [/.order] (orderT.spec /.order ..random)) (_.for [/.codec /.parser] |