[libinline-java-perl] 289/398: moved to NAtives :

Jonas Smedegaard dr at jones.dk
Thu Feb 26 11:43:15 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 26ec3ff2f7ce7e966d0db7fb9360fe2e8b2dcb2e
Author: patrick_leb <>
Date:   Sat Feb 28 14:06:52 2004 +0000

    moved to NAtives :
---
 t/12_2_perl_natives.t | 152 --------------------------------------------------
 1 file changed, 152 deletions(-)

diff --git a/t/12_2_perl_natives.t b/t/12_2_perl_natives.t
deleted file mode 100644
index 391c2f0..0000000
--- a/t/12_2_perl_natives.t
+++ /dev/null
@@ -1,152 +0,0 @@
-use strict ;
-use Test ;
-use ExtUtils::MakeMaker ;
-
-
-use Inline Config =>
-           DIRECTORY => './_Inline_test' ;
-
-
-use Inline::Java qw(caught) ;
-
-use Inline (
-	Java => 'DATA',
-) ;
-
-
-eval {
-	t121->init() ;
-} ;
-if ($@){
-	if ($@ =~ /Can\'t initialize PerlNatives/){
-		# Some problem initializing he feature, so we bail out...
-		plan(tests => 0) ;
-		exit ;
-	}
-	else{
-		die($@) ;
-	}
-}
-else{
-	print STDERR <<TXT;
-
-Note: PerlNatives is still experimental and may not function properly on
-all platforms yet. Keep in mind that errors here can safely be ignored if 
-you don't plan on using this feature. However, the author would appreciate 
-if errors encountered here were reported to the mailing list (inline\@perl.org)
-along with your hardware/OS detail. Thank you.
-
-TXT
-
-	my $oldfh = select STDERR ;
-	my $ans = prompt("Would you like to run the PerlNative tests?", 'n') ;
-	select $oldfh ;
-	if ($ans !~ /^y/i){
-		plan(tests => 0) ;
-		exit ;
-	}
-}
-
-
-plan(tests => 5) ;
-
-
-eval {
-	t121->init() ;
-	my $t = new t121() ;
-	ok($t->types_stub(1, 2, 3, 4, 5, 6, 1, 2, "1000"), 1024) ;
-	ok($t->array_stub([34, 56], ["toto", "789"]), 789 + 34) ;
-
-	my $t2 = new t1212() ;
-	ok($t2->types_stub(1, 2, 3, 4, 5, 6, 1, 2, "1000"), 1024) ;
-
-	ok($t->callback_stub(), "toto") ;
-	ok($t->__get_private()->{proto}->ObjectCount(), 2) ;
-} ;
-if ($@){
-	if (caught("java.lang.Throwable")){
-		$@->printStackTrace() ;
-		die("Caught Java Exception") ;
-	}
-	else{
-		die $@ ;
-	}
-}
-
-
-##################################
-
-package t121 ;
-sub types {
-	my $this = shift ;
-
-	my $sum = 0 ;
-	map {$sum += $_} @_ ;
-	return $sum ;
-}
-
-
-sub array {
-	my $this = shift ;
-	my $i = shift ;
-	my $str = shift ;
-
-	return $i->[0] + $str->[1] ;
-}
-
-
-sub callback {
-	my $this = shift ;
-
-	return $this->get_name() ;
-}
-
-
-package main ;
-__DATA__
-
-__Java__
-
-
-import java.io.* ;
-import org.perl.inline.java.* ;
-
-class t121 extends InlineJavaPerlNatives {
-    static public boolean got14(){
-        return System.getProperty("java.version").startsWith("1.4") ;
-    }
-
-	public t121() throws InlineJavaException {
-	}
-
-	static public void init() throws InlineJavaException {
-		init("test") ;
-	}
-
-	public String types_stub(byte b, short s, int i, long j, float f, double d,
-        boolean x, char c, String str){
-		return types(b, s, i, j, f, d, x, c, str) ;
-	}
-	public native String types(byte b, short s, int i, long j, float f, double d,
-		boolean x, char c, String str) ;
-
-	public String array_stub(int i[], String str[]){
-		return array(i, str) ;
-	}
-	private native String array(int i[], String str[]) ;
-
-	public String callback_stub(){
-		return callback() ;
-	}
-	public native String callback() ;
-
-	public String get_name(){
-		return "toto" ;
-	}
-} ;
-
-
-class t1212 extends t121 {
-	public t1212() throws InlineJavaException {
-	}
-} ;

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