From cd96214b414382ffca76b3a89adb930d6a40e07f Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sat, 14 Oct 2017 20:43:30 -0400 Subject: - Compilation and tests for fields. --- .../test/luxc/generator/procedure/host.jvm.lux | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'new-luxc/test') 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 + [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 + [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) + )) -- cgit v1.2.3