diff options
author | Eduardo Julian | 2017-10-14 20:43:30 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-10-14 20:43:30 -0400 |
commit | cd96214b414382ffca76b3a89adb930d6a40e07f (patch) | |
tree | 9d4673b92227a4b50af76eba8345daa53005b028 /new-luxc/test | |
parent | 88949be34c4e0fcab3902537cad01e060d7ce2c8 (diff) |
- Compilation and tests for fields.
Diffstat (limited to '')
-rw-r--r-- | new-luxc/test/test/luxc/generator/procedure/host.jvm.lux | 33 |
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) + )) |