diff options
Diffstat (limited to '')
-rw-r--r-- | new-luxc/test/test/luxc/lang/translation/jvm.lux | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/new-luxc/test/test/luxc/lang/translation/jvm.lux b/new-luxc/test/test/luxc/lang/translation/jvm.lux index 34f1af508..f31496b08 100644 --- a/new-luxc/test/test/luxc/lang/translation/jvm.lux +++ b/new-luxc/test/test/luxc/lang/translation/jvm.lux @@ -40,7 +40,7 @@ (<test> <sample> (:coerce <cast> valueT)) (#e.Error error) - false)))] + #0)))] ["jvm convert double-to-float" "jvm convert float-to-double" code.frac frac-sample Frac f/=] ["jvm convert double-to-int" "jvm convert int-to-double" code.frac frac-sample Frac f/=] @@ -72,7 +72,7 @@ (<test> <sample> (:coerce <cast> valueT)) (#e.Error error) - false)))] + #0)))] ["jvm convert long-to-int" "jvm convert int-to-char" "jvm convert char-to-long" code.int int-sample Int i/=] ["jvm convert long-to-int" "jvm convert int-to-byte" "jvm convert byte-to-long" code.int int-sample Int i/=] @@ -99,7 +99,7 @@ (<test> <sample> (:coerce <cast> valueT)) (#e.Error error) - false)))] + #0)))] ["jvm convert long-to-int" "jvm convert int-to-char" "jvm convert char-to-byte" "jvm convert byte-to-long" code.int int-sample Int i/=] ["jvm convert long-to-int" "jvm convert int-to-char" "jvm convert char-to-short" "jvm convert short-to-long" code.int int-sample Int i/=] @@ -141,7 +141,7 @@ (:coerce <type> valueT)) (#e.Error error) - false)))] + #0)))] [(format "jvm " <domain> " +") <+>] [(format "jvm " <domain> " -") <->] @@ -180,7 +180,7 @@ (:coerce Nat valueT)) (#e.Error error) - false)))] + #0)))] [(format "jvm " <domain> " and") bit.and] [(format "jvm " <domain> " or") bit.or] @@ -214,7 +214,7 @@ (:coerce <type> valueT)) (#e.Error error) - false)))] + #0)))] [(format "jvm " <domain> " shl") bit.left-shift Nat n/= id code.nat] [(format "jvm " <domain> " shr") bit.arithmetic-right-shift Int i/= nat-to-int (|>> nat-to-int code.int)] @@ -246,7 +246,7 @@ (:coerce Bit valueT)) (#e.Error error) - false)))] + #0)))] [(format "jvm " <domain> " =") <=>] [(format "jvm " <domain> " <") <<>] @@ -301,7 +301,7 @@ (<test> <value> (:coerce <type> outputZ)) (#e.Error error) - false)))] + #0)))] ["boolean" Bit valueZ bit/= (code.bit valueZ) id] @@ -349,7 +349,7 @@ (<test> <value> (:coerce <type> outputT)) (#e.Error error) - false)))] + #0)))] ["char" Int valueC i/= (|> (code.int valueC) (~) "jvm convert long-to-int" "jvm convert int-to-char" (`)) @@ -377,7 +377,7 @@ (f/= valueD (:coerce Frac outputT)) (#e.Error error) - false))) + #0))) (test "jvm array length" (|> (do macro.Monad<Meta> [sampleI (expressionT.translate (` ("jvm array length" ("jvm array new" +0 "java.lang.Object" (~ (code.nat size))))))] @@ -388,7 +388,7 @@ (n/= size (:coerce Nat outputT)) (#e.Error error) - false))) + #0))) ))))) (host.import: java/lang/Class @@ -439,7 +439,7 @@ (:coerce Bit outputT) (#e.Error error) - false))) + #0))) (test "jvm object null?" (|> (do macro.Monad<Meta> [sampleI (expressionT.translate (` ("jvm object null?" (~ (code.int sample)))))] @@ -450,7 +450,7 @@ (not (:coerce Bit outputT)) (#e.Error error) - false))) + #0))) (test "jvm object synchronized" (|> (do macro.Monad<Meta> [sampleI (expressionT.translate (` ("jvm object synchronized" (~ (code.int monitor)) (~ (code.int sample)))))] @@ -461,7 +461,7 @@ (i/= sample (:coerce Int outputT)) (#e.Error error) - false))) + #0))) (test "jvm object throw" (|> (do macro.Monad<Meta> [_ runtimeT.translate @@ -478,10 +478,10 @@ (text.contains? exception-message error) (#e.Success outputT) - false) + #0) (#e.Error error) - false))) + #0))) (test "jvm object class" (|> (do macro.Monad<Meta> [sampleI (expressionT.translate (` ("jvm object class" (~ (code.text class)))))] @@ -492,7 +492,7 @@ (|> outputT (:coerce Class) (Class::getName []) (text/= class)) (#e.Error error) - false))) + #0))) (test "jvm object instance?" (|> (do macro.Monad<Meta> [sampleI (expressionT.translate (` ("jvm object instance?" (~ (code.text instance-class)) (~ instance))))] @@ -503,7 +503,7 @@ (:coerce Bit outputT) (#e.Error error) - false))) + #0))) )))) (host.import: java/util/GregorianCalendar @@ -535,7 +535,7 @@ (i/= GregorianCalendar::AD (:coerce Int outputT)) (#e.Error error) - false))) + #0))) (test "jvm member static put" (|> (do macro.Monad<Meta> [sampleI (expressionT.translate (` ("jvm member static put" "java.awt.datatransfer.DataFlavor" "allHtmlFlavor" "java.awt.datatransfer.DataFlavor" @@ -547,7 +547,7 @@ (is? hostL.unit (:coerce Text outputT)) (#e.Error error) - false))) + #0))) (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))))] @@ -558,7 +558,7 @@ (text/= sample-string (:coerce Text outputT)) (#e.Error error) - false))) + #0))) (test "jvm member virtual put" (|> (do macro.Monad<Meta> [sampleI (expressionT.translate (` ("jvm member virtual get" "org.omg.CORBA.ValueMember" "name" "java.lang.String" @@ -571,7 +571,7 @@ (text/= other-sample-string (:coerce Text outputT)) (#e.Error error) - false))) + #0))) )))) (host.import: java/lang/Object) @@ -600,7 +600,7 @@ (i/= sample (:coerce Int outputT)) (#e.Error error) - false))) + #0))) (test "jvm member invoke virtual" (|> (do macro.Monad<Meta> [sampleI (expressionT.translate (` ("jvm object cast" "boolean" "java.lang.Boolean" @@ -613,7 +613,7 @@ (:coerce Bit outputT) (#e.Error error) - false))) + #0))) (test "jvm member invoke interface" (|> (do macro.Monad<Meta> [sampleI (expressionT.translate (` ("jvm object cast" "boolean" "java.lang.Boolean" @@ -626,7 +626,7 @@ (:coerce Bit outputT) (#e.Error error) - false))) + #0))) (test "jvm member invoke constructor" (|> (do macro.Monad<Meta> [sampleI (expressionT.translate array-listS)] @@ -637,5 +637,5 @@ (host.instance? ArrayList (:coerce Object outputT)) (#e.Error error) - false))) + #0))) )))) |