File: 15_native_doubles.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 (44 lines) | stat: -rwxr-xr-x 544 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
use strict ;
use Test ;

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

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


BEGIN {
	plan(tests => 3) ;
}


my $t = new t15() ;

{
	# Here it is hard to test for accuracy, but either it works or it doesn't...
	ok($t->_Double(0.056200000000000028) > 0.056) ;
	ok($t->_Double(0.056200000000000028) < 0.057) ;
}

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




__END__

__Java__

class t15 {
	public t15(){
	}

	public Double _Double(Double d){
		return d ;
	}
}