File: 02_primitives_1_4.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 (72 lines) | stat: -rwxr-xr-x 940 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
use strict ;
use Test ;

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


package t02_14 ;
use Inline(
    Java => qq |
        class t02_14 {
            public static boolean got14(){
				try {
					Class c = Class.forName("java.lang.CharSequence") ;
				}
				catch (ClassNotFoundException cnfe){
					return false ;
				}
				return true ;
			}
        }
    |,
    NAME => 't02_14',
) ;


package main ;
BEGIN {
	my $got14 = t02_14::t02_14->got14() ;
	if (! $got14){
		plan(tests => 0) ;
		exit(0) ;
	}

	plan(tests => 4) ;
}



use Inline(
    Java => 'DATA',
) ;



my $t = new types2_1() ;

{
	ok($t->_CharSequence(undef), undef) ;
	ok($t->_CharSequence(0), "0") ;
	ok($t->_CharSequence("charsequence"), "charsequence") ;
}

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




__END__

__Java__

class types2_1 {
	public types2_1(){
	}

	public CharSequence _CharSequence(CharSequence c){
		return c ;
	}
}