[libinline-java-perl] 28/398: Initial revision

Jonas Smedegaard dr at jones.dk
Thu Feb 26 11:42:39 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 ad1ad3ff990de82e26732c753458b64c7463cc9b
Author: patrick <>
Date:   Mon Mar 12 15:28:02 2001 +0000

    Initial revision
---
 t/05_arrays.t | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 60 insertions(+)

diff --git a/t/05_arrays.t b/t/05_arrays.t
new file mode 100644
index 0000000..3adc494
--- /dev/null
+++ b/t/05_arrays.t
@@ -0,0 +1,60 @@
+use strict ;
+use Test ;
+
+use Inline Config => 
+           DIRECTORY => './_Inline_test';
+
+use Inline(
+	Java => 'DATA'
+) ;
+
+
+BEGIN {
+	plan(tests => 2) ;
+}
+
+
+my $a = new array_test() ;
+my $data = $a->get_data() ;
+ok($a->do_data($data), 'data') ;
+my $sdata = $a->get_sdata() ;
+ok($a->do_sdata($sdata), 'sdata') ;
+
+
+__END__
+
+__Java__
+
+class array_test {
+	public String data[] = {"d", "a", "t", "a"} ;
+	public static String sdata[][] = {{"s"}, {"d"}, {"a"}, {"t"}, {"a"}} ;
+
+	public array_test(){
+	}
+
+	public String [] get_data(){
+		return data ;
+	}
+
+	public StringBuffer do_data(String d[]){
+		StringBuffer sb = new StringBuffer() ;
+		for (int i = 0 ; i < d.length ; i++){
+			sb.append(d[i]) ;
+		}
+
+		return sb ;
+	}
+
+	public static String [][] get_sdata(){
+		return sdata ;
+	}
+
+	public StringBuffer do_sdata(String d[][]){
+		StringBuffer sb = new StringBuffer() ;
+		for (int i = 0 ; i < d.length ; i++){
+			sb.append(d[i][0]) ;
+		}
+
+		return sb ;
+	}
+}

-- 
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