[libinline-java-perl] 99/398: added array of studied types test
Jonas Smedegaard
dr at jones.dk
Thu Feb 26 11:42:54 UTC 2015
This is an automated email from the git hooks/post-receive script.
js pushed a commit to tag 0.55
in repository libinline-java-perl.
commit 1374794d112946111a39681160bbd132eaa7adfe
Author: Patrick LeBoutillier <patl at cpan.org>
Date: Fri Jun 1 17:26:15 2001 +0000
added array of studied types test
---
t/08_study.t | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/t/08_study.t b/t/08_study.t
index a34183b..6f7b6a0 100644
--- a/t/08_study.t
+++ b/t/08_study.t
@@ -17,7 +17,7 @@ use Inline::Java qw(study_classes) ;
BEGIN {
- plan(tests => 5) ;
+ plan(tests => 8) ;
}
@@ -36,12 +36,17 @@ ok($nc->{i}, 5) ;
my $a = new study::a() ;
ok($a->{i}, 50) ;
ok($a->truth()) ;
+ok($a->sa()->[1], 'titi') ;
+ok($a->sb()->[0]->get('toto'), 'titi') ;
+ok($a->sb()->[1]->get('error'), undef) ;
__DATA__
__Java__
+import java.util.* ;
+
class a {
public int i = 50 ;
@@ -51,5 +56,20 @@ class a {
public boolean truth(){
return true ;
}
+
+ public String [] sa(){
+ String a[] = {"toto", "titi"} ;
+ return a ;
+ }
+
+ public HashMap [] sb(){
+ HashMap h1 = new HashMap() ;
+ HashMap h2 = new HashMap() ;
+ h1.put("toto", "titi") ;
+ h2.put("tata", "tete") ;
+
+ HashMap a[] = {h1, h2} ;
+ return a ;
+ }
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libinline-java-perl.git
More information about the Pkg-perl-cvs-commits
mailing list