diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/test/lux/meta/type.lux | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/stdlib/source/test/lux/meta/type.lux b/stdlib/source/test/lux/meta/type.lux index 50cccc419..8c7e6cd9c 100644 --- a/stdlib/source/test/lux/meta/type.lux +++ b/stdlib/source/test/lux/meta/type.lux @@ -33,7 +33,7 @@ [\\library ["[0]" / (.use "[1]#[0]" equivalence)]] ["[0]" / - ["[1][0]" primitive] + ["[1][0]" nominal] ["[1][0]" check] ["[1][0]" dynamic] ["[1][0]" implicit] @@ -54,19 +54,19 @@ _ false)])) -(def primitive +(def nominal (Random Type) (|> (random.alpha_numeric 1) (at random.monad each (function (_ name) - {.#Primitive name (list)})))) + {.#Nominal name (list)})))) (def test|matches Test (<| (_.for [\\parser.types_do_not_match]) (do [! random.monad] - [expected ..primitive + [expected ..nominal dummy (random.only (|>> (/#= expected) not) - ..primitive)]) + ..nominal)]) (all _.and (_.coverage [\\parser.exactly] (and (|> (\\parser.result (\\parser.exactly expected) expected) @@ -99,9 +99,9 @@ (def test|aggregate Test (do [! random.monad] - [expected_left ..primitive - expected_middle ..primitive - expected_right ..primitive] + [expected_left ..nominal + expected_middle ..nominal + expected_right ..nominal] (`` (all _.and (,, (with_template [<parser> <exception> <good_constructor> <bad_constructor>] [(_.coverage [<parser> <exception>] @@ -147,9 +147,9 @@ (def test|parameter Test (do random.monad - [quantification ..primitive - argument ..primitive - not_parameter ..primitive + [quantification ..nominal + argument ..nominal + not_parameter ..nominal parameter random.nat] (all _.and (_.coverage [\\parser.not_parameter] @@ -208,7 +208,7 @@ (def test|polymorphic Test (do [! random.monad] - [not_polymorphic ..primitive + [not_polymorphic ..nominal expected_inputs (at ! each (|>> (n.% 10) ++) random.nat)] (all _.and (_.coverage [\\parser.not_polymorphic] @@ -231,7 +231,7 @@ (def test|recursive Test (do random.monad - [expected ..primitive] + [expected ..nominal] (all _.and (_.coverage [\\parser.recursive] (|> (.type_literal (Rec @ expected)) @@ -264,13 +264,13 @@ (_.for [\\parser.Parser]) (all _.and (do [! random.monad] - [expected ..primitive] + [expected ..nominal] (_.coverage [\\parser.result \\parser.any] (|> (\\parser.result \\parser.any expected) (!expect (^.multi {try.#Success actual} (/#= expected actual)))))) (do [! random.monad] - [expected ..primitive] + [expected ..nominal] (_.coverage [\\parser.next \\parser.unconsumed_input] (and (|> (\\parser.result (do <>.monad [actual \\parser.next @@ -283,7 +283,7 @@ (!expect (^.multi {try.#Failure error} (exception.match? \\parser.unconsumed_input error))))))) (do [! random.monad] - [expected ..primitive] + [expected ..nominal] (_.coverage [\\parser.empty_input] (`` (and (,, (with_template [<parser>] [(|> (\\parser.result (do <>.monad @@ -297,7 +297,7 @@ [\\parser.next] )))))) (do [! random.monad] - [expected ..primitive] + [expected ..nominal] (_.coverage [\\parser.Env \\parser.env \\parser.fresh] (|> (\\parser.result (do <>.monad [env \\parser.env @@ -307,9 +307,9 @@ (!expect (^.multi {try.#Success environment} (same? \\parser.fresh environment)))))) (do [! random.monad] - [expected ..primitive + [expected ..nominal dummy (random.only (|>> (/#= expected) not) - ..primitive)] + ..nominal)] (_.coverage [\\parser.local] (|> (\\parser.result (do <>.monad [_ \\parser.any] @@ -328,7 +328,7 @@ (do [! random.monad] [expected_name (random.and (random.alpha_numeric 1) (random.alpha_numeric 1)) - expected_type ..primitive] + expected_type ..nominal] (_.coverage [\\parser.named \\parser.not_named] (|> (\\parser.result \\parser.named {.#Named expected_name expected_type}) @@ -359,9 +359,9 @@ (let [pairG (random.and again again) un_parameterized (is (Random Type) (all random.either - (random#each (|>> {.#Primitive}) (random.and ..short (random.list 0 again))) - (random#each (|>> {.#Primitive}) (random.and ..short (random.list 1 again))) - (random#each (|>> {.#Primitive}) (random.and ..short (random.list 2 again))) + (random#each (|>> {.#Nominal}) (random.and ..short (random.list 0 again))) + (random#each (|>> {.#Nominal}) (random.and ..short (random.list 1 again))) + (random#each (|>> {.#Nominal}) (random.and ..short (random.list 2 again))) (random#each (|>> {.#Sum}) pairG) (random#each (|>> {.#Product}) pairG) (random#each (|>> {.#Function}) pairG) @@ -491,8 +491,8 @@ element_type (|> (..random 0) (random.only (function (_ type) (when type - {.#Primitive name (list element_type)} - (not (text#= array.primitive name)) + {.#Nominal name (list element_type)} + (not (text#= array.nominal name)) _ true)))) @@ -563,7 +563,7 @@ ..\\parser - /primitive.test + /nominal.test /check.test /dynamic.test /implicit.test |