source: trunk/src/gcc/libjava/testsuite/libjava.jni/calls.java@ 681

Last change on this file since 681 was 2, checked in by bird, 23 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 822 bytes
Line 
1// Test a bunch of different calls.
2
3class base
4{
5 public int int_f ()
6 {
7 return 27;
8 }
9}
10
11public class calls extends base
12{
13 static
14 {
15 System.loadLibrary ("calls");
16 }
17
18 public native int docall ();
19
20 public byte byte_f ()
21 {
22 return 23;
23 }
24
25 public char char_f (int z)
26 {
27 return (char) ('a' + z);
28 }
29
30 public int int_f ()
31 {
32 return 1023;
33 }
34
35 public static long long_f (long q)
36 {
37 return q + 2023;
38 }
39
40 public void void_f ()
41 {
42 System.out.println ("void");
43 }
44
45 public static short short_f ()
46 {
47 return 2;
48 }
49
50 public double double_f ()
51 {
52 return -1.0;
53 }
54
55 public float float_f ()
56 {
57 return (float) 1.0;
58 }
59
60 public static void main (String[] args)
61 {
62 calls c = new calls ();
63 if (c.docall () != 0)
64 System.out.println ("fail");
65 }
66}
Note: See TracBrowser for help on using the repository browser.