aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/test
diff options
context:
space:
mode:
Diffstat (limited to 'new-luxc/test')
-rw-r--r--new-luxc/test/test/luxc/generator/procedure/host.jvm.lux33
1 files changed, 33 insertions, 0 deletions
diff --git a/new-luxc/test/test/luxc/generator/procedure/host.jvm.lux b/new-luxc/test/test/luxc/generator/procedure/host.jvm.lux
index a33b6d52f..8f8728112 100644
--- a/new-luxc/test/test/luxc/generator/procedure/host.jvm.lux
+++ b/new-luxc/test/test/luxc/generator/procedure/host.jvm.lux
@@ -437,3 +437,36 @@
(#R;Error error)
false)))
))
+
+(host;import java.util.GregorianCalendar
+ (#static AD int))
+
+(context: "Member [Field]"
+ ($_ seq
+ (test "jvm member static get"
+ (|> (do macro;Monad<Lux>
+ [sampleI (@;generate (|> (#ls;Procedure "jvm member static get" (list (#ls;Text "java.util.GregorianCalendar") (#ls;Text "AD") (#ls;Text "int")))
+ (list) (#ls;Procedure "jvm convert int-to-long")))]
+ (@eval;eval sampleI))
+ (macro;run (init-compiler []))
+ (case> (#R;Success outputG)
+ (i.= GregorianCalendar.AD (:! Int outputG))
+
+ (#R;Error error)
+ false)))
+ (test "jvm member static put"
+ (|> (do macro;Monad<Lux>
+ [sampleI (@;generate (#ls;Procedure "jvm member static put" (list (#ls;Text "java.awt.datatransfer.DataFlavor") (#ls;Text "allHtmlFlavor") (#ls;Text "java.awt.datatransfer.DataFlavor")
+ (#ls;Procedure "jvm member static get" (list (#ls;Text "java.awt.datatransfer.DataFlavor") (#ls;Text "allHtmlFlavor") (#ls;Text "java.awt.datatransfer.DataFlavor"))))))]
+ (@eval;eval sampleI))
+ (macro;run (init-compiler []))
+ (case> (#R;Success outputG)
+ (is @runtime;unit (:! Text outputG))
+
+ (#R;Error error)
+ false)))
+ (test "jvm member virtual get"
+ false)
+ (test "jvm member virtual put"
+ false)
+ ))