diff options
author | Eduardo Julian | 2022-06-30 13:26:43 -0400 |
---|---|---|
committer | Eduardo Julian | 2022-06-30 13:26:43 -0400 |
commit | e853e9340d41724a86c9c0a837d86b2764bfcbab (patch) | |
tree | 1ea4cf881ef6ce6ab38b7ab556106be760a3c8d4 /stdlib/source/test/lux/type/unit.lux | |
parent | 664e02d1b5e5aa479869c4e17ec4128f5cfd04e2 (diff) |
Better naming for measure/quantity types.
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/test/lux/type/unit.lux | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/stdlib/source/test/lux/type/unit.lux b/stdlib/source/test/lux/type/unit.lux index 6835769ba..b52ddd921 100644 --- a/stdlib/source/test/lux/type/unit.lux +++ b/stdlib/source/test/lux/type/unit.lux @@ -20,7 +20,7 @@ (with_template [<name> <type> <unit>] [(def (<name> range) - (-> Nat (Random (/.Qty Any <type>))) + (-> Nat (Random (/.Measure Any <type>))) (|> random.int (at random.monad each (i.% (.int range))) (random.only (|>> (i.= +0) not)) @@ -62,15 +62,15 @@ [/.Litre /.litre] [/.Second /.second] )) - (_.coverage [/.quantity /.number] + (_.coverage [/.measure /.number] (|> expected - /.quantity + /.measure /.number (i.= expected))) (_.coverage [/.unit /.type] (|> expected (at ..what in) - (is (/.Qty Any What)) + (is (/.Measure Any What)) (at ..what out) (i.= expected))) ))))) @@ -79,7 +79,7 @@ Test (do random.monad [.let [zero (at /.meter in +0) - (open "meter#[0]") (is (Equivalence (/.Qty Any /.Meter)) + (open "meter#[0]") (is (Equivalence (/.Measure Any /.Meter)) /.equivalence)] left (random.only (|>> (meter#= zero) not) (..meter 1,000)) right (..meter 1,000) @@ -95,7 +95,7 @@ )) (_.coverage [/.*] (let [expected (i.* (at /.meter out left) (at /.meter out right)) - actual (/.number (is (/.Qty Any [/.Meter /.Meter]) + actual (/.number (is (/.Measure Any [/.Meter /.Meter]) (/.* left right)))] (i.= expected actual))) (_.coverage [/./] @@ -108,7 +108,7 @@ (def .public test Test (<| (_.covering /._) - (_.for [/.Qty]) + (_.for [/.Measure]) (all _.and ..polymorphism ..unit |