1 // Test a bunch of different calls.
2 
3 class base
4 {
int_f()5   public int int_f ()
6   {
7     return 27;
8   }
9 }
10 
11 public class calls extends base
12 {
13   static
14   {
15     System.loadLibrary ("calls");
16   }
17 
docall()18   public native int docall ();
19 
byte_f()20   public byte byte_f ()
21   {
22     return 23;
23   }
24 
char_f(int z)25   public char char_f (int z)
26   {
27     return (char) ('a' + z);
28   }
29 
int_f()30   public int int_f ()
31   {
32     return 1023;
33   }
34 
long_f(long q)35   public static long long_f (long q)
36   {
37     return q + 2023;
38   }
39 
longpb_f(byte b1, long q1, byte b2, long q2, byte b3, long q3)40   public static long longpb_f (byte b1, long q1, byte b2, long q2,
41 			       byte b3, long q3)
42   {
43     return q1 + q2 + q3 + 3023;
44   }
45 
void_f()46   public void void_f ()
47   {
48     System.out.println ("void");
49   }
50 
short_f()51   public static short short_f ()
52   {
53     return 2;
54   }
55 
double_f()56   public double double_f ()
57   {
58     return -1.0;
59   }
60 
float_f()61   public float float_f ()
62   {
63     return (float) 1.0;
64   }
65 
main(String[] args)66   public static void main (String[] args)
67   {
68     calls c = new calls ();
69     if (c.docall () != 0)
70       System.out.println ("fail");
71   }
72 }
73