2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / libjava / testsuite / libjava.jni / calls.java
blob19c33be2a837ba309a9fdbf74660bad0777419f6
1 // Test a bunch of different calls.
3 class base
5 public int int_f ()
7 return 27;
11 public class calls extends base
13 static
15 System.loadLibrary ("calls");
18 public native int docall ();
20 public byte byte_f ()
22 return 23;
25 public char char_f (int z)
27 return (char) ('a' + z);
30 public int int_f ()
32 return 1023;
35 public static long long_f (long q)
37 return q + 2023;
40 public static long longpb_f (byte b1, long q1, byte b2, long q2,
41 byte b3, long q3)
43 return q1 + q2 + q3 + 3023;
46 public void void_f ()
48 System.out.println ("void");
51 public static short short_f ()
53 return 2;
56 public double double_f ()
58 return -1.0;
61 public float float_f ()
63 return (float) 1.0;
66 public static void main (String[] args)
68 calls c = new calls ();
69 if (c.docall () != 0)
70 System.out.println ("fail");