From 38ce556c6e3d21acdf53d6f8e9cfd80903360c8c Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 3 Jul 2018 23:36:21 -0400 Subject: - Improved abstract types. - Got rid of "lux noop" translations. --- new-luxc/test/test/luxc/lang/translation/jvm.lux | 52 +++++++++++------------- 1 file changed, 24 insertions(+), 28 deletions(-) (limited to 'new-luxc/test') diff --git a/new-luxc/test/test/luxc/lang/translation/jvm.lux b/new-luxc/test/test/luxc/lang/translation/jvm.lux index ae66b68af..6652c8484 100644 --- a/new-luxc/test/test/luxc/lang/translation/jvm.lux +++ b/new-luxc/test/test/luxc/lang/translation/jvm.lux @@ -130,9 +130,9 @@ (with-expansions [ (do-template [ ] [(test (|> (do macro.Monad - [sampleI (expressionT.translate (` ( ((~ (code.text )) - (
 (~ ( subject)))
-                                                                                                (
 (~ ( param)))))))]
+                                                    [sampleI (expressionT.translate ( ((code.text )
+                                                                                             (
 ( subject))
+                                                                                             (
 ( param)))))]
                                                     (evalT.eval sampleI))
                                                   (lang.with-current-module "")
                                                   (macro.run (io.run init-jvm))
@@ -154,9 +154,9 @@
                  )))))]
 
   ["int" gen-int code.int Int i/= (i/* 10) i/+ i/- i/* i// i/% "jvm convert long-to-int" "jvm convert int-to-long"]
-  ["long" gen-int code.int Int i/= (i/* 10) i/+ i/- i/* i// i/% "lux noop" "lux noop"]
+  ["long" gen-int code.int Int i/= (i/* 10) i/+ i/- i/* i// i/% id id]
   ["float" gen-frac code.frac Frac f/= (f/* 10.0) f/+ f/- f/* f// f/% "jvm convert double-to-float" "jvm convert float-to-double"]
-  ["double" gen-frac code.frac Frac f/= (f/* 10.0) f/+ f/- f/* f// f/% "lux noop" "lux noop"]
+  ["double" gen-frac code.frac Frac f/= (f/* 10.0) f/+ f/- f/* f// f/% id id]
   )
 
 (do-template [  ]
@@ -169,9 +169,9 @@
                    (~~ (do-template [ ]
                          [(test 
                                 (|> (do macro.Monad
-                                      [sampleI (expressionT.translate (` ( ((~ (code.text ))
-                                                                                  ( (~ (code.nat subject)))
-                                                                                  ( (~ (code.nat param)))))))]
+                                      [sampleI (expressionT.translate ( ((code.text )
+                                                                               ( (code.nat subject))
+                                                                               ( (code.nat param)))))]
                                       (evalT.eval sampleI))
                                     (lang.with-current-module "")
                                     (macro.run (io.run init-jvm))
@@ -189,7 +189,7 @@
                    )))))]
 
   ["int" "jvm convert int-to-long" "jvm convert long-to-int"]
-  ["long" "lux noop" "lux noop"]
+  ["long" id id]
   )
 
 (do-template [  ]
@@ -203,9 +203,9 @@
                    (~~ (do-template [     
]
                          [(test 
                                 (|> (do macro.Monad
-                                      [sampleI (expressionT.translate (` ( ((~ (code.text ))
-                                                                                  ( (~ (
 subject)))
-                                                                                  ("jvm convert long-to-int" (~ (code.nat shift)))))))]
+                                      [sampleI (expressionT.translate ( ((code.text )
+                                                                               ( (
 subject))
+                                                                               ("jvm convert long-to-int" (code.nat shift)))))]
                                       (evalT.eval sampleI))
                                     (lang.with-current-module "")
                                     (macro.run (io.run init-jvm))
@@ -223,7 +223,7 @@
                    )))))]
 
   ["int" "jvm convert int-to-long" "jvm convert long-to-int"]
-  ["long" "lux noop" "lux noop"]
+  ["long" id id]
   )
 
 (do-template [   <=> <<> 
]
@@ -235,9 +235,9 @@
            (with-expansions [ (do-template [ ]
                                        [(test 
                                               (|> (do macro.Monad
-                                                    [sampleI (expressionT.translate (` ((~ (code.text ))
-                                                                                        (
 (~ ( subject)))
-                                                                                        (
 (~ ( param))))))]
+                                                    [sampleI (expressionT.translate ((code.text )
+                                                                                     (
 ( subject))
+                                                                                     (
 ( param))))]
                                                     (evalT.eval sampleI))
                                                   (lang.with-current-module "")
                                                   (macro.run (io.run init-jvm))
@@ -256,9 +256,9 @@
                  )))))]
 
   ["int" gen-int code.int i/= i/< "jvm convert long-to-int"]
-  ["long" gen-int code.int i/= i/< "lux noop"]
+  ["long" gen-int code.int i/= i/< id]
   ["float" gen-frac code.frac f/= f/< "jvm convert double-to-float"]
-  ["double" gen-frac code.frac f/= f/< "lux noop"]
+  ["double" gen-frac code.frac f/= f/< id]
   ["char" gen-int code.int i/= i/< "jvm convert long-to-char"]
   )
 
@@ -293,9 +293,7 @@
                                                  [sampleI (expressionT.translate (|> (jvm//array//new +0  size)
                                                                                      (jvm//array//write  idx )
                                                                                      (jvm//array//read  idx)
-                                                                                     (~)
-                                                                                     
-                                                                                     (`)))]
+                                                                                     ))]
                                                  (evalT.eval sampleI))
                                                (lang.with-current-module "")
                                                (macro.run (io.run init-jvm))
@@ -306,7 +304,7 @@
                                                       false)))]
 
                                     ["boolean" Bool valueZ bool/= (code.bool valueZ)
-                                     "lux noop"]
+                                     id]
                                     ["byte" Int valueB i/= (|> (code.int valueB) (~) "jvm convert long-to-byte" (`))
                                      "jvm convert byte-to-long"]
                                     ["short" Int valueS i/= (|> (code.int valueS) (~) "jvm convert long-to-short" (`))
@@ -314,11 +312,11 @@
                                     ["int" Int valueI i/= (|> (code.int valueI) (~) "jvm convert long-to-int" (`))
                                      "jvm convert int-to-long"]
                                     ["long" Int valueL i/= (code.int valueL)
-                                     "lux noop"]
+                                     id]
                                     ["float" Frac valueF f/= (|> (code.frac valueF) (~) "jvm convert double-to-float" (`))
                                      "jvm convert float-to-double"]
                                     ["double" Frac valueD f/= (code.frac valueD)
-                                     "lux noop"]
+                                     id]
                                     )]
           ($_ seq
               
@@ -343,9 +341,7 @@
                                                  [sampleI (expressionT.translate (|> (jvm//array//new +0  size)
                                                                                      (jvm//array//write  idx )
                                                                                      (jvm//array//read  idx)
-                                                                                     (~)
-                                                                                     
-                                                                                     (`)))]
+                                                                                     ))]
                                                  (evalT.eval sampleI))
                                                (lang.with-current-module "")
                                                (macro.run (io.run init-jvm))
@@ -360,7 +356,7 @@
                                      "jvm convert char-to-long"]
                                     ["java.lang.Long" Int valueL i/=
                                      (code.int valueL)
-                                     "lux noop"]
+                                     id]
                                     )]
           ($_ seq
               
-- 
cgit v1.2.3