aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/test
diff options
context:
space:
mode:
authorEduardo Julian2018-04-14 02:02:13 -0400
committerEduardo Julian2018-04-14 02:02:13 -0400
commit4ef2dbc49cd6dae1b8235dfd13dcd298c8aa3bfe (patch)
treedb12bd62ab3e1c9767bfe43edc030e3bfc77ef95 /new-luxc/test
parentca238f9c89d3156842b0a3d5fe24a5d69b2eedb0 (diff)
- Initial R back-end implementation.
Diffstat (limited to 'new-luxc/test')
-rw-r--r--new-luxc/test/test/luxc/common.lux12
-rw-r--r--new-luxc/test/test/luxc/lang/translation/case.lux4
-rw-r--r--new-luxc/test/test/luxc/lang/translation/common.lux4
-rw-r--r--new-luxc/test/test/luxc/lang/translation/function.lux4
-rw-r--r--new-luxc/test/test/luxc/lang/translation/primitive.lux4
-rw-r--r--new-luxc/test/test/luxc/lang/translation/reference.lux10
-rw-r--r--new-luxc/test/test/luxc/lang/translation/structure.lux4
7 files changed, 39 insertions, 3 deletions
diff --git a/new-luxc/test/test/luxc/common.lux b/new-luxc/test/test/luxc/common.lux
index 49f294a68..7d4b156b8 100644
--- a/new-luxc/test/test/luxc/common.lux
+++ b/new-luxc/test/test/luxc/common.lux
@@ -33,7 +33,13 @@
(python [".T_python" expression]
[".T_python" eval]
[".T_python" runtime]
- [".T_python" statement])))))
+ [".T_python" statement])
+ [r]
+ (r [".T_r" expression]
+ [".T_r" eval]
+ [".T_r" runtime]
+ [".T_r" statement])
+ ))))
(type: #export Runner (-> Synthesis (e.Error Top)))
(type: #export Definer (-> Ident Synthesis (e.Error Top)))
@@ -50,6 +56,7 @@
[init-lua lua.init]
[init-ruby ruby.init]
[init-python python.init]
+ [init-r r.init]
)
(def: (runner translate-runtime translate-expression eval init)
@@ -92,3 +99,6 @@
(def: #export run-python (runner runtimeT_python.translate expressionT_python.translate evalT_python.eval init-python))
(def: #export def-python (definer runtimeT_python.translate expressionT_python.translate evalT_python.eval init-python statementT_python.translate-def))
+
+(def: #export run-r (runner runtimeT_r.translate expressionT_r.translate evalT_r.eval init-r))
+(def: #export def-r (definer runtimeT_r.translate expressionT_r.translate evalT_r.eval init-r statementT_r.translate-def))
diff --git a/new-luxc/test/test/luxc/lang/translation/case.lux b/new-luxc/test/test/luxc/lang/translation/case.lux
index ca960dba4..04a373e42 100644
--- a/new-luxc/test/test/luxc/lang/translation/case.lux
+++ b/new-luxc/test/test/luxc/lang/translation/case.lux
@@ -113,3 +113,7 @@
(context: "[Python] Function."
(<| (times +100)
(pattern-matching-spec run-python)))
+
+(context: "[R] Pattern-matching."
+ (<| (times +100)
+ (pattern-matching-spec run-r)))
diff --git a/new-luxc/test/test/luxc/lang/translation/common.lux b/new-luxc/test/test/luxc/lang/translation/common.lux
index 6de3ad822..e29931667 100644
--- a/new-luxc/test/test/luxc/lang/translation/common.lux
+++ b/new-luxc/test/test/luxc/lang/translation/common.lux
@@ -729,3 +729,7 @@
(context: "[Python] Common procedures."
(<| (times +100)
(all-specs run-python)))
+
+(context: "[R] Common procedures."
+ (<| (times +100)
+ (all-specs run-r)))
diff --git a/new-luxc/test/test/luxc/lang/translation/function.lux b/new-luxc/test/test/luxc/lang/translation/function.lux
index d7505bf37..105072df7 100644
--- a/new-luxc/test/test/luxc/lang/translation/function.lux
+++ b/new-luxc/test/test/luxc/lang/translation/function.lux
@@ -106,3 +106,7 @@
(context: "[Python] Function."
(<| (times +100)
(function-spec run-python)))
+
+(context: "[R] Function."
+ (<| (times +100)
+ (function-spec run-r)))
diff --git a/new-luxc/test/test/luxc/lang/translation/primitive.lux b/new-luxc/test/test/luxc/lang/translation/primitive.lux
index 6d74d4fca..d410f29f0 100644
--- a/new-luxc/test/test/luxc/lang/translation/primitive.lux
+++ b/new-luxc/test/test/luxc/lang/translation/primitive.lux
@@ -75,3 +75,7 @@
(context: "[Python] Primitives."
(<| (times +100)
(spec run-python)))
+
+(context: "[R] Primitives."
+ (<| (times +100)
+ (spec run-r)))
diff --git a/new-luxc/test/test/luxc/lang/translation/reference.lux b/new-luxc/test/test/luxc/lang/translation/reference.lux
index 3c2b66b2d..6f27b75f2 100644
--- a/new-luxc/test/test/luxc/lang/translation/reference.lux
+++ b/new-luxc/test/test/luxc/lang/translation/reference.lux
@@ -16,7 +16,8 @@
(js [".T_js" statement])
(lua [".T_lua" statement])
(ruby [".T_ruby" statement])
- (python [".T_python" statement]))))
+ (python [".T_python" statement])
+ (r [".T_r" statement]))))
(test/luxc common))
(def: upper-alpha-ascii
@@ -42,7 +43,8 @@
(i/= def-value (:! Int valueT))
(#e.Error error)
- false)))))
+ (exec (log! error)
+ false))))))
(def: (variables-spec run)
(-> Runner Test)
@@ -84,3 +86,7 @@
(context: "[Python] References."
(<| (times +100)
(references-spec run-python def-python)))
+
+(context: "[R] References."
+ (<| (times +100)
+ (references-spec run-r def-r)))
diff --git a/new-luxc/test/test/luxc/lang/translation/structure.lux b/new-luxc/test/test/luxc/lang/translation/structure.lux
index bd2cdcbb4..deb015727 100644
--- a/new-luxc/test/test/luxc/lang/translation/structure.lux
+++ b/new-luxc/test/test/luxc/lang/translation/structure.lux
@@ -131,3 +131,7 @@
(context: "[Python] Structures."
(<| (times +100)
(structure-spec run-python)))
+
+(context: "[R] Structures."
+ (<| (times +100)
+ (structure-spec run-r)))