aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/test/test/luxc/lang/translation/jvm.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--new-luxc/test/test/luxc/lang/translation/jvm.lux (renamed from new-luxc/test/test/luxc/lang/translation/jvm/procedure/host.jvm.lux)107
1 files changed, 53 insertions, 54 deletions
diff --git a/new-luxc/test/test/luxc/lang/translation/jvm/procedure/host.jvm.lux b/new-luxc/test/test/luxc/lang/translation/jvm.lux
index 0db10f82a..a0c8a5ed5 100644
--- a/new-luxc/test/test/luxc/lang/translation/jvm/procedure/host.jvm.lux
+++ b/new-luxc/test/test/luxc/lang/translation/jvm.lux
@@ -20,9 +20,8 @@
(lang [".L" host]
["ls" synthesis]
(translation (jvm [".T" expression]
- ["@." eval]
- ["@." runtime]
- ["@." common]))))
+ [".T" eval]
+ [".T" runtime]))))
(test/luxc common))
(context: "Conversions [Part 1]"
@@ -34,9 +33,9 @@
[(test (format <step1> " / " <step2>)
(|> (do macro.Monad<Meta>
[sampleI (expressionT.translate (|> (~ (<tag> <sample>)) <step1> <step2> (`)))]
- (@eval.eval sampleI))
+ (evalT.eval sampleI))
(lang.with-current-module "")
- (macro.run (init-compiler []))
+ (macro.run (io.run init-jvm))
(case> (#e.Success valueT)
(<test> <sample> (:! <cast> valueT))
@@ -66,9 +65,9 @@
[(test (format <step1> " / " <step2> " / " <step3>)
(|> (do macro.Monad<Meta>
[sampleI (expressionT.translate (|> (~ (<tag> <sample>)) <step1> <step2> <step3> (`)))]
- (@eval.eval sampleI))
+ (evalT.eval sampleI))
(lang.with-current-module "")
- (macro.run (init-compiler []))
+ (macro.run (io.run init-jvm))
(case> (#e.Success valueT)
(<test> <sample> (:! <cast> valueT))
@@ -93,9 +92,9 @@
[(test (format <step1> " / " <step2> " / " <step3>)
(|> (do macro.Monad<Meta>
[sampleI (expressionT.translate (|> (~ (<tag> <sample>)) <step1> <step2> <step3> <step4> (`)))]
- (@eval.eval sampleI))
+ (evalT.eval sampleI))
(lang.with-current-module "")
- (macro.run (init-compiler []))
+ (macro.run (io.run init-jvm))
(case> (#e.Success valueT)
(<test> <sample> (:! <cast> valueT))
@@ -134,9 +133,9 @@
[sampleI (expressionT.translate (` (<post> ((~ (code.text <procedure>))
(<pre> (~ (<tag> subject)))
(<pre> (~ (<tag> param)))))))]
- (@eval.eval sampleI))
+ (evalT.eval sampleI))
(lang.with-current-module "")
- (macro.run (init-compiler []))
+ (macro.run (io.run init-jvm))
(case> (#e.Success valueT)
(<test> (<reference> param subject)
(:! <type> valueT))
@@ -173,9 +172,9 @@
[sampleI (expressionT.translate (` (<post> ((~ (code.text <procedure>))
(<convert> (~ (code.nat subject)))
(<convert> (~ (code.nat param)))))))]
- (@eval.eval sampleI))
+ (evalT.eval sampleI))
(lang.with-current-module "")
- (macro.run (init-compiler []))
+ (macro.run (io.run init-jvm))
(case> (#e.Success valueT)
(n/= (<reference> param subject)
(:! Nat valueT))
@@ -207,9 +206,9 @@
[sampleI (expressionT.translate (` (<post> ((~ (code.text <procedure>))
(<convert> (~ (<pre> subject)))
("jvm convert long-to-int" (~ (code.nat shift)))))))]
- (@eval.eval sampleI))
+ (evalT.eval sampleI))
(lang.with-current-module "")
- (macro.run (init-compiler []))
+ (macro.run (io.run init-jvm))
(case> (#e.Success valueT)
(<test> (<reference> shift (<pre-subject> subject))
(:! <type> valueT))
@@ -239,9 +238,9 @@
[sampleI (expressionT.translate (` ((~ (code.text <procedure>))
(<pre> (~ (<tag> subject)))
(<pre> (~ (<tag> param))))))]
- (@eval.eval sampleI))
+ (evalT.eval sampleI))
(lang.with-current-module "")
- (macro.run (init-compiler []))
+ (macro.run (io.run init-jvm))
(case> (#e.Success valueT)
(bool/= (<reference> param subject)
(:! Bool valueT))
@@ -297,9 +296,9 @@
(~)
<post>
(`)))]
- (@eval.eval sampleI))
+ (evalT.eval sampleI))
(lang.with-current-module "")
- (macro.run (init-compiler []))
+ (macro.run (io.run init-jvm))
(case> (#e.Success outputZ)
(<test> <value> (:! <type> outputZ))
@@ -347,9 +346,9 @@
(~)
<post>
(`)))]
- (@eval.eval sampleI))
+ (evalT.eval sampleI))
(lang.with-current-module "")
- (macro.run (init-compiler []))
+ (macro.run (io.run init-jvm))
(case> (#e.Success outputT)
(<test> <value> (:! <type> outputT))
@@ -375,9 +374,9 @@
("jvm array read" "#Array" (~ (code.nat idx)))
("jvm array read" "java.lang.Double" (~ (code.nat idx)))
(`)))]
- (@eval.eval sampleI))
+ (evalT.eval sampleI))
(lang.with-current-module "")
- (macro.run (init-compiler []))
+ (macro.run (io.run init-jvm))
(case> (#e.Success outputT)
(f/= valueD (:! Frac outputT))
@@ -386,9 +385,9 @@
(test "jvm array length"
(|> (do macro.Monad<Meta>
[sampleI (expressionT.translate (` ("jvm array length" ("jvm array new" +0 "java.lang.Object" (~ (code.nat size))))))]
- (@eval.eval sampleI))
+ (evalT.eval sampleI))
(lang.with-current-module "")
- (macro.run (init-compiler []))
+ (macro.run (io.run init-jvm))
(case> (#e.Success outputT)
(n/= size (:! Nat outputT))
@@ -437,9 +436,9 @@
(test "jvm object null"
(|> (do macro.Monad<Meta>
[sampleI (expressionT.translate (` ("jvm object null?" ("jvm object null"))))]
- (@eval.eval sampleI))
+ (evalT.eval sampleI))
(lang.with-current-module "")
- (macro.run (init-compiler []))
+ (macro.run (io.run init-jvm))
(case> (#e.Success outputT)
(:! Bool outputT)
@@ -448,9 +447,9 @@
(test "jvm object null?"
(|> (do macro.Monad<Meta>
[sampleI (expressionT.translate (` ("jvm object null?" (~ (code.int sample)))))]
- (@eval.eval sampleI))
+ (evalT.eval sampleI))
(lang.with-current-module "")
- (macro.run (init-compiler []))
+ (macro.run (io.run init-jvm))
(case> (#e.Success outputT)
(not (:! Bool outputT))
@@ -459,9 +458,9 @@
(test "jvm object synchronized"
(|> (do macro.Monad<Meta>
[sampleI (expressionT.translate (` ("jvm object synchronized" (~ (code.int monitor)) (~ (code.int sample)))))]
- (@eval.eval sampleI))
+ (evalT.eval sampleI))
(lang.with-current-module "")
- (macro.run (init-compiler []))
+ (macro.run (io.run init-jvm))
(case> (#e.Success outputT)
(i/= sample (:! Int outputT))
@@ -469,14 +468,14 @@
false)))
(test "jvm object throw"
(|> (do macro.Monad<Meta>
- [_ @runtime.translate
+ [_ runtimeT.translate
sampleI (expressionT.translate (` ("lux try" ("lux function" +1 []
("jvm object throw" ("jvm member invoke constructor"
"java.lang.Throwable"
(~ exception-message$)))))))]
- (@eval.eval sampleI))
+ (evalT.eval sampleI))
(lang.with-current-module "")
- (macro.run (init-compiler []))
+ (macro.run (io.run init-jvm))
(case> (#e.Success outputT)
(case (:! (e.Error Top) outputT)
(#e.Error error)
@@ -490,9 +489,9 @@
(test "jvm object class"
(|> (do macro.Monad<Meta>
[sampleI (expressionT.translate (` ("jvm object class" (~ (code.text class)))))]
- (@eval.eval sampleI))
+ (evalT.eval sampleI))
(lang.with-current-module "")
- (macro.run (init-compiler []))
+ (macro.run (io.run init-jvm))
(case> (#e.Success outputT)
(|> outputT (:! Class) (Class::getName []) (text/= class))
@@ -501,9 +500,9 @@
(test "jvm object instance?"
(|> (do macro.Monad<Meta>
[sampleI (expressionT.translate (` ("jvm object instance?" (~ (code.text instance-class)) (~ instance))))]
- (@eval.eval sampleI))
+ (evalT.eval sampleI))
(lang.with-current-module "")
- (macro.run (init-compiler []))
+ (macro.run (io.run init-jvm))
(case> (#e.Success outputT)
(:! Bool outputT)
@@ -533,9 +532,9 @@
(test "jvm member static get"
(|> (do macro.Monad<Meta>
[sampleI (expressionT.translate (` ("jvm convert int-to-long" ("jvm member static get" "java.util.GregorianCalendar" "AD" "int"))))]
- (@eval.eval sampleI))
+ (evalT.eval sampleI))
(lang.with-current-module "")
- (macro.run (init-compiler []))
+ (macro.run (io.run init-jvm))
(case> (#e.Success outputT)
(i/= GregorianCalendar::AD (:! Int outputT))
@@ -545,9 +544,9 @@
(|> (do macro.Monad<Meta>
[sampleI (expressionT.translate (` ("jvm member static put" "java.awt.datatransfer.DataFlavor" "allHtmlFlavor" "java.awt.datatransfer.DataFlavor"
("jvm member static get" "java.awt.datatransfer.DataFlavor" "allHtmlFlavor" "java.awt.datatransfer.DataFlavor"))))]
- (@eval.eval sampleI))
+ (evalT.eval sampleI))
(lang.with-current-module "")
- (macro.run (init-compiler []))
+ (macro.run (io.run init-jvm))
(case> (#e.Success outputT)
(is hostL.unit (:! Text outputT))
@@ -556,9 +555,9 @@
(test "jvm member virtual get"
(|> (do macro.Monad<Meta>
[sampleI (expressionT.translate (` ("jvm member virtual get" "org.omg.CORBA.ValueMember" "name" "java.lang.String" (~ value-memberS))))]
- (@eval.eval sampleI))
+ (evalT.eval sampleI))
(lang.with-current-module "")
- (macro.run (init-compiler []))
+ (macro.run (io.run init-jvm))
(case> (#e.Success outputT)
(text/= sample-string (:! Text outputT))
@@ -569,9 +568,9 @@
[sampleI (expressionT.translate (` ("jvm member virtual get" "org.omg.CORBA.ValueMember" "name" "java.lang.String"
("jvm member virtual put" "org.omg.CORBA.ValueMember" "name" "java.lang.String"
(~ (code.text other-sample-string)) (~ value-memberS)))))]
- (@eval.eval sampleI))
+ (evalT.eval sampleI))
(lang.with-current-module "")
- (macro.run (init-compiler []))
+ (macro.run (io.run init-jvm))
(case> (#e.Success outputT)
(text/= other-sample-string (:! Text outputT))
@@ -598,9 +597,9 @@
[sampleI (expressionT.translate (` ("jvm member invoke static" "java.lang.Long"
"decode" "java.lang.Long"
(~ coded-intS))))]
- (@eval.eval sampleI))
+ (evalT.eval sampleI))
(lang.with-current-module "")
- (macro.run (init-compiler []))
+ (macro.run (io.run init-jvm))
(case> (#e.Success outputT)
(i/= sample (:! Int outputT))
@@ -611,9 +610,9 @@
[sampleI (expressionT.translate (` ("jvm object cast" "boolean" "java.lang.Boolean"
("jvm member invoke virtual" "java.lang.Object" "equals" "boolean"
(~ (code.int sample)) (~ object-longS)))))]
- (@eval.eval sampleI))
+ (evalT.eval sampleI))
(lang.with-current-module "")
- (macro.run (init-compiler []))
+ (macro.run (io.run init-jvm))
(case> (#e.Success outputT)
(:! Bool outputT)
@@ -624,9 +623,9 @@
[sampleI (expressionT.translate (` ("jvm object cast" "boolean" "java.lang.Boolean"
("jvm member invoke interface" "java.util.Collection" "add" "boolean"
(~ array-listS) (~ object-longS)))))]
- (@eval.eval sampleI))
+ (evalT.eval sampleI))
(lang.with-current-module "")
- (macro.run (init-compiler []))
+ (macro.run (io.run init-jvm))
(case> (#e.Success outputT)
(:! Bool outputT)
@@ -635,9 +634,9 @@
(test "jvm member invoke constructor"
(|> (do macro.Monad<Meta>
[sampleI (expressionT.translate array-listS)]
- (@eval.eval sampleI))
+ (evalT.eval sampleI))
(lang.with-current-module "")
- (macro.run (init-compiler []))
+ (macro.run (io.run init-jvm))
(case> (#e.Success outputT)
(host.instance? ArrayList (:! Object outputT))