aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux.lux
diff options
context:
space:
mode:
authorEduardo Julian2021-12-24 08:58:01 -0400
committerEduardo Julian2021-12-24 08:58:01 -0400
commit63b45e09c5f5ceb59a48ed05cdc2d2c6cb038a7b (patch)
tree22545f6a3a5d8ad3c3a8d59136e0de3d03c69218 /stdlib/source/test/lux.lux
parentfad9e5b073a9efe995421db1132f191f1db94725 (diff)
Dusting off the pure-Lux JVM compiler machinery.
Diffstat (limited to 'stdlib/source/test/lux.lux')
-rw-r--r--stdlib/source/test/lux.lux151
1 files changed, 75 insertions, 76 deletions
diff --git a/stdlib/source/test/lux.lux b/stdlib/source/test/lux.lux
index 7026c0a48..c200a0316 100644
--- a/stdlib/source/test/lux.lux
+++ b/stdlib/source/test/lux.lux
@@ -1,72 +1,71 @@
-(.with_expansions [<target>' (.for ["{old}" (.as_is ["[1]/[0]" jvm])
- "JVM" (.as_is ["[1]/[0]" jvm])]
- (.as_is))
- <target> <target>']
- (.using
- [library
- ["/" lux "*"
- [program {"+" program:}]
- ["_" test {"+" Test}]
- ["@" target]
- [abstract
- [monad {"+" do}]]
- [control
- ["[0]" io]
- ["[0]" maybe ("[1]#[0]" functor)]
- [concurrency
- ["[0]" atom {"+" Atom}]]
- [parser
- ["<[0]>" code]]]
- [data
- ["[0]" product]
- ["[0]" bit ("[1]#[0]" equivalence)]
- ["[0]" text ("[1]#[0]" equivalence)
- ["%" format {"+" format}]]
- [collection
- ["[0]" list ("[1]#[0]" functor)]
- ["[0]" set {"+" Set} ("[1]#[0]" equivalence)]
- [dictionary
- ["[0]" plist]]]]
- ["[0]" macro
- [syntax {"+" syntax:}]
- ["[0]" code ("[1]#[0]" equivalence)]
- ["[0]" template]]
- ["[0]" math
- ["[0]" random ("[1]#[0]" functor)]
- [number
- [i8 {"+"}]
- [i16 {"+"}]
- ["n" nat]
- ["i" int]
- ["r" rev]
- ["f" frac]
- ["[0]" i64]]]
- ["[0]" meta
- ["[0]" location ("[1]#[0]" equivalence)]]]]
- ... TODO: Must have 100% coverage on tests.
- ["[0]" / "_"
- ["[1][0]" abstract]
- ["[1][0]" control]
- ["[1][0]" data]
- ["[1][0]" debug]
- ["[1][0]" documentation]
- ["[1][0]" locale]
- ["[1][0]" macro
- ["[1]/[0]" code]]
- ["[1][0]" math]
- ["[1][0]" meta]
- ["[1][0]" program]
- ["[1][0]" static]
- ["[1][0]" target]
- ["[1][0]" test]
- ["[1][0]" time]
- ... ["[1][0]" tool] ... TODO: Update & expand tests for this
- ["[1][0]" type]
- ["[1][0]" world]
- ["[1][0]" ffi]
- ["[1][0]" extension]
- ["[1][0]" target "_"
- <target>]]))
+(.`` (.`` (.using
+ [library
+ ["/" lux "*"
+ [program {"+" program:}]
+ ["_" test {"+" Test}]
+ ["@" target]
+ [abstract
+ [monad {"+" do}]]
+ [control
+ ["[0]" io]
+ ["[0]" maybe ("[1]#[0]" functor)]
+ [concurrency
+ ["[0]" atom {"+" Atom}]]
+ [parser
+ ["<[0]>" code]]]
+ [data
+ ["[0]" product]
+ ["[0]" bit ("[1]#[0]" equivalence)]
+ ["[0]" text ("[1]#[0]" equivalence)
+ ["%" format {"+" format}]]
+ [collection
+ ["[0]" list ("[1]#[0]" functor)]
+ ["[0]" set {"+" Set} ("[1]#[0]" equivalence)]
+ [dictionary
+ ["[0]" plist]]]]
+ ["[0]" macro
+ [syntax {"+" syntax:}]
+ ["[0]" code ("[1]#[0]" equivalence)]
+ ["[0]" template]]
+ ["[0]" math
+ ["[0]" random ("[1]#[0]" functor)]
+ [number
+ [i8 {"+"}]
+ [i16 {"+"}]
+ ["n" nat]
+ ["i" int]
+ ["r" rev]
+ ["f" frac]
+ ["[0]" i64]]]
+ ["[0]" meta
+ ["[0]" location ("[1]#[0]" equivalence)]]]]
+ ... TODO: Must have 100% coverage on tests.
+ ["[0]" / "_"
+ ["[1][0]" abstract]
+ ["[1][0]" control]
+ ["[1][0]" data]
+ ["[1][0]" debug]
+ ["[1][0]" documentation]
+ ["[1][0]" locale]
+ ["[1][0]" macro
+ ["[1]/[0]" code]]
+ ["[1][0]" math]
+ ["[1][0]" meta]
+ ["[1][0]" program]
+ ["[1][0]" static]
+ ["[1][0]" target]
+ ["[1][0]" test]
+ ["[1][0]" time]
+ ... ["[1][0]" tool] ... TODO: Update & expand tests for this
+ ["[1][0]" type]
+ ["[1][0]" world]
+ ["[1][0]" ffi]
+ ["[1][0]" extension]
+ ["[1][0]" target "_"
+ (~~ (.for ["{old}" (~~ (.as_is ["[1]/[0]" jvm]))
+ "JVM" (~~ (.as_is ["[1]/[0]" jvm]))
+ "JavaScript" (~~ (.as_is ["[1]/[0]" js]))]
+ (~~ (.as_is))))]])))
... TODO: Get rid of this ASAP
(template: (!bundle body)
@@ -79,7 +78,8 @@
Test
(with_expansions [... TODO: Update & expand tests for this
<target> (for [@.jvm (~~ (as_is /target/jvm.test))
- @.old (~~ (as_is /target/jvm.test))]
+ @.old (~~ (as_is /target/jvm.test))
+ @.js (~~ (as_is /target/js.test))]
(~~ (as_is)))
<extension> (for [@.old (~~ (as_is))]
(~~ (as_is /extension.test)))]
@@ -865,12 +865,11 @@
(hide left))
true)))))
(_.cover [/.same?]
- (let [not_left (|> left ++ -- %.nat)
- left (%.nat left)]
- (and (and (/.same? left left)
- (/.same? not_left not_left))
- (and (text#= left not_left)
- (not (/.same? left not_left))))))
+ (let [not_left (atom.atom left)
+ left (atom.atom left)]
+ (and (/.same? left left)
+ (/.same? not_left not_left)
+ (not (/.same? left not_left)))))
(_.cover [/.Rec]
(let [list (: (/.Rec NList
(Maybe [Nat NList]))