File: 10_1_shared_alone.t

package info (click to toggle)
libinline-java-perl 0.58~dfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 964 kB
  • ctags: 684
  • sloc: perl: 4,717; java: 2,844; makefile: 35
file content (35 lines) | stat: -rwxr-xr-x 486 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
use strict ;
use Test ;


BEGIN {
	if ($ENV{PERL_INLINE_JAVA_JNI}){
		plan(tests => 0) ;
		exit ;
	}
	else{
		plan(tests => 4) ;
	}
}


use Inline Config => 
           DIRECTORY => './_Inline_test' ;

use Inline (
	Java => 't/shared.java',
	SHARED_JVM => 1,
	PORT => 17891
) ;


my $t = new t10() ;

{
	ok($t->{i}, 5) ;
	ok(! Inline::Java::i_am_JVM_owner()) ;
	Inline::Java::capture_JVM() ;
	ok(Inline::Java::i_am_JVM_owner()) ;
}

ok($t->__get_private()->{proto}->ObjectCount(), 1) ;