diff options
author | Eduardo Julian | 2022-07-06 12:05:43 -0400 |
---|---|---|
committer | Eduardo Julian | 2022-07-06 12:05:43 -0400 |
commit | 0c32c7f03ad1f8f0db54b623dc407713bbf8cacd (patch) | |
tree | 59736e9e5f9f8cc94c0b46872f9e78575e45d8da /stdlib/source/test/lux/meta/compiler/reference/variable.lux | |
parent | 9a9b2493a8eda60f08809b4cb1e5bc49c5c3600c (diff) |
Moved compiler machinery under lux/meta.
Diffstat (limited to 'stdlib/source/test/lux/meta/compiler/reference/variable.lux')
-rw-r--r-- | stdlib/source/test/lux/meta/compiler/reference/variable.lux | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/stdlib/source/test/lux/meta/compiler/reference/variable.lux b/stdlib/source/test/lux/meta/compiler/reference/variable.lux new file mode 100644 index 000000000..f2b219b86 --- /dev/null +++ b/stdlib/source/test/lux/meta/compiler/reference/variable.lux @@ -0,0 +1,45 @@ +(.require + [library + [lux (.except) + ["_" test (.only Test)] + [abstract + [monad (.only do)] + [\\specification + ["$[0]" equivalence] + ["$[0]" hash]]] + [data + ["[0]" text (.use "[1]#[0]" equivalence)]] + [math + ["[0]" random (.only Random)]]]] + [\\library + ["[0]" /]]) + +(def .public random + (Random /.Variable) + (all random.or + random.nat + random.nat + )) + +(def .public test + Test + (<| (_.covering /._) + (_.for [/.Variable]) + (do [! random.monad] + [register random.nat] + (all _.and + (_.for [/.equivalence] + ($equivalence.spec /.equivalence ..random)) + (_.for [/.hash] + ($hash.spec /.hash ..random)) + (_.coverage [/.self] + (case (/.self) + (/.self) true + _ false)) + (_.coverage [/.self?] + (/.self? (/.self))) + (_.for [/.Register] + (_.coverage [/.format] + (not (text#= (/.format {/.#Local register}) + (/.format {/.#Foreign register}))))) + )))) |