aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/test
diff options
context:
space:
mode:
authorEduardo Julian2019-04-26 21:37:40 -0400
committerEduardo Julian2019-04-26 21:37:40 -0400
commit084e3c400410e954b633a07c98f32ecfa62f1ec8 (patch)
tree724d80a027a8037698068971cd23d00b2042c287 /new-luxc/test
parente0b3538721a71f6e8c016b12c8c257b8cebd3981 (diff)
Ported reference tests.
Diffstat (limited to 'new-luxc/test')
-rw-r--r--new-luxc/test/test/luxc/lang/translation/reference.lux86
-rw-r--r--new-luxc/test/tests.lux28
2 files changed, 0 insertions, 114 deletions
diff --git a/new-luxc/test/test/luxc/lang/translation/reference.lux b/new-luxc/test/test/luxc/lang/translation/reference.lux
deleted file mode 100644
index 18205a560..000000000
--- a/new-luxc/test/test/luxc/lang/translation/reference.lux
+++ /dev/null
@@ -1,86 +0,0 @@
-(.module:
- [lux #*
- [control
- [monad (#+ do)]
- pipe]
- [data
- ["." number]]
- [compiler
- [default
- ["." reference]
- [phase
- ["." synthesis]]]]
- [math
- ["r" random (#+ Random)]]
- test]
- [test
- [luxc
- ["." common (#+ Runner Definer)]]]
- [//
- ["&" function]])
-
-(def: name
- (Random Name)
- (let [name-part (r.ascii/upper-alpha 5)]
- [(r.and name-part name-part)]))
-
-(def: (definitions-spec define)
- (-> Definer Test)
- (do r.Monad<Random>
- [name ..name
- value &.safe-frac]
- (test "Can refer to definitions."
- (|> (define name (synthesis.f64 value))
- (&.check value)))))
-
-(def: (variables-spec run)
- (-> Runner Test)
- (do r.Monad<Random>
- [register (|> r.nat (:: @ map (n/% 100)))
- value &.safe-frac]
- (test "Can refer to local variables/registers."
- (|> (run (synthesis.branch/let [(synthesis.f64 value)
- register
- (synthesis.variable/local register)]))
- (&.check value)))))
-
-(def: (references-spec run define)
- (-> Runner Definer Test)
- (seq (definitions-spec define)
- (variables-spec run)))
-
-(context: "[JVM] References."
- (<| (times 100)
- (references-spec common.run-jvm common.def-jvm)))
-
-## (context: "[JS] References."
-## (<| (times 100)
-## (references-spec common.run-js common.def-js)))
-
-## (context: "[Lua] References."
-## (<| (times 100)
-## (references-spec common.run-lua common.def-lua)))
-
-## (context: "[Ruby] References."
-## (<| (times 100)
-## (references-spec common.run-ruby common.def-ruby)))
-
-## (context: "[Python] References."
-## (<| (times 100)
-## (references-spec common.run-python common.def-python)))
-
-## (context: "[R] References."
-## (<| (times 100)
-## (references-spec common.run-r common.def-r)))
-
-## (context: "[Scheme] References."
-## (<| (times 100)
-## (references-spec common.run-scheme common.def-scheme)))
-
-## (context: "[Common Lisp] References."
-## (<| (times 100)
-## (references-spec common.run-common-lisp common.def-common-lisp)))
-
-## (context: "[PHP] References."
-## (<| (times 100)
-## (references-spec common.run-php common.def-php)))
diff --git a/new-luxc/test/tests.lux b/new-luxc/test/tests.lux
deleted file mode 100644
index 04362d4d1..000000000
--- a/new-luxc/test/tests.lux
+++ /dev/null
@@ -1,28 +0,0 @@
-(.module:
- [lux
- [cli (#+ program:)]
- ["." test]]
- [test
- [luxc
- [lang
- [translation
- ["_.T" primitive]
- ["_.T" structure]
- ["_.T" function]
- ["_.T" reference]
- ["_.T" case]
- ["_.T" common]
- ## ["_.T" jvm]
- ## ["_.T" js]
- ## ["_.T" lua]
- ## ["_.T" ruby]
- ## ["_.T" python]
- ## ["_.T" r]
- ## ["_.T" scheme]
- ## ["_.T" common-lisp]
- ## ["_.T" php]
- ]]]]
- )
-
-(program: args
- (test.run))