From ede56371f52b63b92cf0dc35a22ae243053268c3 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Mon, 9 Oct 2017 01:46:36 -0400 Subject: - Improved polymorphism and inheritance support. - Added casting support for automatic boxing/unboxing. --- .../test/test/luxc/analyser/procedure/host.jvm.lux | 30 +++++++++++++++++++--- 1 file changed, 26 insertions(+), 4 deletions(-) (limited to 'new-luxc/test') diff --git a/new-luxc/test/test/luxc/analyser/procedure/host.jvm.lux b/new-luxc/test/test/luxc/analyser/procedure/host.jvm.lux index c5afe701b..87c315750 100644 --- a/new-luxc/test/test/luxc/analyser/procedure/host.jvm.lux +++ b/new-luxc/test/test/luxc/analyser/procedure/host.jvm.lux @@ -41,10 +41,7 @@ (#R;Error error) - (exec (if - (log! error) - []) - ))))] + )))] [success true false] [failure false true] @@ -455,3 +452,28 @@ ("jvm object null")))) Unit)) )) + +(context: "Boxing/Unboxing." + ($_ seq + (test "jvm member static get" + (success "jvm member static get" + (list (code;text "java.util.GregorianCalendar") + (code;text "AD")) + (#;Host "java.lang.Integer" (list)))) + (test "jvm member virtual get" + (success "jvm member virtual get" + (list (code;text "javax.accessibility.AccessibleAttributeSequence") + (code;text "startIndex") + (`' (_lux_check (+0 "javax.accessibility.AccessibleAttributeSequence" (+0)) + ("jvm object null")))) + (#;Host "java.lang.Integer" (list)))) + (test "jvm member virtual put" + (success "jvm member virtual put" + (list (code;text "javax.accessibility.AccessibleAttributeSequence") + (code;text "startIndex") + (`' (_lux_check (+0 "java.lang.Integer" (+0)) + ("jvm object null"))) + (`' (_lux_check (+0 "javax.accessibility.AccessibleAttributeSequence" (+0)) + ("jvm object null")))) + Unit)) + )) -- cgit v1.2.3