diff options
Diffstat (limited to 'libjava/testsuite/libjava.lang')
625 files changed, 10118 insertions, 0 deletions
diff --git a/libjava/testsuite/libjava.lang/ArrayStore.jar b/libjava/testsuite/libjava.lang/ArrayStore.jar Binary files differnew file mode 100644 index 000000000..7c10d1212 --- /dev/null +++ b/libjava/testsuite/libjava.lang/ArrayStore.jar diff --git a/libjava/testsuite/libjava.lang/ArrayStore.java b/libjava/testsuite/libjava.lang/ArrayStore.java new file mode 100644 index 000000000..9afac71c2 --- /dev/null +++ b/libjava/testsuite/libjava.lang/ArrayStore.java @@ -0,0 +1,52 @@ +public class ArrayStore +{ + public static void main(String[] args) + { + ArrayStore s = new ArrayStore(); + + /* Check that bounds check takes precedence over array store check. */ + try + { + s.a(new String[1]); + } + catch (Exception x) + { + System.out.println (x.getClass().getName()); + } + + try + { + s.a(new String[2]); + } + catch (Exception x) + { + System.out.println (x.getClass().getName()); + } + + /* Check that += operator on String[] element works and throws bounds + exception. */ + try + { + s.b(new String[1]); + } + catch (Exception x) + { + System.out.println (x.getClass().getName()); + } + + String[] sb = new String[2]; + sb[1] = "foo"; + s.b(sb); + System.out.println (sb[1]); + } + + void a(Object[] oa) + { + oa[1] = new Integer(2); + } + + void b(String[] sa) + { + sa[1] += "bar"; + } +} diff --git a/libjava/testsuite/libjava.lang/ArrayStore.out b/libjava/testsuite/libjava.lang/ArrayStore.out new file mode 100644 index 000000000..b22379de2 --- /dev/null +++ b/libjava/testsuite/libjava.lang/ArrayStore.out @@ -0,0 +1,4 @@ +java.lang.ArrayIndexOutOfBoundsException +java.lang.ArrayStoreException +java.lang.ArrayIndexOutOfBoundsException +foobar diff --git a/libjava/testsuite/libjava.lang/ArrayStore.xfail b/libjava/testsuite/libjava.lang/ArrayStore.xfail new file mode 100644 index 000000000..7728fd25d --- /dev/null +++ b/libjava/testsuite/libjava.lang/ArrayStore.xfail @@ -0,0 +1 @@ +xfail-byte-output diff --git a/libjava/testsuite/libjava.lang/ArrayStore2.jar b/libjava/testsuite/libjava.lang/ArrayStore2.jar Binary files differnew file mode 100644 index 000000000..833a23264 --- /dev/null +++ b/libjava/testsuite/libjava.lang/ArrayStore2.jar diff --git a/libjava/testsuite/libjava.lang/ArrayStore2.java b/libjava/testsuite/libjava.lang/ArrayStore2.java new file mode 100644 index 000000000..1364d39b4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/ArrayStore2.java @@ -0,0 +1,31 @@ +public class ArrayStore2 +{ + public static void main(String[] args) + { + new ArrayStore2().a(new Object[2], 3); + } + + void a(Object[] oa, int i) + { + try + { + oa[index()] = obj(); + } + catch (Exception x) + { + System.out.println (x.getClass().getName()); + } + } + + int index() + { + System.out.println ("index"); + return 3; + } + + Object obj() + { + System.out.println ("rhs"); + return new Object(); + } +} diff --git a/libjava/testsuite/libjava.lang/ArrayStore2.out b/libjava/testsuite/libjava.lang/ArrayStore2.out new file mode 100644 index 000000000..89dddb244 --- /dev/null +++ b/libjava/testsuite/libjava.lang/ArrayStore2.out @@ -0,0 +1,3 @@ +index +rhs +java.lang.ArrayIndexOutOfBoundsException diff --git a/libjava/testsuite/libjava.lang/Array_1.jar b/libjava/testsuite/libjava.lang/Array_1.jar Binary files differnew file mode 100644 index 000000000..c97b13ae0 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Array_1.jar diff --git a/libjava/testsuite/libjava.lang/Array_1.java b/libjava/testsuite/libjava.lang/Array_1.java new file mode 100644 index 000000000..1fcf04eeb --- /dev/null +++ b/libjava/testsuite/libjava.lang/Array_1.java @@ -0,0 +1,18 @@ +// Test of array stuff. Technically this probably isn't in java.lang. + +public class Array_1 +{ + public static void main (String[] args) + { + int x[][] = { { 1, 2}, null }; + + System.out.println(Cloneable.class.isInstance(x)); + + // This example is from the Java Spec book. + int y[][] = (int[][]) x.clone(); + System.out.println(x == y); + System.out.println(x[0] == y[0] && x[1] == y[1]); + + System.out.println(x.getClass().getSuperclass()); + } +} diff --git a/libjava/testsuite/libjava.lang/Array_1.out b/libjava/testsuite/libjava.lang/Array_1.out new file mode 100644 index 000000000..3cc754d2e --- /dev/null +++ b/libjava/testsuite/libjava.lang/Array_1.out @@ -0,0 +1,4 @@ +true +false +true +class java.lang.Object diff --git a/libjava/testsuite/libjava.lang/Array_2.jar b/libjava/testsuite/libjava.lang/Array_2.jar Binary files differnew file mode 100644 index 000000000..8713ba7fc --- /dev/null +++ b/libjava/testsuite/libjava.lang/Array_2.jar diff --git a/libjava/testsuite/libjava.lang/Array_2.java b/libjava/testsuite/libjava.lang/Array_2.java new file mode 100644 index 000000000..b406c47d6 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Array_2.java @@ -0,0 +1,14 @@ +// Test to make sure multidimensional arrays work. +// From Bryce McKinlay + +public class Array_2 +{ + static final int a = 10, b = 15; + + public static void main(String args[]) + { + int[][] foo = new int [a][b]; + System.out.println(foo.length); + System.out.println(foo[a-1].length); + } +} diff --git a/libjava/testsuite/libjava.lang/Array_2.out b/libjava/testsuite/libjava.lang/Array_2.out new file mode 100644 index 000000000..349103a87 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Array_2.out @@ -0,0 +1,2 @@ +10 +15 diff --git a/libjava/testsuite/libjava.lang/Array_3.jar b/libjava/testsuite/libjava.lang/Array_3.jar Binary files differnew file mode 100644 index 000000000..c907e6529 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Array_3.jar diff --git a/libjava/testsuite/libjava.lang/Array_3.java b/libjava/testsuite/libjava.lang/Array_3.java new file mode 100644 index 000000000..e94549a0f --- /dev/null +++ b/libjava/testsuite/libjava.lang/Array_3.java @@ -0,0 +1,91 @@ +// Test to make sure null arrays throw the right execption + +public class Array_3 +{ + static Object foo () + { + return null; + } + + static int[] bar () + { + return null; + } + + static int baz () + { + int[] x = (int[])null; + int nn = x.length; + return 5; + } + + public static void main(String args[]) + { + boolean ok = false; + int nn = 0; + + try + { + int[] x = (int[])foo(); + nn = x.length; + } + catch (NullPointerException _) + { + ok = true; + } + if (!ok) + throw new RuntimeException("test failed:1"); + + ok = false; + try + { + int[] x = bar(); + nn = x.length; + } + catch (NullPointerException _) + { + ok = true; + } + if (!ok) + throw new RuntimeException("test failed:2"); + + ok = false; + try + { + int[] x = bar(); + nn = x[0]; + } + catch (NullPointerException _) + { + ok = true; + } + + if (!ok || nn != 0) + throw new RuntimeException("test failed:3"); + + ok = false; + try + { + int[] x = (int[])null; + nn = x.length; + } + catch (NullPointerException _) + { + ok = true; + } + if (!ok) + throw new RuntimeException("test failed:4"); + + ok = false; + try + { + nn = baz (); + } + catch (NullPointerException _) + { + ok = true; + } + if (!ok) + throw new RuntimeException("test failed:5"); + } +} diff --git a/libjava/testsuite/libjava.lang/Array_3.out b/libjava/testsuite/libjava.lang/Array_3.out new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/libjava/testsuite/libjava.lang/Array_3.out diff --git a/libjava/testsuite/libjava.lang/Class_1.jar b/libjava/testsuite/libjava.lang/Class_1.jar Binary files differnew file mode 100644 index 000000000..675609425 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Class_1.jar diff --git a/libjava/testsuite/libjava.lang/Class_1.java b/libjava/testsuite/libjava.lang/Class_1.java new file mode 100644 index 000000000..58df6beac --- /dev/null +++ b/libjava/testsuite/libjava.lang/Class_1.java @@ -0,0 +1,46 @@ +class C {} +class D extends C implements I {} +interface I {} +interface J extends I {} + +public class Class_1 +{ + static void printIsAssignableFrom(Class a, Class b, boolean c) + { + // The field 'c' can be viewed to see the expected value. + System.out.println(a.isAssignableFrom(b)); + } + + public static void main (String arg[]) + { + System.out.println("Testing class `Class_1'..."); + printIsAssignableFrom(C.class, Object.class, false); + printIsAssignableFrom(C.class, C.class, true); + printIsAssignableFrom(C.class, D.class, true); + printIsAssignableFrom(D.class, C.class, false); + + printIsAssignableFrom(Object.class, int[].class, true); + printIsAssignableFrom(int[].class, int[].class, true); + printIsAssignableFrom(C[].class, D.class, false); + printIsAssignableFrom(C[].class, D[].class, true); + printIsAssignableFrom(C[].class, C[][].class, false); + + printIsAssignableFrom(Object.class, I.class, true); + printIsAssignableFrom(I.class, I.class, true); + printIsAssignableFrom(D.class, I.class, false); + printIsAssignableFrom(I.class, D.class, true); + + printIsAssignableFrom(D.class, J.class, false); + printIsAssignableFrom(J.class, D.class, false); + + printIsAssignableFrom(I.class, J.class, true); + printIsAssignableFrom(J.class, J.class, true); + printIsAssignableFrom(J.class, I.class, false); + + // Returns true iff both Class objects are equal. + printIsAssignableFrom(long.class, long.class, true); + + // Does not work for primitive types in general. + printIsAssignableFrom(long.class, int.class, false); + } +} diff --git a/libjava/testsuite/libjava.lang/Class_1.out b/libjava/testsuite/libjava.lang/Class_1.out new file mode 100644 index 000000000..531b94f06 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Class_1.out @@ -0,0 +1,21 @@ +Testing class `Class_1'... +false +true +true +false +true +true +false +true +false +true +true +false +true +false +false +true +true +false +true +false diff --git a/libjava/testsuite/libjava.lang/CompareNaN.jar b/libjava/testsuite/libjava.lang/CompareNaN.jar Binary files differnew file mode 100644 index 000000000..c6b8db44d --- /dev/null +++ b/libjava/testsuite/libjava.lang/CompareNaN.jar diff --git a/libjava/testsuite/libjava.lang/CompareNaN.java b/libjava/testsuite/libjava.lang/CompareNaN.java new file mode 100644 index 000000000..77a6d6aa8 --- /dev/null +++ b/libjava/testsuite/libjava.lang/CompareNaN.java @@ -0,0 +1,15 @@ +/* + * JLS 4.2.3 specifies that (x op y) must be false if either x or y + * is NaN and op is one of <, >, <=, >=, or ==. + * + * Some targets may need specific options wired into libgcj.spec + * to pass this test. For example, alpha-linux requires -mieee + * to prevent an unrecoverable fp trap. + */ + +public class CompareNaN { + public static void main(String[] args) { + double x = Double.NaN; + System.out.println(x == x); + } +} diff --git a/libjava/testsuite/libjava.lang/CompareNaN.out b/libjava/testsuite/libjava.lang/CompareNaN.out new file mode 100644 index 000000000..c508d5366 --- /dev/null +++ b/libjava/testsuite/libjava.lang/CompareNaN.out @@ -0,0 +1 @@ +false diff --git a/libjava/testsuite/libjava.lang/Divide_1.jar b/libjava/testsuite/libjava.lang/Divide_1.jar Binary files differnew file mode 100644 index 000000000..4add13c21 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Divide_1.jar diff --git a/libjava/testsuite/libjava.lang/Divide_1.java b/libjava/testsuite/libjava.lang/Divide_1.java new file mode 100644 index 000000000..50db00935 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Divide_1.java @@ -0,0 +1,203 @@ +public class Divide_1 +{ + static int b = Integer.parseInt ("-1"); + int b1 = Integer.parseInt ("-1"); + static int zero = Integer.parseInt ("0"); + + void probe_1 () + { + try { + int a = Integer.parseInt ("-80000000", 16); + int c = a/b; + System.out.println (c); + } catch (Exception _) { + System.out.println (_); + } + + try { + int a = Integer.parseInt ("-80000000", 16); + int c = a/-1; + System.out.println (c); + } catch (Exception _) { + System.out.println (_); + } + + try { + int a = Integer.parseInt ("-80000000", 16); + int c = a%b; + System.out.println (c); + } catch (Exception _) { + System.out.println (_); + } + + try { + int a = Integer.parseInt ("-80000000", 16); + int c = a%b1; + System.out.println (c); + } catch (Exception _) { + System.out.println (_); + } + + try { + int a = Integer.parseInt ("-80000000", 16); + int c = a%-1; + System.out.println (c); + } catch (Exception _) { + System.out.println (_); + } + + try { + int a = Integer.parseInt ("8000", 16); + int b = Integer.parseInt ("0", 16); + int c = a/b; + System.out.println (c); + } catch (Exception _) { + System.out.println (_); + } + + try { + int a = Integer.parseInt ("8000", 16); + int b = Integer.parseInt ("0", 16); + int c = a%b; + System.out.println (c); + } catch (Exception _) { + System.out.println (_); + } + + try { + long a = Long.parseLong ("-8000000000000000", 16); + long c = a/b; + System.out.println (c); + } catch (Exception _) { + System.out.println (_); + } + + try { + long a = Long.parseLong ("-8000000000000000", 16); + long c = a%b; + System.out.println (c); + } catch (Exception _) { + System.out.println (_); + } + + try { + long a = Long.parseLong ("8000", 16); + long b = Long.parseLong ("0", 16); + long c = a/b; + System.out.println (c); + } catch (Exception _) { + System.out.println (_); + } + + try { + long a = Long.parseLong ("8000", 16); + long b = Long.parseLong ("0", 16); + long c = a%b; + System.out.println (c); + } catch (Exception _) { + System.out.println (_); + } + } + + void probe_2 () + { + try { + int a = -0x80000000; + int c = a/b; + System.out.println (c); + } catch (Exception _) { + System.out.println (_); + } + + try { + int a = -0x80000000; + int c = a/-1; + System.out.println (c); + } catch (Exception _) { + System.out.println (_); + } + + try { + int a = -0x80000000; + int c = a%b; + System.out.println (c); + } catch (Exception _) { + System.out.println (_); + } + + try { + int a = -0x80000000; + int c = a%b1; + System.out.println (c); + } catch (Exception _) { + System.out.println (_); + } + + try { + int a = -0x80000000; + int c = a%-1; + System.out.println (c); + } catch (Exception _) { + System.out.println (_); + } + + try { + int a = 0x8000; + int b = 0; + int c = a/b; + System.out.println (c); + } catch (Exception _) { + System.out.println (_); + } + + try { + int a = 0x8000; + int b = 0; + int c = a%b; + System.out.println (c); + } catch (Exception _) { + System.out.println (_); + } + + try { + long a = -0x7fffffffffffffffL - 1; + long c = a/b; + System.out.println (c); + } catch (Exception _) { + System.out.println (_); + } + + try { + long a = -0x7fffffffffffffffL - 1; + long c = a%b; + System.out.println (c); + } catch (Exception _) { + System.out.println (_); + } + + try { + long a = 0x8000; + long b = 0; + long c = a/b; + System.out.println (c); + } catch (Exception _) { + System.out.println (_); + } + + try { + long a = 0x8000; + long b = 0; + long c = a%b; + System.out.println (c); + } catch (Exception _) { + System.out.println (_); + } + } + + public static void main (String[] args) + { + Divide_1 d = new Divide_1 (); + d.probe_1 (); + d.probe_2 (); + } +} diff --git a/libjava/testsuite/libjava.lang/Divide_1.out b/libjava/testsuite/libjava.lang/Divide_1.out new file mode 100644 index 000000000..be5d07c72 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Divide_1.out @@ -0,0 +1,22 @@ +-2147483648 +-2147483648 +0 +0 +0 +java.lang.ArithmeticException: / by zero +java.lang.ArithmeticException: / by zero +-9223372036854775808 +0 +java.lang.ArithmeticException: / by zero +java.lang.ArithmeticException: / by zero +-2147483648 +-2147483648 +0 +0 +0 +java.lang.ArithmeticException: / by zero +java.lang.ArithmeticException: / by zero +-9223372036854775808 +0 +java.lang.ArithmeticException: / by zero +java.lang.ArithmeticException: / by zero diff --git a/libjava/testsuite/libjava.lang/Divide_2.jar b/libjava/testsuite/libjava.lang/Divide_2.jar Binary files differnew file mode 100644 index 000000000..f16e8e6fc --- /dev/null +++ b/libjava/testsuite/libjava.lang/Divide_2.jar diff --git a/libjava/testsuite/libjava.lang/Divide_2.java b/libjava/testsuite/libjava.lang/Divide_2.java new file mode 100644 index 000000000..6f2bac81c --- /dev/null +++ b/libjava/testsuite/libjava.lang/Divide_2.java @@ -0,0 +1,20 @@ +public class Divide_2 +{ + static void poo() + { + int n = 4/0; + } + public static void main(String[] argv) + { + try + { + poo(); + } + catch (ArithmeticException _) + { + return; + } + + throw new RuntimeException(); + } +} diff --git a/libjava/testsuite/libjava.lang/Divide_2.out b/libjava/testsuite/libjava.lang/Divide_2.out new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/libjava/testsuite/libjava.lang/Divide_2.out diff --git a/libjava/testsuite/libjava.lang/EvaluationOrder.jar b/libjava/testsuite/libjava.lang/EvaluationOrder.jar Binary files differnew file mode 100644 index 000000000..f122c7223 --- /dev/null +++ b/libjava/testsuite/libjava.lang/EvaluationOrder.jar diff --git a/libjava/testsuite/libjava.lang/EvaluationOrder.java b/libjava/testsuite/libjava.lang/EvaluationOrder.java new file mode 100644 index 000000000..7c09bbb9c --- /dev/null +++ b/libjava/testsuite/libjava.lang/EvaluationOrder.java @@ -0,0 +1,22 @@ +public class EvaluationOrder + { + private static int first (int x, int y) + { + return x; + } + + public static void main (String[] args) + { + int l = args.length; + + /* This should print: + 0 + 0 + 1 + */ + System.out.println (l); + System.out.println (first (l, ++l)); + System.out.println (l); + } + } + diff --git a/libjava/testsuite/libjava.lang/EvaluationOrder.out b/libjava/testsuite/libjava.lang/EvaluationOrder.out new file mode 100644 index 000000000..bb5ee5c21 --- /dev/null +++ b/libjava/testsuite/libjava.lang/EvaluationOrder.out @@ -0,0 +1,3 @@ +0 +0 +1 diff --git a/libjava/testsuite/libjava.lang/ExtraClassLoader.jar b/libjava/testsuite/libjava.lang/ExtraClassLoader.jar Binary files differnew file mode 100644 index 000000000..0230f87ca --- /dev/null +++ b/libjava/testsuite/libjava.lang/ExtraClassLoader.jar diff --git a/libjava/testsuite/libjava.lang/ExtraClassLoader.java b/libjava/testsuite/libjava.lang/ExtraClassLoader.java new file mode 100644 index 000000000..6b0297cc8 --- /dev/null +++ b/libjava/testsuite/libjava.lang/ExtraClassLoader.java @@ -0,0 +1,36 @@ +// PR java/18036 + +public class ExtraClassLoader extends ClassLoader +{ + public static void main(String args[]) throws Exception + { + ClassLoader loader = new ExtraClassLoader(); + Class c = Class.forName("C", false, loader); + Object o = c.newInstance(); + System.out.println(o.getClass() == c); + System.out.println(c.getClassLoader() == loader); + } + + public Class findClass(String name) throws ClassNotFoundException + { + return defineClass("C", Cbytes, 0, Cbytes.length); + } + + /* + * Generated by compiling the following program with gcj -C C.java: + * + * public class C + * { + * public C() throws ClassNotFoundException + * { + * System.out.println(getClass() == Class.forName("C")); + * } + * } + * + * And then processing the byte code as follows: + * od -w1000 -An -td1 C.class | sed "s/\ \+/,/g" + */ + private static byte[] Cbytes = new byte[] { +-54,-2,-70,-66,0,3,0,45,0,39,1,0,1,67,7,0,1,1,0,16,106,97,118,97,47,108,97,110,103,47,79,98,106,101,99,116,7,0,3,1,0,6,60,105,110,105,116,62,1,0,3,40,41,86,1,0,4,67,111,100,101,12,0,5,0,6,10,0,4,0,8,1,0,16,106,97,118,97,47,108,97,110,103,47,83,121,115,116,101,109,7,0,10,1,0,3,111,117,116,1,0,21,76,106,97,118,97,47,105,111,47,80,114,105,110,116,83,116,114,101,97,109,59,12,0,12,0,13,9,0,11,0,14,1,0,8,103,101,116,67,108,97,115,115,1,0,19,40,41,76,106,97,118,97,47,108,97,110,103,47,67,108,97,115,115,59,12,0,16,0,17,10,0,4,0,18,8,0,1,1,0,15,106,97,118,97,47,108,97,110,103,47,67,108,97,115,115,7,0,21,1,0,7,102,111,114,78,97,109,101,1,0,37,40,76,106,97,118,97,47,108,97,110,103,47,83,116,114,105,110,103,59,41,76,106,97,118,97,47,108,97,110,103,47,67,108,97,115,115,59,12,0,23,0,24,10,0,22,0,25,1,0,19,106,97,118,97,47,105,111,47,80,114,105,110,116,83,116,114,101,97,109,7,0,27,1,0,7,112,114,105,110,116,108,110,1,0,4,40,90,41,86,12,0,29,0,30,10,0,28,0,31,1,0,15,76,105,110,101,78,117,109,98,101,114,84,97,98,108,101,1,0,10,69,120,99,101,112,116,105,111,110,115,1,0,32,106,97,118,97,47,108,97,110,103,47,67,108,97,115,115,78,111,116,70,111,117,110,100,69,120,99,101,112,116,105,111,110,7,0,35,1,0,10,83,111,117,114,99,101,70,105,108,101,1,0,6,67,46,106,97,118,97,0,33,0,2,0,4,0,0,0,0,0,1,0,1,0,5,0,6,0,2,0,7,0,0,0,52,0,3,0,1,0,0,0,28,42,-73,0,9,-78,0,15,42,-74,0,19,18,20,-72,0,26,-90,0,7,4,-89,0,4,3,-74,0,32,-79,0,0,0,1,0,33,0,0,0,6,0,1,0,4,0,5,0,34,0,0,0,4,0,1,0,36,0,1,0,37,0,0,0,2,0,38 + }; +} diff --git a/libjava/testsuite/libjava.lang/ExtraClassLoader.out b/libjava/testsuite/libjava.lang/ExtraClassLoader.out new file mode 100644 index 000000000..b979d62f4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/ExtraClassLoader.out @@ -0,0 +1,3 @@ +true +true +true diff --git a/libjava/testsuite/libjava.lang/FileHandleGcTest.jar b/libjava/testsuite/libjava.lang/FileHandleGcTest.jar Binary files differnew file mode 100644 index 000000000..b3fc4bd3c --- /dev/null +++ b/libjava/testsuite/libjava.lang/FileHandleGcTest.jar diff --git a/libjava/testsuite/libjava.lang/FileHandleGcTest.java b/libjava/testsuite/libjava.lang/FileHandleGcTest.java new file mode 100644 index 000000000..8405ead31 --- /dev/null +++ b/libjava/testsuite/libjava.lang/FileHandleGcTest.java @@ -0,0 +1,24 @@ +// Make sure that file handles are garbage collected. +import java.io.*; +public class FileHandleGcTest +{ + static void kill () throws FileNotFoundException + { + for (int i = 0; i < 65536; i++) + { + FileInputStream f = new FileInputStream ("/dev/null"); + } + } + + public static void + main (String argv []) + { + try + { + kill (); + } + catch (FileNotFoundException _) + { + } + } +} diff --git a/libjava/testsuite/libjava.lang/FileHandleGcTest.out b/libjava/testsuite/libjava.lang/FileHandleGcTest.out new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/libjava/testsuite/libjava.lang/FileHandleGcTest.out diff --git a/libjava/testsuite/libjava.lang/Final.jar b/libjava/testsuite/libjava.lang/Final.jar Binary files differnew file mode 100644 index 000000000..5c64878e3 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Final.jar diff --git a/libjava/testsuite/libjava.lang/Final.java b/libjava/testsuite/libjava.lang/Final.java new file mode 100644 index 000000000..1b22096c3 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Final.java @@ -0,0 +1,20 @@ +public final class Final +{ + public static void main(String args[]) + { + Final f = null; + try + { + f.doSomething(); + } + catch (NullPointerException x) + { + System.out.println("NullPointerException - ok"); + } + } + + void doSomething() + { + System.out.println("This should not happen"); + } +} diff --git a/libjava/testsuite/libjava.lang/Final.out b/libjava/testsuite/libjava.lang/Final.out new file mode 100644 index 000000000..2e513123d --- /dev/null +++ b/libjava/testsuite/libjava.lang/Final.out @@ -0,0 +1 @@ +NullPointerException - ok diff --git a/libjava/testsuite/libjava.lang/Float_1.jar b/libjava/testsuite/libjava.lang/Float_1.jar Binary files differnew file mode 100644 index 000000000..20a6ff00d --- /dev/null +++ b/libjava/testsuite/libjava.lang/Float_1.jar diff --git a/libjava/testsuite/libjava.lang/Float_1.java b/libjava/testsuite/libjava.lang/Float_1.java new file mode 100644 index 000000000..cb147ee8a --- /dev/null +++ b/libjava/testsuite/libjava.lang/Float_1.java @@ -0,0 +1,52 @@ +/* + +Date: 25 Aug 1998 16:04:00 -0000 +From: Andrew Haley <aph@pasanda.cygnus.co.uk> +To: java-project@cygnus.com +Subject: Help: vtable problem? + +My little program: + +----------------------------------------------------------------------- +import java.lang.*; + + public class widget + { + public static void main (String argv[]) + { + int test = Float.floatToIntBits((float)2.0); + String s = Integer.toHexString(test); + + System.out.print (s+"\n"); + } + + } +----------------------------------------------------------------------- +prints out + +40000000 + +with Sun's interpreter, but prints out + +true + +when compiled with gcj; PrintStream dispatches a string arg as a +boolean rather than as a String. I've tried to rebuild everything. + +? + +Thanks, +Andrew. + +*/ + +public class Float_1 +{ + public static void main (String argv[]) + { + int test = Float.floatToIntBits((float)2.0); + String s = Integer.toHexString(test); + + System.out.print (s+"\n"); + } +} diff --git a/libjava/testsuite/libjava.lang/Float_1.out b/libjava/testsuite/libjava.lang/Float_1.out new file mode 100644 index 000000000..52f3f6a74 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Float_1.out @@ -0,0 +1 @@ +40000000 diff --git a/libjava/testsuite/libjava.lang/Float_2.jar b/libjava/testsuite/libjava.lang/Float_2.jar Binary files differnew file mode 100644 index 000000000..e3ee41335 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Float_2.jar diff --git a/libjava/testsuite/libjava.lang/Float_2.java b/libjava/testsuite/libjava.lang/Float_2.java new file mode 100644 index 000000000..5d019533d --- /dev/null +++ b/libjava/testsuite/libjava.lang/Float_2.java @@ -0,0 +1,138 @@ +// Test floating-point to integer conversion. We do this twice, once +// with literal conversions that can be optimized away and once using +// a static field that can't. + +public class Float_2 +{ + public static double zero = 0.0; + + public static void main (String argv[]) + { + { + int itest = (int)(float)(0.0/0.0); + if (itest != 0) + System.err.println ("literal inf error 1: " + itest); + } + { + int itest = (int)(0.0/0.0); + if (itest != 0) + System.err.println ("literal inf error 2" + itest); + } + { + long ltest = (long)(0.0/0.0); + if (ltest != 0) + System.err.println ("literal inf error 3" + ltest); + } + { + long ltest = (long)(float)(0.0/0.0); + if (ltest != 0) + System.err.println ("literal inf error 4" + ltest); + } + + { + int itest = (int)(float)(1.0/0.0); + if (itest != Integer.MAX_VALUE) + System.err.println ("literal max error 1: " + itest); + } + { + int itest = (int)(1.0/0.0); + if (itest != Integer.MAX_VALUE) + System.err.println ("literal max error 2" + itest); + } + { + long ltest = (long)(1.0/0.0); + if (ltest != Long.MAX_VALUE) + System.err.println ("literal max error 3" + ltest); + } + { + long ltest = (long)(float)(1.0/0.0); + if (ltest != Long.MAX_VALUE) + System.err.println ("literal max error 4" + ltest); + } + + { + int itest = (int)(float)(-1.0/0.0); + if (itest != Integer.MIN_VALUE) + System.err.println ("literal min error 1: " + itest); + } + { + int itest = (int)(-1.0/0.0); + if (itest != Integer.MIN_VALUE) + System.err.println ("literal min error 2" + itest); + } + { + long ltest = (long)(-1.0/0.0); + if (ltest != Long.MIN_VALUE) + System.err.println ("literal min error 3" + ltest); + } + { + long ltest = (long)(float)(-1.0/0.0); + if (ltest != Long.MIN_VALUE) + System.err.println ("literal min error 4" + ltest); + } + + { + int itest = (int)(float)(zero/zero); + if (itest != 0) + System.err.println ("calc inf error 1: " + itest); + } + { + int itest = (int)(zero/zero); + if (itest != 0) + System.err.println ("calc inf error 2" + itest); + } + { + long ltest = (long)(zero/zero); + if (ltest != 0) + System.err.println ("calc inf error 3" + ltest); + } + { + long ltest = (long)(float)(zero/zero); + if (ltest != 0) + System.err.println ("calc inf error 4" + ltest); + } + + { + int itest = (int)(float)(1.0/zero); + if (itest != Integer.MAX_VALUE) + System.err.println ("calc max error 1: " + itest); + } + { + int itest = (int)(1.0/zero); + if (itest != Integer.MAX_VALUE) + System.err.println ("calc max error 2" + itest); + } + { + long ltest = (long)(1.0/zero); + if (ltest != Long.MAX_VALUE) + System.err.println ("calc max error 3" + ltest); + } + { + long ltest = (long)(float)(1.0/zero); + if (ltest != Long.MAX_VALUE) + System.err.println ("calc max error 4" + ltest); + } + + { + int itest = (int)(float)(-1.0/zero); + if (itest != Integer.MIN_VALUE) + System.err.println ("calc min error 1: " + itest); + } + { + int itest = (int)(-1.0/zero); + if (itest != Integer.MIN_VALUE) + System.err.println ("calc min error 2" + itest); + } + { + long ltest = (long)(-1.0/zero); + if (ltest != Long.MIN_VALUE) + System.err.println ("calc min error 3" + ltest); + } + { + long ltest = (long)(float)(-1.0/zero); + if (ltest != Long.MIN_VALUE) + System.err.println ("calc min error 4" + ltest); + } + + } +} diff --git a/libjava/testsuite/libjava.lang/Float_2.out b/libjava/testsuite/libjava.lang/Float_2.out new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/libjava/testsuite/libjava.lang/Float_2.out diff --git a/libjava/testsuite/libjava.lang/G19990301_01.jar b/libjava/testsuite/libjava.lang/G19990301_01.jar Binary files differnew file mode 100644 index 000000000..fd33638c1 --- /dev/null +++ b/libjava/testsuite/libjava.lang/G19990301_01.jar diff --git a/libjava/testsuite/libjava.lang/G19990301_01.java b/libjava/testsuite/libjava.lang/G19990301_01.java new file mode 100644 index 000000000..abd38cef4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/G19990301_01.java @@ -0,0 +1,12 @@ +public class G19990301_01 { + public static void main(String args[]) { + foo pd = new foo(); + System.out.println ("Pass 1"); + pd.s = "test"; + System.out.println ("Pass 2"); + } +} +class foo { + static String s = "test"; +} + diff --git a/libjava/testsuite/libjava.lang/G19990301_01.out b/libjava/testsuite/libjava.lang/G19990301_01.out new file mode 100644 index 000000000..337175ef7 --- /dev/null +++ b/libjava/testsuite/libjava.lang/G19990301_01.out @@ -0,0 +1,2 @@ +Pass 1 +Pass 2 diff --git a/libjava/testsuite/libjava.lang/G19990302_02.jar b/libjava/testsuite/libjava.lang/G19990302_02.jar Binary files differnew file mode 100644 index 000000000..bc4f2692a --- /dev/null +++ b/libjava/testsuite/libjava.lang/G19990302_02.jar diff --git a/libjava/testsuite/libjava.lang/G19990302_02.java b/libjava/testsuite/libjava.lang/G19990302_02.java new file mode 100644 index 000000000..ecf6f295e --- /dev/null +++ b/libjava/testsuite/libjava.lang/G19990302_02.java @@ -0,0 +1,15 @@ +public class G19990302_02 { + public static void main(String args[]) { + try { + Object[] arrayObj = new String[3]; + String[] arrayStr = new String[3]; + System.out.println ("Pass 1"); + arrayObj[0] = arrayStr; // String object <-- String array object + System.out.println ("Pass 2"); + } catch (ArrayStoreException e) { + System.out.println ("ArrayStoreException"); + } + System.out.println ("Pass 3"); + } +} + diff --git a/libjava/testsuite/libjava.lang/G19990302_02.out b/libjava/testsuite/libjava.lang/G19990302_02.out new file mode 100644 index 000000000..c254b310e --- /dev/null +++ b/libjava/testsuite/libjava.lang/G19990302_02.out @@ -0,0 +1,3 @@ +Pass 1 +ArrayStoreException +Pass 3 diff --git a/libjava/testsuite/libjava.lang/G19990303_01.jar b/libjava/testsuite/libjava.lang/G19990303_01.jar Binary files differnew file mode 100644 index 000000000..b3e194103 --- /dev/null +++ b/libjava/testsuite/libjava.lang/G19990303_01.jar diff --git a/libjava/testsuite/libjava.lang/G19990303_01.java b/libjava/testsuite/libjava.lang/G19990303_01.java new file mode 100644 index 000000000..fc3ca5528 --- /dev/null +++ b/libjava/testsuite/libjava.lang/G19990303_01.java @@ -0,0 +1,19 @@ +public class G19990303_01 +{ + public static void main (String[] args) + { + try + { + Object[] ar = new String[3]; + String[] as = new String[3]; + System.out.println("1"); + ar[0] = as; + System.out.println("2"); + } + catch (Exception _) + { + System.out.println("X"); + } + System.out.println("3"); + } +} diff --git a/libjava/testsuite/libjava.lang/G19990303_01.out b/libjava/testsuite/libjava.lang/G19990303_01.out new file mode 100644 index 000000000..f081db642 --- /dev/null +++ b/libjava/testsuite/libjava.lang/G19990303_01.out @@ -0,0 +1,3 @@ +1 +X +3 diff --git a/libjava/testsuite/libjava.lang/G19990303_02.jar b/libjava/testsuite/libjava.lang/G19990303_02.jar Binary files differnew file mode 100644 index 000000000..e5ef15c3c --- /dev/null +++ b/libjava/testsuite/libjava.lang/G19990303_02.jar diff --git a/libjava/testsuite/libjava.lang/G19990303_02.java b/libjava/testsuite/libjava.lang/G19990303_02.java new file mode 100644 index 000000000..19c8e305e --- /dev/null +++ b/libjava/testsuite/libjava.lang/G19990303_02.java @@ -0,0 +1,19 @@ +public class G19990303_02 +{ + public static void main (String[] args) + { + int i = -1; + try + { + System.out.println ("Pass 1"); + int[][][] arrayInt = new int[i][1][1]; + int ii = arrayInt[i - 1][0][0]; + System.out.println ("Pass 2"); + } + catch (NegativeArraySizeException e) + { + System.out.println ("Pass NegativeArraySizeException"); + } + System.out.println ("Pass 3"); + } +} diff --git a/libjava/testsuite/libjava.lang/G19990303_02.out b/libjava/testsuite/libjava.lang/G19990303_02.out new file mode 100644 index 000000000..940225527 --- /dev/null +++ b/libjava/testsuite/libjava.lang/G19990303_02.out @@ -0,0 +1,3 @@ +Pass 1 +Pass NegativeArraySizeException +Pass 3 diff --git a/libjava/testsuite/libjava.lang/G19990304_01.jar b/libjava/testsuite/libjava.lang/G19990304_01.jar Binary files differnew file mode 100644 index 000000000..1cf234a85 --- /dev/null +++ b/libjava/testsuite/libjava.lang/G19990304_01.jar diff --git a/libjava/testsuite/libjava.lang/G19990304_01.java b/libjava/testsuite/libjava.lang/G19990304_01.java new file mode 100644 index 000000000..f937089e1 --- /dev/null +++ b/libjava/testsuite/libjava.lang/G19990304_01.java @@ -0,0 +1,18 @@ +public class G19990304_01 +{ + public static void main (String[] args) + { + Object[] arrayObj = new String[3]; + String[] arrayStr = new String[3]; + try + { + System.out.println ("pass 1"); + arrayObj[0] = arrayStr; + } + catch (RuntimeException e) + { + System.out.println ("RuntimeException"); + } + System.out.println ("pass 2"); + } +} diff --git a/libjava/testsuite/libjava.lang/G19990304_01.out b/libjava/testsuite/libjava.lang/G19990304_01.out new file mode 100644 index 000000000..6fe123eea --- /dev/null +++ b/libjava/testsuite/libjava.lang/G19990304_01.out @@ -0,0 +1,3 @@ +pass 1 +RuntimeException +pass 2 diff --git a/libjava/testsuite/libjava.lang/G19990310_01.jar b/libjava/testsuite/libjava.lang/G19990310_01.jar Binary files differnew file mode 100644 index 000000000..e689e43b1 --- /dev/null +++ b/libjava/testsuite/libjava.lang/G19990310_01.jar diff --git a/libjava/testsuite/libjava.lang/G19990310_01.java b/libjava/testsuite/libjava.lang/G19990310_01.java new file mode 100644 index 000000000..72caece57 --- /dev/null +++ b/libjava/testsuite/libjava.lang/G19990310_01.java @@ -0,0 +1,21 @@ +public class G19990310_01 +{ + public static void main (String[] args) + { + int i = 0; + try + { + System.out.println ("pass 1"); + i++; + } + finally + { + System.out.println ("pass 2"); + i++; + } + if (i == 2) + System.out.println ("OK"); + else + System.out.println ("NG i = " + i); + } +} diff --git a/libjava/testsuite/libjava.lang/G19990310_01.out b/libjava/testsuite/libjava.lang/G19990310_01.out new file mode 100644 index 000000000..36a538b4a --- /dev/null +++ b/libjava/testsuite/libjava.lang/G19990310_01.out @@ -0,0 +1,3 @@ +pass 1 +pass 2 +OK diff --git a/libjava/testsuite/libjava.lang/II.jar b/libjava/testsuite/libjava.lang/II.jar Binary files differnew file mode 100644 index 000000000..22d15cd4e --- /dev/null +++ b/libjava/testsuite/libjava.lang/II.jar diff --git a/libjava/testsuite/libjava.lang/II.java b/libjava/testsuite/libjava.lang/II.java new file mode 100644 index 000000000..2791366ee --- /dev/null +++ b/libjava/testsuite/libjava.lang/II.java @@ -0,0 +1,16 @@ +public class II { + { + System.out.println("ii"); + } + public II() + { + } + public II(int x) + { + this(); + } + public static void main(String[] args) + { + new II(0); + } +} diff --git a/libjava/testsuite/libjava.lang/II.out b/libjava/testsuite/libjava.lang/II.out new file mode 100644 index 000000000..9352d8c22 --- /dev/null +++ b/libjava/testsuite/libjava.lang/II.out @@ -0,0 +1 @@ +ii diff --git a/libjava/testsuite/libjava.lang/InterfaceDispatch.jar b/libjava/testsuite/libjava.lang/InterfaceDispatch.jar Binary files differnew file mode 100644 index 000000000..1f87ec30c --- /dev/null +++ b/libjava/testsuite/libjava.lang/InterfaceDispatch.jar diff --git a/libjava/testsuite/libjava.lang/InterfaceDispatch.java b/libjava/testsuite/libjava.lang/InterfaceDispatch.java new file mode 100644 index 000000000..17f5c4694 --- /dev/null +++ b/libjava/testsuite/libjava.lang/InterfaceDispatch.java @@ -0,0 +1,403 @@ +/* Test interface dispatch, type checking (instanceof), and casting. */ + +interface IA +{ + String a(); +} + +interface IB extends IA +{ + String b(); +} + +interface IC extends IB +{ + void c(); + int d(); + IB e(int i); +} + +interface ID +{ + String z(); + String a(); +} + +class CA +{ + String a() + { + return "CA a()"; + } +} + +class CB implements IB +{ + public String a() + { + return "CB a()"; + } + + public String b() + { + return "CB b()"; + } +} + +class CC extends CB +{ + public int d() + { + return 99; + } +} + +class CD extends CC implements IC +{ + public String a() + { + return "CD a()"; + } + + public void c() + { + System.out.println("CD c()"); + } + + public int d() + { + return 6; + } + + public IB e(int i) + { + if (i == 1) + return new CB(); + else + return new CD(); + } +} + +class CE extends CB implements IB, ID +{ + public String a() + { + return ("CE a()"); + } + + public String b() + { + return ("CE b()"); + } + + public String z() + { + return("CE z()"); + } +} + + +public class InterfaceDispatch +{ + public static void main(String args[]) + { + new InterfaceDispatch(); + } + + public InterfaceDispatch() + { + /* _Jv_InstanceOf */ + + /* Object instanceof CLASS */ + Object obj = new CA(); + + if (obj instanceof CA) + { + System.out.println ("ok 1"); + } + else + { + System.out.println ("FAIL 1"); + } + + obj = new CD(); + + if (!(obj instanceof CA)) + { + System.out.println ("ok 2a"); + } + else + { + System.out.println ("FAIL 2a"); + } + + if (obj instanceof CB) + { + System.out.println ("ok 2b"); + } + else + { + System.out.println ("FAIL 2b"); + } + + + /* Object instanceof INTERFACE */ + obj = new CB(); + + if (!(obj instanceof IC)) + { + System.out.println("ok 3"); + } + else + { + System.out.println ("FAIL 3"); + } + + if (obj instanceof IB) + { + System.out.println("ok 4"); + } + else + { + System.out.println ("FAIL 4"); + } + + /* InterfaceRef instanceof INTERFACE */ + + IA ia = new CB(); + + if (ia instanceof IB) + { + System.out.println("ok 5"); + } + else + { + System.out.println ("FAIL 5"); + } + + + if (!(ia instanceof IC)) + { + System.out.println("ok 6"); + } + else + { + System.out.println ("FAIL 6"); + } + + /* InterfaceRef instanceof CLASS */ + + if (ia instanceof CB) + { + System.out.println("ok 7"); + } + else + { + System.out.println ("FAIL 7"); + } + + + if (!(ia instanceof CD)) + { + System.out.println("ok 8"); + } + else + { + System.out.println ("FAIL 8"); + } + + + /* _Jv_CheckCast */ + Object obj_ca = new CA(); + Object obj_cc = new CC(); + + IA ia2; + + try + { + ia2 = (IA) obj_cc; + System.out.println("ok 9"); + } + catch (ClassCastException x) + { + System.out.println("FAIL 9"); + } + + CD cd; + + try + { + cd = (CD) obj_ca; + System.out.println("FAIL 10"); + } + catch (ClassCastException x) + { + System.out.println("ok 10"); + } + + IA ia3; + + try + { + ia3 = (IB) obj_ca; + System.out.println("FAIL 11"); + } + catch (ClassCastException x) + { + System.out.println("ok 11"); + } + + /* _Jv_LookupInterfaceMethod */ + Object obj_cb = new CB(); + + IB ib = (IB) obj_cb; + ib.b(); + if (ib.a().equalsIgnoreCase("CB a()")) + System.out.println("ok 12"); + else + System.out.println("FAIL 12"); + + IC ic = new CD(); + if (ic.a().equalsIgnoreCase("CD a()")) + System.out.println("ok 13"); + else + System.out.println("FAIL 13"); + + if (ic.d() == 6) + System.out.println("ok 14"); + else + System.out.println("FAIL 14"); + + Object ce = new CE(); + + ib = (IB) ce; + ID id = (ID) ce; + + if (ib.b().equals("CE b()") && id.a().equals("CE a()")) + System.out.println("ok 15"); + else + System.out.println("FAIL 15"); + + String t = ((ID)ce).z(); + + if (t.equalsIgnoreCase("CE z()")) + System.out.println("ok 16"); + else + System.out.println("FAIL 16"); + + /* Array types */ + + Object[] obj_a = new CC[10]; + try + { + CB[] ca_a = (CB[]) obj_a; + System.out.println("ok 17"); + } + catch (ClassCastException x) + { + System.out.println("FAIL 17"); + } + + if (obj_a instanceof IB[]) + { + System.out.println("ok 18"); + } + else + { + System.out.println("FAIL 18"); + } + + IB[] ib_a = new CD[5]; + try + { + CD[] cd_a = (CD[]) ib_a; + System.out.println("ok 19"); + } + catch (ClassCastException x) + { + System.out.println("FAIL 19"); + } + + CA[] ca_a; + + try + { + ca_a = (CA[]) ib_a; + System.out.println("FAIL 20"); + } + catch (ClassCastException x) + { + System.out.println("ok 20"); + } + + + /* Primitive types */ + + short[] short_a = new short[100]; + + try + { + obj = short_a; + System.out.println("ok 21"); + } + catch (ClassCastException x) + { + System.out.println("FAIL 21"); + } + + try + { + short[] short_b = (short[]) obj; + System.out.println("ok 22"); + } + catch (ClassCastException x) + { + System.out.println("FAIL 22"); + } + + int[] short_b; + + try + { + short_b = (int[]) obj; + System.out.println("FAIL 23"); + } + catch (ClassCastException x) + { + System.out.println("ok 23"); + } + + Object obj1 = new int[25]; + + if (obj1 instanceof short[]) + { + System.out.println("FAIL 24"); + } + else + { + System.out.println("ok 24"); + } + + if (obj1 instanceof int[]) + { + System.out.println("ok 25"); + } + else + { + System.out.println("FAIL 25"); + } + + /* null assignment */ + + CA obj_ca2 = null; + + if (obj_ca2 instanceof CA) + { + System.out.println("FAIL 26"); + } + else + { + System.out.println("ok 26"); + } + } +} diff --git a/libjava/testsuite/libjava.lang/InterfaceDispatch.out b/libjava/testsuite/libjava.lang/InterfaceDispatch.out new file mode 100644 index 000000000..1582e3afa --- /dev/null +++ b/libjava/testsuite/libjava.lang/InterfaceDispatch.out @@ -0,0 +1,27 @@ +ok 1 +ok 2a +ok 2b +ok 3 +ok 4 +ok 5 +ok 6 +ok 7 +ok 8 +ok 9 +ok 10 +ok 11 +ok 12 +ok 13 +ok 14 +ok 15 +ok 16 +ok 17 +ok 18 +ok 19 +ok 20 +ok 21 +ok 22 +ok 23 +ok 24 +ok 25 +ok 26 diff --git a/libjava/testsuite/libjava.lang/InvokeInterface.jar b/libjava/testsuite/libjava.lang/InvokeInterface.jar Binary files differnew file mode 100644 index 000000000..55a923a68 --- /dev/null +++ b/libjava/testsuite/libjava.lang/InvokeInterface.jar diff --git a/libjava/testsuite/libjava.lang/InvokeInterface.java b/libjava/testsuite/libjava.lang/InvokeInterface.java new file mode 100644 index 000000000..6f4dc617d --- /dev/null +++ b/libjava/testsuite/libjava.lang/InvokeInterface.java @@ -0,0 +1,55 @@ +import java.lang.reflect.*; + +interface one +{ + int n(int N); +} + +interface two +{ + int nn(int N); +} + +interface three +{ + int nnn(int N); +} + +class arse implements one, two +{ + public int n(int N) { return N; } + public int nn(int N) { return N*2; } +} + +class arsey implements two, one, three +{ + public int n(int N) { return N*4; } + public int nn(int N) { return N*8; } + public int nnn(int N) { return N*16; } +} + +public class InvokeInterface extends arse +{ + int f () + { + return flunk.nn(1); + } + static two flunk = new arse(); + static three flunkey = new arsey(); + public static void main(String[] s) throws Throwable + { + Class[] argtypes = {Integer.TYPE}; + Method m = two.class.getMethod("nn", argtypes); + Object[] args = {new Integer(1)}; + System.out.println(flunk.nn(1)); + System.out.println(m.invoke(new arse(), args)); + m = arse.class.getMethod("nn", argtypes); + System.out.println(m.invoke(new arse(), args)); + m = two.class.getMethod("nn", argtypes); + System.out.println(m.invoke(new arsey(), args)); + m = three.class.getMethod("nnn", argtypes); + System.out.println(m.invoke(new arsey(), args)); + m = arsey.class.getMethod("nnn", argtypes); + System.out.println(m.invoke(new arsey(), args)); + } +} diff --git a/libjava/testsuite/libjava.lang/InvokeInterface.out b/libjava/testsuite/libjava.lang/InvokeInterface.out new file mode 100644 index 000000000..803d02666 --- /dev/null +++ b/libjava/testsuite/libjava.lang/InvokeInterface.out @@ -0,0 +1,6 @@ +2 +2 +2 +8 +16 +16 diff --git a/libjava/testsuite/libjava.lang/InvokeReturn.jar b/libjava/testsuite/libjava.lang/InvokeReturn.jar Binary files differnew file mode 100644 index 000000000..a64e0d587 --- /dev/null +++ b/libjava/testsuite/libjava.lang/InvokeReturn.jar diff --git a/libjava/testsuite/libjava.lang/InvokeReturn.java b/libjava/testsuite/libjava.lang/InvokeReturn.java new file mode 100644 index 000000000..9263dbe40 --- /dev/null +++ b/libjava/testsuite/libjava.lang/InvokeReturn.java @@ -0,0 +1,80 @@ +import java.lang.reflect.Method; + +// Test return values of Method.invoke. +public class InvokeReturn { + public boolean bTrue() { + return true; + } + + public boolean bFalse() { + return false; + } + + public char cc() { + return 'c'; + } + + public short s5() { + return (short)5; + } + + public int i6() { + return 6; + } + + public long l7() { + return (long)7; + } + + public float f8() { + return (float)8.0; + } + + public double d9() { + return 9.0; + } + + public static void main(String[] args) { + try { + Object o = new InvokeReturn(); + Method m; + + // test boolean result + m = o.getClass().getDeclaredMethod("bTrue", new Class[0]); + System.out.println(m.invoke(o, new Object[0])); + + m = o.getClass().getDeclaredMethod("bFalse", new Class[0]); + System.out.println(m.invoke(o, new Object[0])); + + // test char result + m = o.getClass().getDeclaredMethod("cc", new Class[0]); + System.out.println(m.invoke(o, new Object[0])); + + // test short result + m = o.getClass().getDeclaredMethod("s5", new Class[0]); + System.out.println(m.invoke(o, new Object[0])); + + // test int result + m = o.getClass().getDeclaredMethod("i6", new Class[0]); + System.out.println(m.invoke(o, new Object[0])); + + // test long result + m = o.getClass().getDeclaredMethod("l7", new Class[0]); + System.out.println(m.invoke(o, new Object[0])); + + // test float result + m = o.getClass().getDeclaredMethod("f8", new Class[0]); + System.out.println(m.invoke(o, new Object[0])); + + // test double result + m = o.getClass().getDeclaredMethod("d9", new Class[0]); + System.out.println(m.invoke(o, new Object[0])); + } catch (UnsupportedOperationException e) { + // We get this on targets which don't support reflection (no + // libffi port yet). We might as well fake PASSes. + System.out.println("true\nfalse\nc\n5\n6\n7\n8.0\n9.0"); + } catch (Throwable t) { + t.printStackTrace(); + } + } +} diff --git a/libjava/testsuite/libjava.lang/InvokeReturn.out b/libjava/testsuite/libjava.lang/InvokeReturn.out new file mode 100644 index 000000000..01f864364 --- /dev/null +++ b/libjava/testsuite/libjava.lang/InvokeReturn.out @@ -0,0 +1,8 @@ +true +false +c +5 +6 +7 +8.0 +9.0 diff --git a/libjava/testsuite/libjava.lang/Invoke_1.jar b/libjava/testsuite/libjava.lang/Invoke_1.jar Binary files differnew file mode 100644 index 000000000..6d43ecbba --- /dev/null +++ b/libjava/testsuite/libjava.lang/Invoke_1.jar diff --git a/libjava/testsuite/libjava.lang/Invoke_1.java b/libjava/testsuite/libjava.lang/Invoke_1.java new file mode 100644 index 000000000..bc4678301 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Invoke_1.java @@ -0,0 +1,27 @@ +// Test of failing method invocation. + +public class Invoke_1 +{ + public void call_me () + { + System.out.println ("no"); + } + + public static Invoke_1 get_i () + { + return null; + } + + public static void main (String[] args) + { + Invoke_1 i = get_i (); + try + { + i.call_me (); + } + catch (NullPointerException ok) + { + System.out.println ("ok"); + } + } +} diff --git a/libjava/testsuite/libjava.lang/Invoke_1.out b/libjava/testsuite/libjava.lang/Invoke_1.out new file mode 100644 index 000000000..9766475a4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Invoke_1.out @@ -0,0 +1 @@ +ok diff --git a/libjava/testsuite/libjava.lang/Invoke_2.jar b/libjava/testsuite/libjava.lang/Invoke_2.jar Binary files differnew file mode 100644 index 000000000..ac8882cab --- /dev/null +++ b/libjava/testsuite/libjava.lang/Invoke_2.jar diff --git a/libjava/testsuite/libjava.lang/Invoke_2.java b/libjava/testsuite/libjava.lang/Invoke_2.java new file mode 100644 index 000000000..a2d1407b3 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Invoke_2.java @@ -0,0 +1,20 @@ +public class Invoke_2 +{ + static int s; + + public static void foo (int a, int b) + { + System.out.println(a + " " + b); + } + + public static void main(String[] args) { + foo (bar(), s); + } + + public static int bar() + { + s = 33; + return 99; + } +} + diff --git a/libjava/testsuite/libjava.lang/Invoke_2.out b/libjava/testsuite/libjava.lang/Invoke_2.out new file mode 100644 index 000000000..39501553b --- /dev/null +++ b/libjava/testsuite/libjava.lang/Invoke_2.out @@ -0,0 +1 @@ +99 33 diff --git a/libjava/testsuite/libjava.lang/KeepInline.jar b/libjava/testsuite/libjava.lang/KeepInline.jar Binary files differnew file mode 100644 index 000000000..754becf5f --- /dev/null +++ b/libjava/testsuite/libjava.lang/KeepInline.jar diff --git a/libjava/testsuite/libjava.lang/KeepInline.java b/libjava/testsuite/libjava.lang/KeepInline.java new file mode 100644 index 000000000..8c2672dd0 --- /dev/null +++ b/libjava/testsuite/libjava.lang/KeepInline.java @@ -0,0 +1,18 @@ +// Demonstrate that private methods can be reflected even if they are +// not referenced at compile-time (i.e. -fkeep-inline-functions works). +import java.lang.reflect.Method; +public class KeepInline { + private void example() { + System.out.println("example"); + } + public static void main(String[] args) { + try { + KeepInline pr = new KeepInline(); + Method[] meths = pr.getClass().getDeclaredMethods(); + for (int n = 0; n < meths.length; n++) + System.out.println(meths[n]); + } catch (Throwable t) { + t.printStackTrace(); + } + } +} diff --git a/libjava/testsuite/libjava.lang/KeepInline.out b/libjava/testsuite/libjava.lang/KeepInline.out new file mode 100644 index 000000000..fb96ce4db --- /dev/null +++ b/libjava/testsuite/libjava.lang/KeepInline.out @@ -0,0 +1,2 @@ +private void KeepInline.example() +public static void KeepInline.main(java.lang.String[]) diff --git a/libjava/testsuite/libjava.lang/LargeFile.jar b/libjava/testsuite/libjava.lang/LargeFile.jar Binary files differnew file mode 100644 index 000000000..245fa484f --- /dev/null +++ b/libjava/testsuite/libjava.lang/LargeFile.jar diff --git a/libjava/testsuite/libjava.lang/LargeFile.java b/libjava/testsuite/libjava.lang/LargeFile.java new file mode 100644 index 000000000..1bb8aec8c --- /dev/null +++ b/libjava/testsuite/libjava.lang/LargeFile.java @@ -0,0 +1,36 @@ +/* Test to ensure files >= 2^31 bytes are supported. */ + +import java.io.*; + +public class LargeFile +{ + public static void main(String[] args) throws IOException + { + File file = new File("LargeFile.tmp"); + + try + { + RandomAccessFile rfile = new RandomAccessFile(file, "rw"); + + long pos = (long) Math.pow(2, 31); + + rfile.seek(pos); + rfile.write('O'); + rfile.write('K'); + rfile.close(); + + // Re-open, read byte back using FileInputStream and clean up. + + FileInputStream fis = new FileInputStream(file); + fis.skip(pos); + System.out.print((char) fis.read()); + System.out.println((char) fis.read()); + fis.close(); + } + finally + { + if (file.exists()) + file.delete(); + } + } +} diff --git a/libjava/testsuite/libjava.lang/LargeFile.out b/libjava/testsuite/libjava.lang/LargeFile.out new file mode 100644 index 000000000..d86bac9de --- /dev/null +++ b/libjava/testsuite/libjava.lang/LargeFile.out @@ -0,0 +1 @@ +OK diff --git a/libjava/testsuite/libjava.lang/MathBuiltin.jar b/libjava/testsuite/libjava.lang/MathBuiltin.jar Binary files differnew file mode 100644 index 000000000..4cefc678b --- /dev/null +++ b/libjava/testsuite/libjava.lang/MathBuiltin.jar diff --git a/libjava/testsuite/libjava.lang/MathBuiltin.java b/libjava/testsuite/libjava.lang/MathBuiltin.java new file mode 100644 index 000000000..275a08660 --- /dev/null +++ b/libjava/testsuite/libjava.lang/MathBuiltin.java @@ -0,0 +1,91 @@ +class MathBuiltin +{ + static double abs(double x) + { + return Math.abs(x); + } + + static double acos(double x) + { + return Math.acos(x); + } + + static double asin(double x) + { + return Math.asin(x); + } + + static double atan(double x) + { + return Math.atan(x); + } + + static double atan2(double x, double y) + { + return Math.atan2(x,y); + } + + static double ceil(double x) + { + return Math.ceil(x); + } + + static double cos(double x) + { + return Math.cos(x); + } + + static double exp(double x) + { + return Math.exp(x); + } + + static double floor(double x) + { + return Math.floor(x); + } + + static double log(double x) + { + return Math.log(x); + } + + static double max(double x, double y) + { + return Math.max(x,y); + } + + static double min(double x, double y) + { + return Math.min(x,y); + } + + static double pow(double x, double y) + { + return Math.pow(x,y); + } + + static double sin(double x) + { + return Math.sin(x); + } + + static double sqrt(double x) + { + return Math.sqrt(x); + } + + static double tan(double x) + { + return Math.tan(x); + } + + public static void main(String argv[]) + { + double sum = abs (1.0) + acos (1.0) + asin (1.0) + atan (1.0) + + atan2 (1.0, 1.0) + ceil (1.0) + cos (1.0) + exp (1.0) + + floor (1.0) + log(1.0) + max(1.0, 1.0) + min (1.0, 1.0) + + pow (1.0, 1.0) + sin (1.0) + sqrt(1.0) + tan(1.0); + } +} + diff --git a/libjava/testsuite/libjava.lang/MathBuiltin.out b/libjava/testsuite/libjava.lang/MathBuiltin.out new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/libjava/testsuite/libjava.lang/MathBuiltin.out diff --git a/libjava/testsuite/libjava.lang/Matrix4f.jar b/libjava/testsuite/libjava.lang/Matrix4f.jar Binary files differnew file mode 100644 index 000000000..eaa7241e7 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Matrix4f.jar diff --git a/libjava/testsuite/libjava.lang/Matrix4f.java b/libjava/testsuite/libjava.lang/Matrix4f.java new file mode 100644 index 000000000..dd8829cf4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Matrix4f.java @@ -0,0 +1,129 @@ +/* +* Instance initializers are now turned into a new function instinit$ and called +* from the ctor. SAVE_EXPRs can't be easily shared. +* +* Contributed by Adam King <aking@dreammechanics.com> +* +*/ + +public class Matrix4f +{ + public float m00; + public float m01; + public float m02; + public float m03; + public float m10; + public float m11; + public float m12; + public float m13; + public float m20; + public float m21; + public float m22; + public float m23; + public float m30; + public float m31; + public float m32; + public float m33; + + private float scale; + + static boolean initialized; + static Matrix4f xmat; + static Matrix4f ymat; + static Matrix4f zmat; + static Matrix4f tempMatrix1; + static Matrix4f tempMatrix2; + + { + if( !initialized ) + { + System.out.println ("not initialized"); + initialized = true; + xmat = new Matrix4f(); + ymat = new Matrix4f(); + zmat = new Matrix4f(); + tempMatrix1 = new Matrix4f(); + tempMatrix2 = new Matrix4f(); + } + else { System.out.println ("initialized"); } + + } + + public Matrix4f() + { + m00 = 1; + m01 = 0; + m02 = 0; + m03 = 0; + m10 = 0; + m11 = 1; + m12 = 0; + m13 = 0; + m20 = 0; + m21 = 0; + m22 = 1; + m23 = 0; + m30 = 0; + m31 = 0; + m32 = 0; + m33 = 1; + } + + public Matrix4f( float v[] ) + { + m00 = v[0]; + m01 = v[1]; + m02 = v[2]; + m03 = v[3]; + m10 = v[4]; + m11 = v[5]; + m12 = v[6]; + m13 = v[7]; + m20 = v[8]; + m21 = v[9]; + m22 = v[10]; + m23 = v[11]; + m30 = v[12]; + m31 = v[13]; + m32 = v[14]; + m33 = v[15]; + } + + public Matrix4f( float m00, float m01, float m02, float m03, + float m10, float m11, float m12, float m13, + float m20, float m21, float m22, float m23, + float m30, float m31, float m32, float m33 ) + { + this.m00 = m00; + this.m01 = m01; + this.m02 = m02; + this.m03 = m03; + this.m10 = m10; + this.m11 = m11; + this.m12 = m12; + this.m13 = m13; + this.m20 = m20; + this.m21 = m21; + this.m22 = m22; + this.m23 = m23; + this.m30 = m30; + this.m31 = m31; + this.m32 = m32; + this.m33 = m33; + } + + public static void main( String[] args ) + { + System.out.println( "Test main..." ); + new Matrix4f (); + new Matrix4f (0,0,0,0, + 0,0,0,0, + 0,0,0,0, + 0,0,0,0); + new Matrix4f (new float [] {0,0,0,0, + 0,0,0,0, + 0,0,0,0, + 0,0,0,0}); + } +} + diff --git a/libjava/testsuite/libjava.lang/Matrix4f.out b/libjava/testsuite/libjava.lang/Matrix4f.out new file mode 100644 index 000000000..eda916426 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Matrix4f.out @@ -0,0 +1,9 @@ +Test main... +not initialized +initialized +initialized +initialized +initialized +initialized +initialized +initialized diff --git a/libjava/testsuite/libjava.lang/N19990310_02.jar b/libjava/testsuite/libjava.lang/N19990310_02.jar Binary files differnew file mode 100644 index 000000000..49e97e420 --- /dev/null +++ b/libjava/testsuite/libjava.lang/N19990310_02.jar diff --git a/libjava/testsuite/libjava.lang/N19990310_02.java b/libjava/testsuite/libjava.lang/N19990310_02.java new file mode 100644 index 000000000..0c5bd03e9 --- /dev/null +++ b/libjava/testsuite/libjava.lang/N19990310_02.java @@ -0,0 +1,22 @@ +/*--------------------------------------------------------------------------*/ +/* Name : N19990310_02 */ +/* : */ +/* Cause : Array value calculation in for,while,do while loop is not */ +/* : correct */ +/* : */ +/* Message : NG:[3]-->[2] */ +/*--------------------------------------------------------------------------*/ + +public class N19990310_02 { + public static void main(String[] args) { + int y[] = {2}; + for ( int i = 0; i < 1; i++ ) { + y[i] += 1; + if ( y[i] != 3 ) { + System.out.println("NG:[3]-->[" +y[i]+ "]"); + } + else + System.out.println("OK"); + } + } +} diff --git a/libjava/testsuite/libjava.lang/N19990310_02.out b/libjava/testsuite/libjava.lang/N19990310_02.out new file mode 100644 index 000000000..d86bac9de --- /dev/null +++ b/libjava/testsuite/libjava.lang/N19990310_02.out @@ -0,0 +1 @@ +OK diff --git a/libjava/testsuite/libjava.lang/N19990310_3.jar b/libjava/testsuite/libjava.lang/N19990310_3.jar Binary files differnew file mode 100644 index 000000000..a096693aa --- /dev/null +++ b/libjava/testsuite/libjava.lang/N19990310_3.jar diff --git a/libjava/testsuite/libjava.lang/N19990310_3.java b/libjava/testsuite/libjava.lang/N19990310_3.java new file mode 100644 index 000000000..b6dfac287 --- /dev/null +++ b/libjava/testsuite/libjava.lang/N19990310_3.java @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------*/ +/* Name : N19990310_3 */ +/* : */ +/* Cause : Evaluation order miss, when make integer array. */ +/* : */ +/* Message : NG:[4]-->[1] */ +/*--------------------------------------------------------------------------*/ + +public class N19990310_3 { + public static void main(String[] args) { + + int x = 4; + + int ary[][] = new int[x][x=1]; + + if ( ary.length == 4 ) { + System.out.println("OK"); + } else { + System.out.println("NG:[4]-->[" +ary.length+ "]"); + } + } +} + + diff --git a/libjava/testsuite/libjava.lang/N19990310_3.out b/libjava/testsuite/libjava.lang/N19990310_3.out new file mode 100644 index 000000000..d86bac9de --- /dev/null +++ b/libjava/testsuite/libjava.lang/N19990310_3.out @@ -0,0 +1 @@ +OK diff --git a/libjava/testsuite/libjava.lang/N19990310_4.jar b/libjava/testsuite/libjava.lang/N19990310_4.jar Binary files differnew file mode 100644 index 000000000..b21f47452 --- /dev/null +++ b/libjava/testsuite/libjava.lang/N19990310_4.jar diff --git a/libjava/testsuite/libjava.lang/N19990310_4.java b/libjava/testsuite/libjava.lang/N19990310_4.java new file mode 100644 index 000000000..ad89a505b --- /dev/null +++ b/libjava/testsuite/libjava.lang/N19990310_4.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------*/ +/* Name : N19990310_4.java */ +/* : */ +/* Cause : assignment operator makes error in char,byte,short variable */ +/* : */ +/* Message : In class `N19990310_4': */ +/* : In method `main(java.lang.String[])': */ +/* : Incompatible type for `='. Explicit cast needed to convert `*/ +/* : `int' to `char'. */ +/* : x += (x = 3); */ +/* : ^ */ +/* : 1 error */ +/*--------------------------------------------------------------------------*/ + +public class N19990310_4 { + public static void main(String[] args) { + char x = 9; + + x += (x = 3); + if ( x == 12 ) { + System.out.println("OK"); + } else { + System.out.println("NG"); + } + } +} + diff --git a/libjava/testsuite/libjava.lang/N19990310_4.out b/libjava/testsuite/libjava.lang/N19990310_4.out new file mode 100644 index 000000000..d86bac9de --- /dev/null +++ b/libjava/testsuite/libjava.lang/N19990310_4.out @@ -0,0 +1 @@ +OK diff --git a/libjava/testsuite/libjava.lang/N19990310_5.jar b/libjava/testsuite/libjava.lang/N19990310_5.jar Binary files differnew file mode 100644 index 000000000..d944000c8 --- /dev/null +++ b/libjava/testsuite/libjava.lang/N19990310_5.jar diff --git a/libjava/testsuite/libjava.lang/N19990310_5.java b/libjava/testsuite/libjava.lang/N19990310_5.java new file mode 100644 index 000000000..61ccc5b9f --- /dev/null +++ b/libjava/testsuite/libjava.lang/N19990310_5.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------*/ +/* Name : N19990310_5.java */ +/* : */ +/* Cause : A assignment operator makes error in char,byte,short array */ +/* : element */ +/* : */ +/* Message : In class `N19990310_5': */ +/* : In method `main(java.lang.String[])': */ +/* : Incompatible type for `='. Explicit cast needed to convert `*/ +/* : `int' to `char'. */ +/* : a[0] += (a[0] = 3); */ +/* : ^ */ +/* : 1 error */ +/*--------------------------------------------------------------------------*/ + +public class N19990310_5 { + public static void main(String[] args) { + char[] a = {9}; + a[0] += (a[0] = 3); + + if ( a[0] == 12 ) { + System.out.println("OK"); + } else { + System.out.println("NG"); + } + } +} + + diff --git a/libjava/testsuite/libjava.lang/N19990310_5.out b/libjava/testsuite/libjava.lang/N19990310_5.out new file mode 100644 index 000000000..d86bac9de --- /dev/null +++ b/libjava/testsuite/libjava.lang/N19990310_5.out @@ -0,0 +1 @@ +OK diff --git a/libjava/testsuite/libjava.lang/Overflow.jar b/libjava/testsuite/libjava.lang/Overflow.jar Binary files differnew file mode 100644 index 000000000..4bfda6b7c --- /dev/null +++ b/libjava/testsuite/libjava.lang/Overflow.jar diff --git a/libjava/testsuite/libjava.lang/Overflow.java b/libjava/testsuite/libjava.lang/Overflow.java new file mode 100644 index 000000000..312e9cb20 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Overflow.java @@ -0,0 +1,16 @@ +class Overflow +{ + static int test(int x) + { + return (2*x)/2; + } + + public static void main(String argv[]) + { + int x = Integer.MAX_VALUE; + + if (test(x) == x) + throw new RuntimeException (); + } +} + diff --git a/libjava/testsuite/libjava.lang/Overflow.out b/libjava/testsuite/libjava.lang/Overflow.out new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/libjava/testsuite/libjava.lang/Overflow.out diff --git a/libjava/testsuite/libjava.lang/PR12350.jar b/libjava/testsuite/libjava.lang/PR12350.jar Binary files differnew file mode 100644 index 000000000..8d655c2b1 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR12350.jar diff --git a/libjava/testsuite/libjava.lang/PR12350.java b/libjava/testsuite/libjava.lang/PR12350.java new file mode 100644 index 000000000..ded8856cf --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR12350.java @@ -0,0 +1,20 @@ +public class PR12350 +{ + static public void main (String[] ignored) throws Throwable + { + StringBuffer b = new StringBuffer ("Good string. More than 16 chars."); + + // Should cause sharing. + String s = b.toString(); + + // Take a char by char unshared copy of s. + String t = new String (s.toCharArray()); + + b.substring (0, 4); // BUG: Clears shared flag. + b.replace (0, 4, "Bad "); // Modifies shared data. + + System.out.println (s); + assert s.equals (t); + } + +} diff --git a/libjava/testsuite/libjava.lang/PR12350.out b/libjava/testsuite/libjava.lang/PR12350.out new file mode 100644 index 000000000..61dc0a637 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR12350.out @@ -0,0 +1 @@ +Good string. More than 16 chars. diff --git a/libjava/testsuite/libjava.lang/PR12416.jar b/libjava/testsuite/libjava.lang/PR12416.jar Binary files differnew file mode 100644 index 000000000..823500854 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR12416.jar diff --git a/libjava/testsuite/libjava.lang/PR12416.java b/libjava/testsuite/libjava.lang/PR12416.java new file mode 100644 index 000000000..157d4e695 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR12416.java @@ -0,0 +1,22 @@ +interface A +{ + int a = 0; +} +interface B extends A +{ +} +interface C extends A +{ +} + +public class PR12416 implements B, C +{ + static public void main (String[] unused) + { + java.lang.reflect.Field[] fields = PR12416.class.getFields(); + + for (int i = 0; i != fields.length; ++i) { + System.out.println (fields[i]); + } + } +} diff --git a/libjava/testsuite/libjava.lang/PR12416.out b/libjava/testsuite/libjava.lang/PR12416.out new file mode 100644 index 000000000..6a0ed8b88 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR12416.out @@ -0,0 +1 @@ +public static final int A.a diff --git a/libjava/testsuite/libjava.lang/PR12656.jar b/libjava/testsuite/libjava.lang/PR12656.jar Binary files differnew file mode 100644 index 000000000..c54e92d78 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR12656.jar diff --git a/libjava/testsuite/libjava.lang/PR12656.java b/libjava/testsuite/libjava.lang/PR12656.java new file mode 100644 index 000000000..2a817f03c --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR12656.java @@ -0,0 +1,11 @@ +class PR12656_base +{ + public static void main(String[] args) + { + System.out.println("Maude"); + } +} + +public class PR12656 extends PR12656_base +{ +} diff --git a/libjava/testsuite/libjava.lang/PR12656.out b/libjava/testsuite/libjava.lang/PR12656.out new file mode 100644 index 000000000..86a4a374d --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR12656.out @@ -0,0 +1 @@ +Maude diff --git a/libjava/testsuite/libjava.lang/PR12915.jar b/libjava/testsuite/libjava.lang/PR12915.jar Binary files differnew file mode 100644 index 000000000..29ce9c05f --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR12915.jar diff --git a/libjava/testsuite/libjava.lang/PR12915.java b/libjava/testsuite/libjava.lang/PR12915.java new file mode 100644 index 000000000..3a155f6e1 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR12915.java @@ -0,0 +1,6 @@ +public class PR12915 { + public static void main(String[] args) + { + System.out.println(((String) null) + ""); + } +} diff --git a/libjava/testsuite/libjava.lang/PR12915.out b/libjava/testsuite/libjava.lang/PR12915.out new file mode 100644 index 000000000..19765bd50 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR12915.out @@ -0,0 +1 @@ +null diff --git a/libjava/testsuite/libjava.lang/PR141.jar b/libjava/testsuite/libjava.lang/PR141.jar Binary files differnew file mode 100644 index 000000000..c7b962945 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR141.jar diff --git a/libjava/testsuite/libjava.lang/PR141.java b/libjava/testsuite/libjava.lang/PR141.java new file mode 100644 index 000000000..c3314f2af --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR141.java @@ -0,0 +1,41 @@ +import java.io.IOException; +import java.io.StreamTokenizer; +import java.io.StringReader; + +public class PR141 { + public static void test(String str) throws IOException { + StringReader reader = new StringReader(str); + StreamTokenizer st = new StreamTokenizer(reader); + int t = 0; + + do { + t = st.nextToken(); + + switch (t) { + case StreamTokenizer.TT_WORD: + System.out.println("[TT_WORD]: " + st.sval); + break; + case StreamTokenizer.TT_NUMBER: + System.out.println("[TT_NUMBER]: " + st.nval); + break; + case StreamTokenizer.TT_EOL: + System.out.println("[TT_EOL]"); + break; + case StreamTokenizer.TT_EOF: + System.out.println("[TT_EOF]"); + break; + default: + System.out.println((char)t); + break; + } + } while (t != StreamTokenizer.TT_EOF); + } + + public static void main(String[] args) { + try { + test("(a).(b)"); + } catch (Throwable t) { + t.printStackTrace(); + } + } +} diff --git a/libjava/testsuite/libjava.lang/PR141.out b/libjava/testsuite/libjava.lang/PR141.out new file mode 100644 index 000000000..37cb87c6d --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR141.out @@ -0,0 +1,8 @@ +( +[TT_WORD]: a +) +[TT_NUMBER]: 0.0 +( +[TT_WORD]: b +) +[TT_EOF] diff --git a/libjava/testsuite/libjava.lang/PR160.jar b/libjava/testsuite/libjava.lang/PR160.jar Binary files differnew file mode 100644 index 000000000..f1fed747e --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR160.jar diff --git a/libjava/testsuite/libjava.lang/PR160.java b/libjava/testsuite/libjava.lang/PR160.java new file mode 100644 index 000000000..77526ef52 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR160.java @@ -0,0 +1,34 @@ +public class PR160 +{ + static final int len = 100; + + public static void main(String args[]) + { + + double[] a = new double[len]; + double[] b = new double[len]; + + for (int i = 0; i < len ; i++) + { + a[i] = 0.65; + } + + System.arraycopy(a, 0, b, 0, len); + + boolean errors = false; + + for (int i = 0; i < len ; i++) + { + if (a[i] != b[i]) + { + System.out.println("ERROR! " + a[i] + " != " + + b[i] + " at index " + i); + errors = true; + } + } + + if (!errors) + System.out.println("ok"); + + } +} diff --git a/libjava/testsuite/libjava.lang/PR160.out b/libjava/testsuite/libjava.lang/PR160.out new file mode 100644 index 000000000..9766475a4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR160.out @@ -0,0 +1 @@ +ok diff --git a/libjava/testsuite/libjava.lang/PR162.jar b/libjava/testsuite/libjava.lang/PR162.jar Binary files differnew file mode 100644 index 000000000..69acecc9d --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR162.jar diff --git a/libjava/testsuite/libjava.lang/PR162.java b/libjava/testsuite/libjava.lang/PR162.java new file mode 100644 index 000000000..ffabce0e0 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR162.java @@ -0,0 +1,29 @@ +interface I +{ + int i = 1, ii = PR162.out ("ii", 2); +} + +interface J extends I +{ + int j = PR162.out ("j", 3), jj = PR162.out ("jj", 4); +} + +interface K extends J +{ + int k = PR162.out ("k", 5); +} + +public class PR162 +{ + public static void main (String[] args) + { + System.out.println (J.i); + System.out.println (K.j); + } + + public static int out (String s, int i) + { + System.out.println (s + "=" + i); + return i; + } +} diff --git a/libjava/testsuite/libjava.lang/PR162.out b/libjava/testsuite/libjava.lang/PR162.out new file mode 100644 index 000000000..6510a2d59 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR162.out @@ -0,0 +1,4 @@ +1 +j=3 +jj=4 +3 diff --git a/libjava/testsuite/libjava.lang/PR16867.jar b/libjava/testsuite/libjava.lang/PR16867.jar Binary files differnew file mode 100644 index 000000000..a1c46c4e7 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR16867.jar diff --git a/libjava/testsuite/libjava.lang/PR16867.java b/libjava/testsuite/libjava.lang/PR16867.java new file mode 100644 index 000000000..686289230 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR16867.java @@ -0,0 +1,17 @@ +/* SSA-DCE was removing the initialization of the temporary object + in getFoo because it wasn't realizing that the pointer was needed + outside of it. */ + +public class PR16867 +{ + public static Object[] getFoo() + { + return new Object[] {"OK"}; + } + + public static void main(String[] args) + { + Object[] a = getFoo(); + System.out.println(a[0]); + } +} diff --git a/libjava/testsuite/libjava.lang/PR16867.out b/libjava/testsuite/libjava.lang/PR16867.out new file mode 100644 index 000000000..d86bac9de --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR16867.out @@ -0,0 +1 @@ +OK diff --git a/libjava/testsuite/libjava.lang/PR18699.jar b/libjava/testsuite/libjava.lang/PR18699.jar Binary files differnew file mode 100644 index 000000000..c16dc755b --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR18699.jar diff --git a/libjava/testsuite/libjava.lang/PR18699.java b/libjava/testsuite/libjava.lang/PR18699.java new file mode 100644 index 000000000..6f81e10d9 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR18699.java @@ -0,0 +1,36 @@ +// Test for thread-local allocation problems. + +import java.util.HashMap; +import java.util.Observable; +import java.util.Observer; + +class PR18699 extends Observable implements Runnable, Observer { + + public static void main(String[] args) throws InterruptedException { + PR18699 PR18699_1 = new PR18699(); + PR18699 PR18699_2 = new PR18699(); + PR18699_1.addObserver(PR18699_2); + PR18699_2.addObserver(PR18699_1); + new Thread(PR18699_1).start(); + new Thread(PR18699_2).start(); + } + + public void run() { + int c = 0; + String s = ""; + while (++c < 50) { + this.setChanged(); + s = ""; + for (int i = 0; i < 200; i++) + s += String.valueOf(i); + this.notifyObservers(s); + } + } + + HashMap map = new HashMap(); + + public void update(Observable o, Object obj) + { + map.put(o, obj); + } +} diff --git a/libjava/testsuite/libjava.lang/PR18699.out b/libjava/testsuite/libjava.lang/PR18699.out new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR18699.out diff --git a/libjava/testsuite/libjava.lang/PR19870.jar b/libjava/testsuite/libjava.lang/PR19870.jar Binary files differnew file mode 100644 index 000000000..13255d8a4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR19870.jar diff --git a/libjava/testsuite/libjava.lang/PR19870.java b/libjava/testsuite/libjava.lang/PR19870.java new file mode 100644 index 000000000..f9e6bc318 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR19870.java @@ -0,0 +1,44 @@ +// PR19870: Test static field access across nested class boundaries. +// +public class PR19870 +{ + private static int x = 123; + + static class Foo + { + private static int junk = 1000; + + static void snafu( ) + { + System.out.println( x); + x = 456; + System.out.println( PR19870.x); + PR19870.x = 789; + System.out.println( PR19870.x); + + System.out.println( Bar.junk); + } + } + + static class Bar + { + private static int junk = 1984; + + static void snafu( ) + { + System.out.println( Foo.junk); + Foo.junk = 2000; + System.out.println( Foo.junk); + } + } + + public static void main( String[] args) + { + Foo.snafu( ); + Bar.snafu( ); + + System.out.println( Foo.junk); + Foo.junk = 3000; + System.out.println( Foo.junk); + } +} diff --git a/libjava/testsuite/libjava.lang/PR19870.out b/libjava/testsuite/libjava.lang/PR19870.out new file mode 100644 index 000000000..ab58915f5 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR19870.out @@ -0,0 +1,8 @@ +123 +456 +789 +1984 +1000 +2000 +2000 +3000 diff --git a/libjava/testsuite/libjava.lang/PR19870_2.jar b/libjava/testsuite/libjava.lang/PR19870_2.jar Binary files differnew file mode 100644 index 000000000..05daaf98e --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR19870_2.jar diff --git a/libjava/testsuite/libjava.lang/PR19870_2.java b/libjava/testsuite/libjava.lang/PR19870_2.java new file mode 100644 index 000000000..4dd7c7fa9 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR19870_2.java @@ -0,0 +1,39 @@ +// PR19870: Test synthetic accessor generation for private static methods +// accessed across nested class boundaries. +public class PR19870_2 +{ + static class A + { + private static void foo( ) + { + System.out.println( "1"); + } + + private static void bar( int x) + { + System.out.println( x); + snafu( ); + PR19870_2.snafu( ); + } + } + + static class B + { + private static void foo( ) + { + A.foo( ); + } + } + + private static void snafu( ) + { + System.out.println( "3"); + } + + public static void main( String[] args) + { + A.foo( ); + A.bar( 2); + B.foo( ); + } +} diff --git a/libjava/testsuite/libjava.lang/PR19870_2.out b/libjava/testsuite/libjava.lang/PR19870_2.out new file mode 100644 index 000000000..bab394589 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR19870_2.out @@ -0,0 +1,5 @@ +1 +2 +3 +3 +1 diff --git a/libjava/testsuite/libjava.lang/PR19921.jar b/libjava/testsuite/libjava.lang/PR19921.jar Binary files differnew file mode 100644 index 000000000..515f3bf6f --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR19921.jar diff --git a/libjava/testsuite/libjava.lang/PR19921.java b/libjava/testsuite/libjava.lang/PR19921.java new file mode 100644 index 000000000..0758d661d --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR19921.java @@ -0,0 +1,11 @@ +interface I { + void f(Object x); +} + +class PR19921 { + static void g(I i) { + // gcj used to create invalid bytecode for this. + i.f(new Object[1][1]); + } + public static void main(String[] args) { } +} diff --git a/libjava/testsuite/libjava.lang/PR19921.out b/libjava/testsuite/libjava.lang/PR19921.out new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR19921.out diff --git a/libjava/testsuite/libjava.lang/PR20056.jar b/libjava/testsuite/libjava.lang/PR20056.jar Binary files differnew file mode 100644 index 000000000..2bd6d54e5 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR20056.jar diff --git a/libjava/testsuite/libjava.lang/PR20056.java b/libjava/testsuite/libjava.lang/PR20056.java new file mode 100644 index 000000000..f73eb7f04 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR20056.java @@ -0,0 +1,13 @@ +public class PR20056 { + int x; + PR20056(int x) {} + PR20056(PR20056 f) { + // The verifier rejected the generated code in this case. + this(f.x = 0); + } + + public static void main(String[] args) + { + System.out.println("maude"); + } +} diff --git a/libjava/testsuite/libjava.lang/PR20056.out b/libjava/testsuite/libjava.lang/PR20056.out new file mode 100644 index 000000000..b3668c4d4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR20056.out @@ -0,0 +1 @@ +maude diff --git a/libjava/testsuite/libjava.lang/PR218.jar b/libjava/testsuite/libjava.lang/PR218.jar Binary files differnew file mode 100644 index 000000000..764740409 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR218.jar diff --git a/libjava/testsuite/libjava.lang/PR218.java b/libjava/testsuite/libjava.lang/PR218.java new file mode 100644 index 000000000..14486dfad --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR218.java @@ -0,0 +1,28 @@ +// Bug in gcj 20000427: Java executables can abort trying to access a null +// pointer in a leaf function. + +public class PR218 +{ + private int i = 5; + + public static void main(String[] args) + { + try + { + new PR218().foo(null); + } + catch (NullPointerException x) + { + System.out.println(x); + } + } + + void foo(PR218 e) + { + e.i += 4; + }; +} + +// Expected output: +// +// java.lang.NullPointerException diff --git a/libjava/testsuite/libjava.lang/PR218.out b/libjava/testsuite/libjava.lang/PR218.out new file mode 100644 index 000000000..7a72d865c --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR218.out @@ -0,0 +1 @@ +java.lang.NullPointerException diff --git a/libjava/testsuite/libjava.lang/PR242.jar b/libjava/testsuite/libjava.lang/PR242.jar Binary files differnew file mode 100644 index 000000000..41b7fe137 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR242.jar diff --git a/libjava/testsuite/libjava.lang/PR242.java b/libjava/testsuite/libjava.lang/PR242.java new file mode 100644 index 000000000..6f74b4620 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR242.java @@ -0,0 +1,36 @@ +class Base +{ + int someNum() + { + System.out.println ("ok"); + return 0; + } +} + +public class PR242 extends Base +{ + public static void main(String args[]) + { + new PR242(); + } + + PR242() + { + new Inner().a(); + } + + class Inner + { + public int dummy() + { + System.out.println ("wrong method called!!"); + return -1; + } + + public void a() + { + System.out.println ("..."); + System.out.println (someNum()); + } + } +} diff --git a/libjava/testsuite/libjava.lang/PR242.out b/libjava/testsuite/libjava.lang/PR242.out new file mode 100644 index 000000000..98b7db396 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR242.out @@ -0,0 +1,3 @@ +... +ok +0 diff --git a/libjava/testsuite/libjava.lang/PR25535.jar b/libjava/testsuite/libjava.lang/PR25535.jar Binary files differnew file mode 100644 index 000000000..924c256a6 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR25535.jar diff --git a/libjava/testsuite/libjava.lang/PR25535.java b/libjava/testsuite/libjava.lang/PR25535.java new file mode 100644 index 000000000..05f4d080d --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR25535.java @@ -0,0 +1,5 @@ +public class PR25535 { + public static void main(String[] args) { + System.out.println(javax.rmi.CORBA.Stub.class); + } +} diff --git a/libjava/testsuite/libjava.lang/PR25535.out b/libjava/testsuite/libjava.lang/PR25535.out new file mode 100644 index 000000000..2659d2f7a --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR25535.out @@ -0,0 +1 @@ +class javax.rmi.CORBA.Stub diff --git a/libjava/testsuite/libjava.lang/PR260.jar b/libjava/testsuite/libjava.lang/PR260.jar Binary files differnew file mode 100644 index 000000000..a0ca13254 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR260.jar diff --git a/libjava/testsuite/libjava.lang/PR260.java b/libjava/testsuite/libjava.lang/PR260.java new file mode 100644 index 000000000..7bd49eb90 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR260.java @@ -0,0 +1,15 @@ +class A +{ + static + { + System.out.println ("A initialized"); + } +} + +public class PR260 +{ + public static void main(String args[]) + { + Class klass = A.class; + } +} diff --git a/libjava/testsuite/libjava.lang/PR260.out b/libjava/testsuite/libjava.lang/PR260.out new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR260.out diff --git a/libjava/testsuite/libjava.lang/PR26858.jar b/libjava/testsuite/libjava.lang/PR26858.jar Binary files differnew file mode 100644 index 000000000..c9b3abbe5 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR26858.jar diff --git a/libjava/testsuite/libjava.lang/PR26858.java b/libjava/testsuite/libjava.lang/PR26858.java new file mode 100644 index 000000000..5e9daadba --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR26858.java @@ -0,0 +1,2075 @@ +public class PR26858 +{ + public long f0000; public long f0001; public long f0002; public long f0003; + public long f0004; public long f0005; public long f0006; public long f0007; + public long f0008; public long f0009; public long f0010; public long f0011; + public long f0012; public long f0013; public long f0014; public long f0015; + public long f0016; public long f0017; public long f0018; public long f0019; + public long f0020; public long f0021; public long f0022; public long f0023; + public long f0024; public long f0025; public long f0026; public long f0027; + public long f0028; public long f0029; public long f0030; public long f0031; + public long f0032; public long f0033; public long f0034; public long f0035; + public long f0036; public long f0037; public long f0038; public long f0039; + public long f0040; public long f0041; public long f0042; public long f0043; + public long f0044; public long f0045; public long f0046; public long f0047; + public long f0048; public long f0049; public long f0050; public long f0051; + public long f0052; public long f0053; public long f0054; public long f0055; + public long f0056; public long f0057; public long f0058; public long f0059; + public long f0060; public long f0061; public long f0062; public long f0063; + public long f0064; public long f0065; public long f0066; public long f0067; + public long f0068; public long f0069; public long f0070; public long f0071; + public long f0072; public long f0073; public long f0074; public long f0075; + public long f0076; public long f0077; public long f0078; public long f0079; + public long f0080; public long f0081; public long f0082; public long f0083; + public long f0084; public long f0085; public long f0086; public long f0087; + public long f0088; public long f0089; public long f0090; public long f0091; + public long f0092; public long f0093; public long f0094; public long f0095; + public long f0096; public long f0097; public long f0098; public long f0099; + public long f0100; public long f0101; public long f0102; public long f0103; + public long f0104; public long f0105; public long f0106; public long f0107; + public long f0108; public long f0109; public long f0110; public long f0111; + public long f0112; public long f0113; public long f0114; public long f0115; + public long f0116; public long f0117; public long f0118; public long f0119; + public long f0120; public long f0121; public long f0122; public long f0123; + public long f0124; public long f0125; public long f0126; public long f0127; + public long f0128; public long f0129; public long f0130; public long f0131; + public long f0132; public long f0133; public long f0134; public long f0135; + public long f0136; public long f0137; public long f0138; public long f0139; + public long f0140; public long f0141; public long f0142; public long f0143; + public long f0144; public long f0145; public long f0146; public long f0147; + public long f0148; public long f0149; public long f0150; public long f0151; + public long f0152; public long f0153; public long f0154; public long f0155; + public long f0156; public long f0157; public long f0158; public long f0159; + public long f0160; public long f0161; public long f0162; public long f0163; + public long f0164; public long f0165; public long f0166; public long f0167; + public long f0168; public long f0169; public long f0170; public long f0171; + public long f0172; public long f0173; public long f0174; public long f0175; + public long f0176; public long f0177; public long f0178; public long f0179; + public long f0180; public long f0181; public long f0182; public long f0183; + public long f0184; public long f0185; public long f0186; public long f0187; + public long f0188; public long f0189; public long f0190; public long f0191; + public long f0192; public long f0193; public long f0194; public long f0195; + public long f0196; public long f0197; public long f0198; public long f0199; + public long f0200; public long f0201; public long f0202; public long f0203; + public long f0204; public long f0205; public long f0206; public long f0207; + public long f0208; public long f0209; public long f0210; public long f0211; + public long f0212; public long f0213; public long f0214; public long f0215; + public long f0216; public long f0217; public long f0218; public long f0219; + public long f0220; public long f0221; public long f0222; public long f0223; + public long f0224; public long f0225; public long f0226; public long f0227; + public long f0228; public long f0229; public long f0230; public long f0231; + public long f0232; public long f0233; public long f0234; public long f0235; + public long f0236; public long f0237; public long f0238; public long f0239; + public long f0240; public long f0241; public long f0242; public long f0243; + public long f0244; public long f0245; public long f0246; public long f0247; + public long f0248; public long f0249; public long f0250; public long f0251; + public long f0252; public long f0253; public long f0254; public long f0255; + public long f0256; public long f0257; public long f0258; public long f0259; + public long f0260; public long f0261; public long f0262; public long f0263; + public long f0264; public long f0265; public long f0266; public long f0267; + public long f0268; public long f0269; public long f0270; public long f0271; + public long f0272; public long f0273; public long f0274; public long f0275; + public long f0276; public long f0277; public long f0278; public long f0279; + public long f0280; public long f0281; public long f0282; public long f0283; + public long f0284; public long f0285; public long f0286; public long f0287; + public long f0288; public long f0289; public long f0290; public long f0291; + public long f0292; public long f0293; public long f0294; public long f0295; + public long f0296; public long f0297; public long f0298; public long f0299; + public long f0300; public long f0301; public long f0302; public long f0303; + public long f0304; public long f0305; public long f0306; public long f0307; + public long f0308; public long f0309; public long f0310; public long f0311; + public long f0312; public long f0313; public long f0314; public long f0315; + public long f0316; public long f0317; public long f0318; public long f0319; + public long f0320; public long f0321; public long f0322; public long f0323; + public long f0324; public long f0325; public long f0326; public long f0327; + public long f0328; public long f0329; public long f0330; public long f0331; + public long f0332; public long f0333; public long f0334; public long f0335; + public long f0336; public long f0337; public long f0338; public long f0339; + public long f0340; public long f0341; public long f0342; public long f0343; + public long f0344; public long f0345; public long f0346; public long f0347; + public long f0348; public long f0349; public long f0350; public long f0351; + public long f0352; public long f0353; public long f0354; public long f0355; + public long f0356; public long f0357; public long f0358; public long f0359; + public long f0360; public long f0361; public long f0362; public long f0363; + public long f0364; public long f0365; public long f0366; public long f0367; + public long f0368; public long f0369; public long f0370; public long f0371; + public long f0372; public long f0373; public long f0374; public long f0375; + public long f0376; public long f0377; public long f0378; public long f0379; + public long f0380; public long f0381; public long f0382; public long f0383; + public long f0384; public long f0385; public long f0386; public long f0387; + public long f0388; public long f0389; public long f0390; public long f0391; + public long f0392; public long f0393; public long f0394; public long f0395; + public long f0396; public long f0397; public long f0398; public long f0399; + public long f0400; public long f0401; public long f0402; public long f0403; + public long f0404; public long f0405; public long f0406; public long f0407; + public long f0408; public long f0409; public long f0410; public long f0411; + public long f0412; public long f0413; public long f0414; public long f0415; + public long f0416; public long f0417; public long f0418; public long f0419; + public long f0420; public long f0421; public long f0422; public long f0423; + public long f0424; public long f0425; public long f0426; public long f0427; + public long f0428; public long f0429; public long f0430; public long f0431; + public long f0432; public long f0433; public long f0434; public long f0435; + public long f0436; public long f0437; public long f0438; public long f0439; + public long f0440; public long f0441; public long f0442; public long f0443; + public long f0444; public long f0445; public long f0446; public long f0447; + public long f0448; public long f0449; public long f0450; public long f0451; + public long f0452; public long f0453; public long f0454; public long f0455; + public long f0456; public long f0457; public long f0458; public long f0459; + public long f0460; public long f0461; public long f0462; public long f0463; + public long f0464; public long f0465; public long f0466; public long f0467; + public long f0468; public long f0469; public long f0470; public long f0471; + public long f0472; public long f0473; public long f0474; public long f0475; + public long f0476; public long f0477; public long f0478; public long f0479; + public long f0480; public long f0481; public long f0482; public long f0483; + public long f0484; public long f0485; public long f0486; public long f0487; + public long f0488; public long f0489; public long f0490; public long f0491; + public long f0492; public long f0493; public long f0494; public long f0495; + public long f0496; public long f0497; public long f0498; public long f0499; + public long f0500; public long f0501; public long f0502; public long f0503; + public long f0504; public long f0505; public long f0506; public long f0507; + public long f0508; public long f0509; public long f0510; public long f0511; + public long f0512; public long f0513; public long f0514; public long f0515; + public long f0516; public long f0517; public long f0518; public long f0519; + public long f0520; public long f0521; public long f0522; public long f0523; + public long f0524; public long f0525; public long f0526; public long f0527; + public long f0528; public long f0529; public long f0530; public long f0531; + public long f0532; public long f0533; public long f0534; public long f0535; + public long f0536; public long f0537; public long f0538; public long f0539; + public long f0540; public long f0541; public long f0542; public long f0543; + public long f0544; public long f0545; public long f0546; public long f0547; + public long f0548; public long f0549; public long f0550; public long f0551; + public long f0552; public long f0553; public long f0554; public long f0555; + public long f0556; public long f0557; public long f0558; public long f0559; + public long f0560; public long f0561; public long f0562; public long f0563; + public long f0564; public long f0565; public long f0566; public long f0567; + public long f0568; public long f0569; public long f0570; public long f0571; + public long f0572; public long f0573; public long f0574; public long f0575; + public long f0576; public long f0577; public long f0578; public long f0579; + public long f0580; public long f0581; public long f0582; public long f0583; + public long f0584; public long f0585; public long f0586; public long f0587; + public long f0588; public long f0589; public long f0590; public long f0591; + public long f0592; public long f0593; public long f0594; public long f0595; + public long f0596; public long f0597; public long f0598; public long f0599; + public long f0600; public long f0601; public long f0602; public long f0603; + public long f0604; public long f0605; public long f0606; public long f0607; + public long f0608; public long f0609; public long f0610; public long f0611; + public long f0612; public long f0613; public long f0614; public long f0615; + public long f0616; public long f0617; public long f0618; public long f0619; + public long f0620; public long f0621; public long f0622; public long f0623; + public long f0624; public long f0625; public long f0626; public long f0627; + public long f0628; public long f0629; public long f0630; public long f0631; + public long f0632; public long f0633; public long f0634; public long f0635; + public long f0636; public long f0637; public long f0638; public long f0639; + public long f0640; public long f0641; public long f0642; public long f0643; + public long f0644; public long f0645; public long f0646; public long f0647; + public long f0648; public long f0649; public long f0650; public long f0651; + public long f0652; public long f0653; public long f0654; public long f0655; + public long f0656; public long f0657; public long f0658; public long f0659; + public long f0660; public long f0661; public long f0662; public long f0663; + public long f0664; public long f0665; public long f0666; public long f0667; + public long f0668; public long f0669; public long f0670; public long f0671; + public long f0672; public long f0673; public long f0674; public long f0675; + public long f0676; public long f0677; public long f0678; public long f0679; + public long f0680; public long f0681; public long f0682; public long f0683; + public long f0684; public long f0685; public long f0686; public long f0687; + public long f0688; public long f0689; public long f0690; public long f0691; + public long f0692; public long f0693; public long f0694; public long f0695; + public long f0696; public long f0697; public long f0698; public long f0699; + public long f0700; public long f0701; public long f0702; public long f0703; + public long f0704; public long f0705; public long f0706; public long f0707; + public long f0708; public long f0709; public long f0710; public long f0711; + public long f0712; public long f0713; public long f0714; public long f0715; + public long f0716; public long f0717; public long f0718; public long f0719; + public long f0720; public long f0721; public long f0722; public long f0723; + public long f0724; public long f0725; public long f0726; public long f0727; + public long f0728; public long f0729; public long f0730; public long f0731; + public long f0732; public long f0733; public long f0734; public long f0735; + public long f0736; public long f0737; public long f0738; public long f0739; + public long f0740; public long f0741; public long f0742; public long f0743; + public long f0744; public long f0745; public long f0746; public long f0747; + public long f0748; public long f0749; public long f0750; public long f0751; + public long f0752; public long f0753; public long f0754; public long f0755; + public long f0756; public long f0757; public long f0758; public long f0759; + public long f0760; public long f0761; public long f0762; public long f0763; + public long f0764; public long f0765; public long f0766; public long f0767; + public long f0768; public long f0769; public long f0770; public long f0771; + public long f0772; public long f0773; public long f0774; public long f0775; + public long f0776; public long f0777; public long f0778; public long f0779; + public long f0780; public long f0781; public long f0782; public long f0783; + public long f0784; public long f0785; public long f0786; public long f0787; + public long f0788; public long f0789; public long f0790; public long f0791; + public long f0792; public long f0793; public long f0794; public long f0795; + public long f0796; public long f0797; public long f0798; public long f0799; + public long f0800; public long f0801; public long f0802; public long f0803; + public long f0804; public long f0805; public long f0806; public long f0807; + public long f0808; public long f0809; public long f0810; public long f0811; + public long f0812; public long f0813; public long f0814; public long f0815; + public long f0816; public long f0817; public long f0818; public long f0819; + public long f0820; public long f0821; public long f0822; public long f0823; + public long f0824; public long f0825; public long f0826; public long f0827; + public long f0828; public long f0829; public long f0830; public long f0831; + public long f0832; public long f0833; public long f0834; public long f0835; + public long f0836; public long f0837; public long f0838; public long f0839; + public long f0840; public long f0841; public long f0842; public long f0843; + public long f0844; public long f0845; public long f0846; public long f0847; + public long f0848; public long f0849; public long f0850; public long f0851; + public long f0852; public long f0853; public long f0854; public long f0855; + public long f0856; public long f0857; public long f0858; public long f0859; + public long f0860; public long f0861; public long f0862; public long f0863; + public long f0864; public long f0865; public long f0866; public long f0867; + public long f0868; public long f0869; public long f0870; public long f0871; + public long f0872; public long f0873; public long f0874; public long f0875; + public long f0876; public long f0877; public long f0878; public long f0879; + public long f0880; public long f0881; public long f0882; public long f0883; + public long f0884; public long f0885; public long f0886; public long f0887; + public long f0888; public long f0889; public long f0890; public long f0891; + public long f0892; public long f0893; public long f0894; public long f0895; + public long f0896; public long f0897; public long f0898; public long f0899; + public long f0900; public long f0901; public long f0902; public long f0903; + public long f0904; public long f0905; public long f0906; public long f0907; + public long f0908; public long f0909; public long f0910; public long f0911; + public long f0912; public long f0913; public long f0914; public long f0915; + public long f0916; public long f0917; public long f0918; public long f0919; + public long f0920; public long f0921; public long f0922; public long f0923; + public long f0924; public long f0925; public long f0926; public long f0927; + public long f0928; public long f0929; public long f0930; public long f0931; + public long f0932; public long f0933; public long f0934; public long f0935; + public long f0936; public long f0937; public long f0938; public long f0939; + public long f0940; public long f0941; public long f0942; public long f0943; + public long f0944; public long f0945; public long f0946; public long f0947; + public long f0948; public long f0949; public long f0950; public long f0951; + public long f0952; public long f0953; public long f0954; public long f0955; + public long f0956; public long f0957; public long f0958; public long f0959; + public long f0960; public long f0961; public long f0962; public long f0963; + public long f0964; public long f0965; public long f0966; public long f0967; + public long f0968; public long f0969; public long f0970; public long f0971; + public long f0972; public long f0973; public long f0974; public long f0975; + public long f0976; public long f0977; public long f0978; public long f0979; + public long f0980; public long f0981; public long f0982; public long f0983; + public long f0984; public long f0985; public long f0986; public long f0987; + public long f0988; public long f0989; public long f0990; public long f0991; + public long f0992; public long f0993; public long f0994; public long f0995; + public long f0996; public long f0997; public long f0998; public long f0999; + public long f1000; public long f1001; public long f1002; public long f1003; + public long f1004; public long f1005; public long f1006; public long f1007; + public long f1008; public long f1009; public long f1010; public long f1011; + public long f1012; public long f1013; public long f1014; public long f1015; + public long f1016; public long f1017; public long f1018; public long f1019; + public long f1020; public long f1021; public long f1022; public long f1023; + public long f1024; public long f1025; public long f1026; public long f1027; + public long f1028; public long f1029; public long f1030; public long f1031; + public long f1032; public long f1033; public long f1034; public long f1035; + public long f1036; public long f1037; public long f1038; public long f1039; + public long f1040; public long f1041; public long f1042; public long f1043; + public long f1044; public long f1045; public long f1046; public long f1047; + public long f1048; public long f1049; public long f1050; public long f1051; + public long f1052; public long f1053; public long f1054; public long f1055; + public long f1056; public long f1057; public long f1058; public long f1059; + public long f1060; public long f1061; public long f1062; public long f1063; + public long f1064; public long f1065; public long f1066; public long f1067; + public long f1068; public long f1069; public long f1070; public long f1071; + public long f1072; public long f1073; public long f1074; public long f1075; + public long f1076; public long f1077; public long f1078; public long f1079; + public long f1080; public long f1081; public long f1082; public long f1083; + public long f1084; public long f1085; public long f1086; public long f1087; + public long f1088; public long f1089; public long f1090; public long f1091; + public long f1092; public long f1093; public long f1094; public long f1095; + public long f1096; public long f1097; public long f1098; public long f1099; + public long f1100; public long f1101; public long f1102; public long f1103; + public long f1104; public long f1105; public long f1106; public long f1107; + public long f1108; public long f1109; public long f1110; public long f1111; + public long f1112; public long f1113; public long f1114; public long f1115; + public long f1116; public long f1117; public long f1118; public long f1119; + public long f1120; public long f1121; public long f1122; public long f1123; + public long f1124; public long f1125; public long f1126; public long f1127; + public long f1128; public long f1129; public long f1130; public long f1131; + public long f1132; public long f1133; public long f1134; public long f1135; + public long f1136; public long f1137; public long f1138; public long f1139; + public long f1140; public long f1141; public long f1142; public long f1143; + public long f1144; public long f1145; public long f1146; public long f1147; + public long f1148; public long f1149; public long f1150; public long f1151; + public long f1152; public long f1153; public long f1154; public long f1155; + public long f1156; public long f1157; public long f1158; public long f1159; + public long f1160; public long f1161; public long f1162; public long f1163; + public long f1164; public long f1165; public long f1166; public long f1167; + public long f1168; public long f1169; public long f1170; public long f1171; + public long f1172; public long f1173; public long f1174; public long f1175; + public long f1176; public long f1177; public long f1178; public long f1179; + public long f1180; public long f1181; public long f1182; public long f1183; + public long f1184; public long f1185; public long f1186; public long f1187; + public long f1188; public long f1189; public long f1190; public long f1191; + public long f1192; public long f1193; public long f1194; public long f1195; + public long f1196; public long f1197; public long f1198; public long f1199; + public long f1200; public long f1201; public long f1202; public long f1203; + public long f1204; public long f1205; public long f1206; public long f1207; + public long f1208; public long f1209; public long f1210; public long f1211; + public long f1212; public long f1213; public long f1214; public long f1215; + public long f1216; public long f1217; public long f1218; public long f1219; + public long f1220; public long f1221; public long f1222; public long f1223; + public long f1224; public long f1225; public long f1226; public long f1227; + public long f1228; public long f1229; public long f1230; public long f1231; + public long f1232; public long f1233; public long f1234; public long f1235; + public long f1236; public long f1237; public long f1238; public long f1239; + public long f1240; public long f1241; public long f1242; public long f1243; + public long f1244; public long f1245; public long f1246; public long f1247; + public long f1248; public long f1249; public long f1250; public long f1251; + public long f1252; public long f1253; public long f1254; public long f1255; + public long f1256; public long f1257; public long f1258; public long f1259; + public long f1260; public long f1261; public long f1262; public long f1263; + public long f1264; public long f1265; public long f1266; public long f1267; + public long f1268; public long f1269; public long f1270; public long f1271; + public long f1272; public long f1273; public long f1274; public long f1275; + public long f1276; public long f1277; public long f1278; public long f1279; + public long f1280; public long f1281; public long f1282; public long f1283; + public long f1284; public long f1285; public long f1286; public long f1287; + public long f1288; public long f1289; public long f1290; public long f1291; + public long f1292; public long f1293; public long f1294; public long f1295; + public long f1296; public long f1297; public long f1298; public long f1299; + public long f1300; public long f1301; public long f1302; public long f1303; + public long f1304; public long f1305; public long f1306; public long f1307; + public long f1308; public long f1309; public long f1310; public long f1311; + public long f1312; public long f1313; public long f1314; public long f1315; + public long f1316; public long f1317; public long f1318; public long f1319; + public long f1320; public long f1321; public long f1322; public long f1323; + public long f1324; public long f1325; public long f1326; public long f1327; + public long f1328; public long f1329; public long f1330; public long f1331; + public long f1332; public long f1333; public long f1334; public long f1335; + public long f1336; public long f1337; public long f1338; public long f1339; + public long f1340; public long f1341; public long f1342; public long f1343; + public long f1344; public long f1345; public long f1346; public long f1347; + public long f1348; public long f1349; public long f1350; public long f1351; + public long f1352; public long f1353; public long f1354; public long f1355; + public long f1356; public long f1357; public long f1358; public long f1359; + public long f1360; public long f1361; public long f1362; public long f1363; + public long f1364; public long f1365; public long f1366; public long f1367; + public long f1368; public long f1369; public long f1370; public long f1371; + public long f1372; public long f1373; public long f1374; public long f1375; + public long f1376; public long f1377; public long f1378; public long f1379; + public long f1380; public long f1381; public long f1382; public long f1383; + public long f1384; public long f1385; public long f1386; public long f1387; + public long f1388; public long f1389; public long f1390; public long f1391; + public long f1392; public long f1393; public long f1394; public long f1395; + public long f1396; public long f1397; public long f1398; public long f1399; + public long f1400; public long f1401; public long f1402; public long f1403; + public long f1404; public long f1405; public long f1406; public long f1407; + public long f1408; public long f1409; public long f1410; public long f1411; + public long f1412; public long f1413; public long f1414; public long f1415; + public long f1416; public long f1417; public long f1418; public long f1419; + public long f1420; public long f1421; public long f1422; public long f1423; + public long f1424; public long f1425; public long f1426; public long f1427; + public long f1428; public long f1429; public long f1430; public long f1431; + public long f1432; public long f1433; public long f1434; public long f1435; + public long f1436; public long f1437; public long f1438; public long f1439; + public long f1440; public long f1441; public long f1442; public long f1443; + public long f1444; public long f1445; public long f1446; public long f1447; + public long f1448; public long f1449; public long f1450; public long f1451; + public long f1452; public long f1453; public long f1454; public long f1455; + public long f1456; public long f1457; public long f1458; public long f1459; + public long f1460; public long f1461; public long f1462; public long f1463; + public long f1464; public long f1465; public long f1466; public long f1467; + public long f1468; public long f1469; public long f1470; public long f1471; + public long f1472; public long f1473; public long f1474; public long f1475; + public long f1476; public long f1477; public long f1478; public long f1479; + public long f1480; public long f1481; public long f1482; public long f1483; + public long f1484; public long f1485; public long f1486; public long f1487; + public long f1488; public long f1489; public long f1490; public long f1491; + public long f1492; public long f1493; public long f1494; public long f1495; + public long f1496; public long f1497; public long f1498; public long f1499; + public long f1500; public long f1501; public long f1502; public long f1503; + public long f1504; public long f1505; public long f1506; public long f1507; + public long f1508; public long f1509; public long f1510; public long f1511; + public long f1512; public long f1513; public long f1514; public long f1515; + public long f1516; public long f1517; public long f1518; public long f1519; + public long f1520; public long f1521; public long f1522; public long f1523; + public long f1524; public long f1525; public long f1526; public long f1527; + public long f1528; public long f1529; public long f1530; public long f1531; + public long f1532; public long f1533; public long f1534; public long f1535; + public long f1536; public long f1537; public long f1538; public long f1539; + public long f1540; public long f1541; public long f1542; public long f1543; + public long f1544; public long f1545; public long f1546; public long f1547; + public long f1548; public long f1549; public long f1550; public long f1551; + public long f1552; public long f1553; public long f1554; public long f1555; + public long f1556; public long f1557; public long f1558; public long f1559; + public long f1560; public long f1561; public long f1562; public long f1563; + public long f1564; public long f1565; public long f1566; public long f1567; + public long f1568; public long f1569; public long f1570; public long f1571; + public long f1572; public long f1573; public long f1574; public long f1575; + public long f1576; public long f1577; public long f1578; public long f1579; + public long f1580; public long f1581; public long f1582; public long f1583; + public long f1584; public long f1585; public long f1586; public long f1587; + public long f1588; public long f1589; public long f1590; public long f1591; + public long f1592; public long f1593; public long f1594; public long f1595; + public long f1596; public long f1597; public long f1598; public long f1599; + public long f1600; public long f1601; public long f1602; public long f1603; + public long f1604; public long f1605; public long f1606; public long f1607; + public long f1608; public long f1609; public long f1610; public long f1611; + public long f1612; public long f1613; public long f1614; public long f1615; + public long f1616; public long f1617; public long f1618; public long f1619; + public long f1620; public long f1621; public long f1622; public long f1623; + public long f1624; public long f1625; public long f1626; public long f1627; + public long f1628; public long f1629; public long f1630; public long f1631; + public long f1632; public long f1633; public long f1634; public long f1635; + public long f1636; public long f1637; public long f1638; public long f1639; + public long f1640; public long f1641; public long f1642; public long f1643; + public long f1644; public long f1645; public long f1646; public long f1647; + public long f1648; public long f1649; public long f1650; public long f1651; + public long f1652; public long f1653; public long f1654; public long f1655; + public long f1656; public long f1657; public long f1658; public long f1659; + public long f1660; public long f1661; public long f1662; public long f1663; + public long f1664; public long f1665; public long f1666; public long f1667; + public long f1668; public long f1669; public long f1670; public long f1671; + public long f1672; public long f1673; public long f1674; public long f1675; + public long f1676; public long f1677; public long f1678; public long f1679; + public long f1680; public long f1681; public long f1682; public long f1683; + public long f1684; public long f1685; public long f1686; public long f1687; + public long f1688; public long f1689; public long f1690; public long f1691; + public long f1692; public long f1693; public long f1694; public long f1695; + public long f1696; public long f1697; public long f1698; public long f1699; + public long f1700; public long f1701; public long f1702; public long f1703; + public long f1704; public long f1705; public long f1706; public long f1707; + public long f1708; public long f1709; public long f1710; public long f1711; + public long f1712; public long f1713; public long f1714; public long f1715; + public long f1716; public long f1717; public long f1718; public long f1719; + public long f1720; public long f1721; public long f1722; public long f1723; + public long f1724; public long f1725; public long f1726; public long f1727; + public long f1728; public long f1729; public long f1730; public long f1731; + public long f1732; public long f1733; public long f1734; public long f1735; + public long f1736; public long f1737; public long f1738; public long f1739; + public long f1740; public long f1741; public long f1742; public long f1743; + public long f1744; public long f1745; public long f1746; public long f1747; + public long f1748; public long f1749; public long f1750; public long f1751; + public long f1752; public long f1753; public long f1754; public long f1755; + public long f1756; public long f1757; public long f1758; public long f1759; + public long f1760; public long f1761; public long f1762; public long f1763; + public long f1764; public long f1765; public long f1766; public long f1767; + public long f1768; public long f1769; public long f1770; public long f1771; + public long f1772; public long f1773; public long f1774; public long f1775; + public long f1776; public long f1777; public long f1778; public long f1779; + public long f1780; public long f1781; public long f1782; public long f1783; + public long f1784; public long f1785; public long f1786; public long f1787; + public long f1788; public long f1789; public long f1790; public long f1791; + public long f1792; public long f1793; public long f1794; public long f1795; + public long f1796; public long f1797; public long f1798; public long f1799; + public long f1800; public long f1801; public long f1802; public long f1803; + public long f1804; public long f1805; public long f1806; public long f1807; + public long f1808; public long f1809; public long f1810; public long f1811; + public long f1812; public long f1813; public long f1814; public long f1815; + public long f1816; public long f1817; public long f1818; public long f1819; + public long f1820; public long f1821; public long f1822; public long f1823; + public long f1824; public long f1825; public long f1826; public long f1827; + public long f1828; public long f1829; public long f1830; public long f1831; + public long f1832; public long f1833; public long f1834; public long f1835; + public long f1836; public long f1837; public long f1838; public long f1839; + public long f1840; public long f1841; public long f1842; public long f1843; + public long f1844; public long f1845; public long f1846; public long f1847; + public long f1848; public long f1849; public long f1850; public long f1851; + public long f1852; public long f1853; public long f1854; public long f1855; + public long f1856; public long f1857; public long f1858; public long f1859; + public long f1860; public long f1861; public long f1862; public long f1863; + public long f1864; public long f1865; public long f1866; public long f1867; + public long f1868; public long f1869; public long f1870; public long f1871; + public long f1872; public long f1873; public long f1874; public long f1875; + public long f1876; public long f1877; public long f1878; public long f1879; + public long f1880; public long f1881; public long f1882; public long f1883; + public long f1884; public long f1885; public long f1886; public long f1887; + public long f1888; public long f1889; public long f1890; public long f1891; + public long f1892; public long f1893; public long f1894; public long f1895; + public long f1896; public long f1897; public long f1898; public long f1899; + public long f1900; public long f1901; public long f1902; public long f1903; + public long f1904; public long f1905; public long f1906; public long f1907; + public long f1908; public long f1909; public long f1910; public long f1911; + public long f1912; public long f1913; public long f1914; public long f1915; + public long f1916; public long f1917; public long f1918; public long f1919; + public long f1920; public long f1921; public long f1922; public long f1923; + public long f1924; public long f1925; public long f1926; public long f1927; + public long f1928; public long f1929; public long f1930; public long f1931; + public long f1932; public long f1933; public long f1934; public long f1935; + public long f1936; public long f1937; public long f1938; public long f1939; + public long f1940; public long f1941; public long f1942; public long f1943; + public long f1944; public long f1945; public long f1946; public long f1947; + public long f1948; public long f1949; public long f1950; public long f1951; + public long f1952; public long f1953; public long f1954; public long f1955; + public long f1956; public long f1957; public long f1958; public long f1959; + public long f1960; public long f1961; public long f1962; public long f1963; + public long f1964; public long f1965; public long f1966; public long f1967; + public long f1968; public long f1969; public long f1970; public long f1971; + public long f1972; public long f1973; public long f1974; public long f1975; + public long f1976; public long f1977; public long f1978; public long f1979; + public long f1980; public long f1981; public long f1982; public long f1983; + public long f1984; public long f1985; public long f1986; public long f1987; + public long f1988; public long f1989; public long f1990; public long f1991; + public long f1992; public long f1993; public long f1994; public long f1995; + public long f1996; public long f1997; public long f1998; public long f1999; + public long f2000; public long f2001; public long f2002; public long f2003; + public long f2004; public long f2005; public long f2006; public long f2007; + public long f2008; public long f2009; public long f2010; public long f2011; + public long f2012; public long f2013; public long f2014; public long f2015; + public long f2016; public long f2017; public long f2018; public long f2019; + public long f2020; public long f2021; public long f2022; public long f2023; + public long f2024; public long f2025; public long f2026; public long f2027; + public long f2028; public long f2029; public long f2030; public long f2031; + public long f2032; public long f2033; public long f2034; public long f2035; + public long f2036; public long f2037; public long f2038; public long f2039; + public long f2040; public long f2041; public long f2042; public long f2043; + public long f2044; public long f2045; public long f2046; public long f2047; + public long f2048; public long f2049; public long f2050; public long f2051; + public long f2052; public long f2053; public long f2054; public long f2055; + public long f2056; public long f2057; public long f2058; public long f2059; + public long f2060; public long f2061; public long f2062; public long f2063; + public long f2064; public long f2065; public long f2066; public long f2067; + public long f2068; public long f2069; public long f2070; public long f2071; + public long f2072; public long f2073; public long f2074; public long f2075; + public long f2076; public long f2077; public long f2078; public long f2079; + public long f2080; public long f2081; public long f2082; public long f2083; + public long f2084; public long f2085; public long f2086; public long f2087; + public long f2088; public long f2089; public long f2090; public long f2091; + public long f2092; public long f2093; public long f2094; public long f2095; + public long f2096; public long f2097; public long f2098; public long f2099; + public long f2100; public long f2101; public long f2102; public long f2103; + public long f2104; public long f2105; public long f2106; public long f2107; + public long f2108; public long f2109; public long f2110; public long f2111; + public long f2112; public long f2113; public long f2114; public long f2115; + public long f2116; public long f2117; public long f2118; public long f2119; + public long f2120; public long f2121; public long f2122; public long f2123; + public long f2124; public long f2125; public long f2126; public long f2127; + public long f2128; public long f2129; public long f2130; public long f2131; + public long f2132; public long f2133; public long f2134; public long f2135; + public long f2136; public long f2137; public long f2138; public long f2139; + public long f2140; public long f2141; public long f2142; public long f2143; + public long f2144; public long f2145; public long f2146; public long f2147; + public long f2148; public long f2149; public long f2150; public long f2151; + public long f2152; public long f2153; public long f2154; public long f2155; + public long f2156; public long f2157; public long f2158; public long f2159; + public long f2160; public long f2161; public long f2162; public long f2163; + public long f2164; public long f2165; public long f2166; public long f2167; + public long f2168; public long f2169; public long f2170; public long f2171; + public long f2172; public long f2173; public long f2174; public long f2175; + public long f2176; public long f2177; public long f2178; public long f2179; + public long f2180; public long f2181; public long f2182; public long f2183; + public long f2184; public long f2185; public long f2186; public long f2187; + public long f2188; public long f2189; public long f2190; public long f2191; + public long f2192; public long f2193; public long f2194; public long f2195; + public long f2196; public long f2197; public long f2198; public long f2199; + public long f2200; public long f2201; public long f2202; public long f2203; + public long f2204; public long f2205; public long f2206; public long f2207; + public long f2208; public long f2209; public long f2210; public long f2211; + public long f2212; public long f2213; public long f2214; public long f2215; + public long f2216; public long f2217; public long f2218; public long f2219; + public long f2220; public long f2221; public long f2222; public long f2223; + public long f2224; public long f2225; public long f2226; public long f2227; + public long f2228; public long f2229; public long f2230; public long f2231; + public long f2232; public long f2233; public long f2234; public long f2235; + public long f2236; public long f2237; public long f2238; public long f2239; + public long f2240; public long f2241; public long f2242; public long f2243; + public long f2244; public long f2245; public long f2246; public long f2247; + public long f2248; public long f2249; public long f2250; public long f2251; + public long f2252; public long f2253; public long f2254; public long f2255; + public long f2256; public long f2257; public long f2258; public long f2259; + public long f2260; public long f2261; public long f2262; public long f2263; + public long f2264; public long f2265; public long f2266; public long f2267; + public long f2268; public long f2269; public long f2270; public long f2271; + public long f2272; public long f2273; public long f2274; public long f2275; + public long f2276; public long f2277; public long f2278; public long f2279; + public long f2280; public long f2281; public long f2282; public long f2283; + public long f2284; public long f2285; public long f2286; public long f2287; + public long f2288; public long f2289; public long f2290; public long f2291; + public long f2292; public long f2293; public long f2294; public long f2295; + public long f2296; public long f2297; public long f2298; public long f2299; + public long f2300; public long f2301; public long f2302; public long f2303; + public long f2304; public long f2305; public long f2306; public long f2307; + public long f2308; public long f2309; public long f2310; public long f2311; + public long f2312; public long f2313; public long f2314; public long f2315; + public long f2316; public long f2317; public long f2318; public long f2319; + public long f2320; public long f2321; public long f2322; public long f2323; + public long f2324; public long f2325; public long f2326; public long f2327; + public long f2328; public long f2329; public long f2330; public long f2331; + public long f2332; public long f2333; public long f2334; public long f2335; + public long f2336; public long f2337; public long f2338; public long f2339; + public long f2340; public long f2341; public long f2342; public long f2343; + public long f2344; public long f2345; public long f2346; public long f2347; + public long f2348; public long f2349; public long f2350; public long f2351; + public long f2352; public long f2353; public long f2354; public long f2355; + public long f2356; public long f2357; public long f2358; public long f2359; + public long f2360; public long f2361; public long f2362; public long f2363; + public long f2364; public long f2365; public long f2366; public long f2367; + public long f2368; public long f2369; public long f2370; public long f2371; + public long f2372; public long f2373; public long f2374; public long f2375; + public long f2376; public long f2377; public long f2378; public long f2379; + public long f2380; public long f2381; public long f2382; public long f2383; + public long f2384; public long f2385; public long f2386; public long f2387; + public long f2388; public long f2389; public long f2390; public long f2391; + public long f2392; public long f2393; public long f2394; public long f2395; + public long f2396; public long f2397; public long f2398; public long f2399; + public long f2400; public long f2401; public long f2402; public long f2403; + public long f2404; public long f2405; public long f2406; public long f2407; + public long f2408; public long f2409; public long f2410; public long f2411; + public long f2412; public long f2413; public long f2414; public long f2415; + public long f2416; public long f2417; public long f2418; public long f2419; + public long f2420; public long f2421; public long f2422; public long f2423; + public long f2424; public long f2425; public long f2426; public long f2427; + public long f2428; public long f2429; public long f2430; public long f2431; + public long f2432; public long f2433; public long f2434; public long f2435; + public long f2436; public long f2437; public long f2438; public long f2439; + public long f2440; public long f2441; public long f2442; public long f2443; + public long f2444; public long f2445; public long f2446; public long f2447; + public long f2448; public long f2449; public long f2450; public long f2451; + public long f2452; public long f2453; public long f2454; public long f2455; + public long f2456; public long f2457; public long f2458; public long f2459; + public long f2460; public long f2461; public long f2462; public long f2463; + public long f2464; public long f2465; public long f2466; public long f2467; + public long f2468; public long f2469; public long f2470; public long f2471; + public long f2472; public long f2473; public long f2474; public long f2475; + public long f2476; public long f2477; public long f2478; public long f2479; + public long f2480; public long f2481; public long f2482; public long f2483; + public long f2484; public long f2485; public long f2486; public long f2487; + public long f2488; public long f2489; public long f2490; public long f2491; + public long f2492; public long f2493; public long f2494; public long f2495; + public long f2496; public long f2497; public long f2498; public long f2499; + public long f2500; public long f2501; public long f2502; public long f2503; + public long f2504; public long f2505; public long f2506; public long f2507; + public long f2508; public long f2509; public long f2510; public long f2511; + public long f2512; public long f2513; public long f2514; public long f2515; + public long f2516; public long f2517; public long f2518; public long f2519; + public long f2520; public long f2521; public long f2522; public long f2523; + public long f2524; public long f2525; public long f2526; public long f2527; + public long f2528; public long f2529; public long f2530; public long f2531; + public long f2532; public long f2533; public long f2534; public long f2535; + public long f2536; public long f2537; public long f2538; public long f2539; + public long f2540; public long f2541; public long f2542; public long f2543; + public long f2544; public long f2545; public long f2546; public long f2547; + public long f2548; public long f2549; public long f2550; public long f2551; + public long f2552; public long f2553; public long f2554; public long f2555; + public long f2556; public long f2557; public long f2558; public long f2559; + public long f2560; public long f2561; public long f2562; public long f2563; + public long f2564; public long f2565; public long f2566; public long f2567; + public long f2568; public long f2569; public long f2570; public long f2571; + public long f2572; public long f2573; public long f2574; public long f2575; + public long f2576; public long f2577; public long f2578; public long f2579; + public long f2580; public long f2581; public long f2582; public long f2583; + public long f2584; public long f2585; public long f2586; public long f2587; + public long f2588; public long f2589; public long f2590; public long f2591; + public long f2592; public long f2593; public long f2594; public long f2595; + public long f2596; public long f2597; public long f2598; public long f2599; + public long f2600; public long f2601; public long f2602; public long f2603; + public long f2604; public long f2605; public long f2606; public long f2607; + public long f2608; public long f2609; public long f2610; public long f2611; + public long f2612; public long f2613; public long f2614; public long f2615; + public long f2616; public long f2617; public long f2618; public long f2619; + public long f2620; public long f2621; public long f2622; public long f2623; + public long f2624; public long f2625; public long f2626; public long f2627; + public long f2628; public long f2629; public long f2630; public long f2631; + public long f2632; public long f2633; public long f2634; public long f2635; + public long f2636; public long f2637; public long f2638; public long f2639; + public long f2640; public long f2641; public long f2642; public long f2643; + public long f2644; public long f2645; public long f2646; public long f2647; + public long f2648; public long f2649; public long f2650; public long f2651; + public long f2652; public long f2653; public long f2654; public long f2655; + public long f2656; public long f2657; public long f2658; public long f2659; + public long f2660; public long f2661; public long f2662; public long f2663; + public long f2664; public long f2665; public long f2666; public long f2667; + public long f2668; public long f2669; public long f2670; public long f2671; + public long f2672; public long f2673; public long f2674; public long f2675; + public long f2676; public long f2677; public long f2678; public long f2679; + public long f2680; public long f2681; public long f2682; public long f2683; + public long f2684; public long f2685; public long f2686; public long f2687; + public long f2688; public long f2689; public long f2690; public long f2691; + public long f2692; public long f2693; public long f2694; public long f2695; + public long f2696; public long f2697; public long f2698; public long f2699; + public long f2700; public long f2701; public long f2702; public long f2703; + public long f2704; public long f2705; public long f2706; public long f2707; + public long f2708; public long f2709; public long f2710; public long f2711; + public long f2712; public long f2713; public long f2714; public long f2715; + public long f2716; public long f2717; public long f2718; public long f2719; + public long f2720; public long f2721; public long f2722; public long f2723; + public long f2724; public long f2725; public long f2726; public long f2727; + public long f2728; public long f2729; public long f2730; public long f2731; + public long f2732; public long f2733; public long f2734; public long f2735; + public long f2736; public long f2737; public long f2738; public long f2739; + public long f2740; public long f2741; public long f2742; public long f2743; + public long f2744; public long f2745; public long f2746; public long f2747; + public long f2748; public long f2749; public long f2750; public long f2751; + public long f2752; public long f2753; public long f2754; public long f2755; + public long f2756; public long f2757; public long f2758; public long f2759; + public long f2760; public long f2761; public long f2762; public long f2763; + public long f2764; public long f2765; public long f2766; public long f2767; + public long f2768; public long f2769; public long f2770; public long f2771; + public long f2772; public long f2773; public long f2774; public long f2775; + public long f2776; public long f2777; public long f2778; public long f2779; + public long f2780; public long f2781; public long f2782; public long f2783; + public long f2784; public long f2785; public long f2786; public long f2787; + public long f2788; public long f2789; public long f2790; public long f2791; + public long f2792; public long f2793; public long f2794; public long f2795; + public long f2796; public long f2797; public long f2798; public long f2799; + public long f2800; public long f2801; public long f2802; public long f2803; + public long f2804; public long f2805; public long f2806; public long f2807; + public long f2808; public long f2809; public long f2810; public long f2811; + public long f2812; public long f2813; public long f2814; public long f2815; + public long f2816; public long f2817; public long f2818; public long f2819; + public long f2820; public long f2821; public long f2822; public long f2823; + public long f2824; public long f2825; public long f2826; public long f2827; + public long f2828; public long f2829; public long f2830; public long f2831; + public long f2832; public long f2833; public long f2834; public long f2835; + public long f2836; public long f2837; public long f2838; public long f2839; + public long f2840; public long f2841; public long f2842; public long f2843; + public long f2844; public long f2845; public long f2846; public long f2847; + public long f2848; public long f2849; public long f2850; public long f2851; + public long f2852; public long f2853; public long f2854; public long f2855; + public long f2856; public long f2857; public long f2858; public long f2859; + public long f2860; public long f2861; public long f2862; public long f2863; + public long f2864; public long f2865; public long f2866; public long f2867; + public long f2868; public long f2869; public long f2870; public long f2871; + public long f2872; public long f2873; public long f2874; public long f2875; + public long f2876; public long f2877; public long f2878; public long f2879; + public long f2880; public long f2881; public long f2882; public long f2883; + public long f2884; public long f2885; public long f2886; public long f2887; + public long f2888; public long f2889; public long f2890; public long f2891; + public long f2892; public long f2893; public long f2894; public long f2895; + public long f2896; public long f2897; public long f2898; public long f2899; + public long f2900; public long f2901; public long f2902; public long f2903; + public long f2904; public long f2905; public long f2906; public long f2907; + public long f2908; public long f2909; public long f2910; public long f2911; + public long f2912; public long f2913; public long f2914; public long f2915; + public long f2916; public long f2917; public long f2918; public long f2919; + public long f2920; public long f2921; public long f2922; public long f2923; + public long f2924; public long f2925; public long f2926; public long f2927; + public long f2928; public long f2929; public long f2930; public long f2931; + public long f2932; public long f2933; public long f2934; public long f2935; + public long f2936; public long f2937; public long f2938; public long f2939; + public long f2940; public long f2941; public long f2942; public long f2943; + public long f2944; public long f2945; public long f2946; public long f2947; + public long f2948; public long f2949; public long f2950; public long f2951; + public long f2952; public long f2953; public long f2954; public long f2955; + public long f2956; public long f2957; public long f2958; public long f2959; + public long f2960; public long f2961; public long f2962; public long f2963; + public long f2964; public long f2965; public long f2966; public long f2967; + public long f2968; public long f2969; public long f2970; public long f2971; + public long f2972; public long f2973; public long f2974; public long f2975; + public long f2976; public long f2977; public long f2978; public long f2979; + public long f2980; public long f2981; public long f2982; public long f2983; + public long f2984; public long f2985; public long f2986; public long f2987; + public long f2988; public long f2989; public long f2990; public long f2991; + public long f2992; public long f2993; public long f2994; public long f2995; + public long f2996; public long f2997; public long f2998; public long f2999; + public long f3000; public long f3001; public long f3002; public long f3003; + public long f3004; public long f3005; public long f3006; public long f3007; + public long f3008; public long f3009; public long f3010; public long f3011; + public long f3012; public long f3013; public long f3014; public long f3015; + public long f3016; public long f3017; public long f3018; public long f3019; + public long f3020; public long f3021; public long f3022; public long f3023; + public long f3024; public long f3025; public long f3026; public long f3027; + public long f3028; public long f3029; public long f3030; public long f3031; + public long f3032; public long f3033; public long f3034; public long f3035; + public long f3036; public long f3037; public long f3038; public long f3039; + public long f3040; public long f3041; public long f3042; public long f3043; + public long f3044; public long f3045; public long f3046; public long f3047; + public long f3048; public long f3049; public long f3050; public long f3051; + public long f3052; public long f3053; public long f3054; public long f3055; + public long f3056; public long f3057; public long f3058; public long f3059; + public long f3060; public long f3061; public long f3062; public long f3063; + public long f3064; public long f3065; public long f3066; public long f3067; + public long f3068; public long f3069; public long f3070; public long f3071; + public long f3072; public long f3073; public long f3074; public long f3075; + public long f3076; public long f3077; public long f3078; public long f3079; + public long f3080; public long f3081; public long f3082; public long f3083; + public long f3084; public long f3085; public long f3086; public long f3087; + public long f3088; public long f3089; public long f3090; public long f3091; + public long f3092; public long f3093; public long f3094; public long f3095; + public long f3096; public long f3097; public long f3098; public long f3099; + public long f3100; public long f3101; public long f3102; public long f3103; + public long f3104; public long f3105; public long f3106; public long f3107; + public long f3108; public long f3109; public long f3110; public long f3111; + public long f3112; public long f3113; public long f3114; public long f3115; + public long f3116; public long f3117; public long f3118; public long f3119; + public long f3120; public long f3121; public long f3122; public long f3123; + public long f3124; public long f3125; public long f3126; public long f3127; + public long f3128; public long f3129; public long f3130; public long f3131; + public long f3132; public long f3133; public long f3134; public long f3135; + public long f3136; public long f3137; public long f3138; public long f3139; + public long f3140; public long f3141; public long f3142; public long f3143; + public long f3144; public long f3145; public long f3146; public long f3147; + public long f3148; public long f3149; public long f3150; public long f3151; + public long f3152; public long f3153; public long f3154; public long f3155; + public long f3156; public long f3157; public long f3158; public long f3159; + public long f3160; public long f3161; public long f3162; public long f3163; + public long f3164; public long f3165; public long f3166; public long f3167; + public long f3168; public long f3169; public long f3170; public long f3171; + public long f3172; public long f3173; public long f3174; public long f3175; + public long f3176; public long f3177; public long f3178; public long f3179; + public long f3180; public long f3181; public long f3182; public long f3183; + public long f3184; public long f3185; public long f3186; public long f3187; + public long f3188; public long f3189; public long f3190; public long f3191; + public long f3192; public long f3193; public long f3194; public long f3195; + public long f3196; public long f3197; public long f3198; public long f3199; + public long f3200; public long f3201; public long f3202; public long f3203; + public long f3204; public long f3205; public long f3206; public long f3207; + public long f3208; public long f3209; public long f3210; public long f3211; + public long f3212; public long f3213; public long f3214; public long f3215; + public long f3216; public long f3217; public long f3218; public long f3219; + public long f3220; public long f3221; public long f3222; public long f3223; + public long f3224; public long f3225; public long f3226; public long f3227; + public long f3228; public long f3229; public long f3230; public long f3231; + public long f3232; public long f3233; public long f3234; public long f3235; + public long f3236; public long f3237; public long f3238; public long f3239; + public long f3240; public long f3241; public long f3242; public long f3243; + public long f3244; public long f3245; public long f3246; public long f3247; + public long f3248; public long f3249; public long f3250; public long f3251; + public long f3252; public long f3253; public long f3254; public long f3255; + public long f3256; public long f3257; public long f3258; public long f3259; + public long f3260; public long f3261; public long f3262; public long f3263; + public long f3264; public long f3265; public long f3266; public long f3267; + public long f3268; public long f3269; public long f3270; public long f3271; + public long f3272; public long f3273; public long f3274; public long f3275; + public long f3276; public long f3277; public long f3278; public long f3279; + public long f3280; public long f3281; public long f3282; public long f3283; + public long f3284; public long f3285; public long f3286; public long f3287; + public long f3288; public long f3289; public long f3290; public long f3291; + public long f3292; public long f3293; public long f3294; public long f3295; + public long f3296; public long f3297; public long f3298; public long f3299; + public long f3300; public long f3301; public long f3302; public long f3303; + public long f3304; public long f3305; public long f3306; public long f3307; + public long f3308; public long f3309; public long f3310; public long f3311; + public long f3312; public long f3313; public long f3314; public long f3315; + public long f3316; public long f3317; public long f3318; public long f3319; + public long f3320; public long f3321; public long f3322; public long f3323; + public long f3324; public long f3325; public long f3326; public long f3327; + public long f3328; public long f3329; public long f3330; public long f3331; + public long f3332; public long f3333; public long f3334; public long f3335; + public long f3336; public long f3337; public long f3338; public long f3339; + public long f3340; public long f3341; public long f3342; public long f3343; + public long f3344; public long f3345; public long f3346; public long f3347; + public long f3348; public long f3349; public long f3350; public long f3351; + public long f3352; public long f3353; public long f3354; public long f3355; + public long f3356; public long f3357; public long f3358; public long f3359; + public long f3360; public long f3361; public long f3362; public long f3363; + public long f3364; public long f3365; public long f3366; public long f3367; + public long f3368; public long f3369; public long f3370; public long f3371; + public long f3372; public long f3373; public long f3374; public long f3375; + public long f3376; public long f3377; public long f3378; public long f3379; + public long f3380; public long f3381; public long f3382; public long f3383; + public long f3384; public long f3385; public long f3386; public long f3387; + public long f3388; public long f3389; public long f3390; public long f3391; + public long f3392; public long f3393; public long f3394; public long f3395; + public long f3396; public long f3397; public long f3398; public long f3399; + public long f3400; public long f3401; public long f3402; public long f3403; + public long f3404; public long f3405; public long f3406; public long f3407; + public long f3408; public long f3409; public long f3410; public long f3411; + public long f3412; public long f3413; public long f3414; public long f3415; + public long f3416; public long f3417; public long f3418; public long f3419; + public long f3420; public long f3421; public long f3422; public long f3423; + public long f3424; public long f3425; public long f3426; public long f3427; + public long f3428; public long f3429; public long f3430; public long f3431; + public long f3432; public long f3433; public long f3434; public long f3435; + public long f3436; public long f3437; public long f3438; public long f3439; + public long f3440; public long f3441; public long f3442; public long f3443; + public long f3444; public long f3445; public long f3446; public long f3447; + public long f3448; public long f3449; public long f3450; public long f3451; + public long f3452; public long f3453; public long f3454; public long f3455; + public long f3456; public long f3457; public long f3458; public long f3459; + public long f3460; public long f3461; public long f3462; public long f3463; + public long f3464; public long f3465; public long f3466; public long f3467; + public long f3468; public long f3469; public long f3470; public long f3471; + public long f3472; public long f3473; public long f3474; public long f3475; + public long f3476; public long f3477; public long f3478; public long f3479; + public long f3480; public long f3481; public long f3482; public long f3483; + public long f3484; public long f3485; public long f3486; public long f3487; + public long f3488; public long f3489; public long f3490; public long f3491; + public long f3492; public long f3493; public long f3494; public long f3495; + public long f3496; public long f3497; public long f3498; public long f3499; + public long f3500; public long f3501; public long f3502; public long f3503; + public long f3504; public long f3505; public long f3506; public long f3507; + public long f3508; public long f3509; public long f3510; public long f3511; + public long f3512; public long f3513; public long f3514; public long f3515; + public long f3516; public long f3517; public long f3518; public long f3519; + public long f3520; public long f3521; public long f3522; public long f3523; + public long f3524; public long f3525; public long f3526; public long f3527; + public long f3528; public long f3529; public long f3530; public long f3531; + public long f3532; public long f3533; public long f3534; public long f3535; + public long f3536; public long f3537; public long f3538; public long f3539; + public long f3540; public long f3541; public long f3542; public long f3543; + public long f3544; public long f3545; public long f3546; public long f3547; + public long f3548; public long f3549; public long f3550; public long f3551; + public long f3552; public long f3553; public long f3554; public long f3555; + public long f3556; public long f3557; public long f3558; public long f3559; + public long f3560; public long f3561; public long f3562; public long f3563; + public long f3564; public long f3565; public long f3566; public long f3567; + public long f3568; public long f3569; public long f3570; public long f3571; + public long f3572; public long f3573; public long f3574; public long f3575; + public long f3576; public long f3577; public long f3578; public long f3579; + public long f3580; public long f3581; public long f3582; public long f3583; + public long f3584; public long f3585; public long f3586; public long f3587; + public long f3588; public long f3589; public long f3590; public long f3591; + public long f3592; public long f3593; public long f3594; public long f3595; + public long f3596; public long f3597; public long f3598; public long f3599; + public long f3600; public long f3601; public long f3602; public long f3603; + public long f3604; public long f3605; public long f3606; public long f3607; + public long f3608; public long f3609; public long f3610; public long f3611; + public long f3612; public long f3613; public long f3614; public long f3615; + public long f3616; public long f3617; public long f3618; public long f3619; + public long f3620; public long f3621; public long f3622; public long f3623; + public long f3624; public long f3625; public long f3626; public long f3627; + public long f3628; public long f3629; public long f3630; public long f3631; + public long f3632; public long f3633; public long f3634; public long f3635; + public long f3636; public long f3637; public long f3638; public long f3639; + public long f3640; public long f3641; public long f3642; public long f3643; + public long f3644; public long f3645; public long f3646; public long f3647; + public long f3648; public long f3649; public long f3650; public long f3651; + public long f3652; public long f3653; public long f3654; public long f3655; + public long f3656; public long f3657; public long f3658; public long f3659; + public long f3660; public long f3661; public long f3662; public long f3663; + public long f3664; public long f3665; public long f3666; public long f3667; + public long f3668; public long f3669; public long f3670; public long f3671; + public long f3672; public long f3673; public long f3674; public long f3675; + public long f3676; public long f3677; public long f3678; public long f3679; + public long f3680; public long f3681; public long f3682; public long f3683; + public long f3684; public long f3685; public long f3686; public long f3687; + public long f3688; public long f3689; public long f3690; public long f3691; + public long f3692; public long f3693; public long f3694; public long f3695; + public long f3696; public long f3697; public long f3698; public long f3699; + public long f3700; public long f3701; public long f3702; public long f3703; + public long f3704; public long f3705; public long f3706; public long f3707; + public long f3708; public long f3709; public long f3710; public long f3711; + public long f3712; public long f3713; public long f3714; public long f3715; + public long f3716; public long f3717; public long f3718; public long f3719; + public long f3720; public long f3721; public long f3722; public long f3723; + public long f3724; public long f3725; public long f3726; public long f3727; + public long f3728; public long f3729; public long f3730; public long f3731; + public long f3732; public long f3733; public long f3734; public long f3735; + public long f3736; public long f3737; public long f3738; public long f3739; + public long f3740; public long f3741; public long f3742; public long f3743; + public long f3744; public long f3745; public long f3746; public long f3747; + public long f3748; public long f3749; public long f3750; public long f3751; + public long f3752; public long f3753; public long f3754; public long f3755; + public long f3756; public long f3757; public long f3758; public long f3759; + public long f3760; public long f3761; public long f3762; public long f3763; + public long f3764; public long f3765; public long f3766; public long f3767; + public long f3768; public long f3769; public long f3770; public long f3771; + public long f3772; public long f3773; public long f3774; public long f3775; + public long f3776; public long f3777; public long f3778; public long f3779; + public long f3780; public long f3781; public long f3782; public long f3783; + public long f3784; public long f3785; public long f3786; public long f3787; + public long f3788; public long f3789; public long f3790; public long f3791; + public long f3792; public long f3793; public long f3794; public long f3795; + public long f3796; public long f3797; public long f3798; public long f3799; + public long f3800; public long f3801; public long f3802; public long f3803; + public long f3804; public long f3805; public long f3806; public long f3807; + public long f3808; public long f3809; public long f3810; public long f3811; + public long f3812; public long f3813; public long f3814; public long f3815; + public long f3816; public long f3817; public long f3818; public long f3819; + public long f3820; public long f3821; public long f3822; public long f3823; + public long f3824; public long f3825; public long f3826; public long f3827; + public long f3828; public long f3829; public long f3830; public long f3831; + public long f3832; public long f3833; public long f3834; public long f3835; + public long f3836; public long f3837; public long f3838; public long f3839; + public long f3840; public long f3841; public long f3842; public long f3843; + public long f3844; public long f3845; public long f3846; public long f3847; + public long f3848; public long f3849; public long f3850; public long f3851; + public long f3852; public long f3853; public long f3854; public long f3855; + public long f3856; public long f3857; public long f3858; public long f3859; + public long f3860; public long f3861; public long f3862; public long f3863; + public long f3864; public long f3865; public long f3866; public long f3867; + public long f3868; public long f3869; public long f3870; public long f3871; + public long f3872; public long f3873; public long f3874; public long f3875; + public long f3876; public long f3877; public long f3878; public long f3879; + public long f3880; public long f3881; public long f3882; public long f3883; + public long f3884; public long f3885; public long f3886; public long f3887; + public long f3888; public long f3889; public long f3890; public long f3891; + public long f3892; public long f3893; public long f3894; public long f3895; + public long f3896; public long f3897; public long f3898; public long f3899; + public long f3900; public long f3901; public long f3902; public long f3903; + public long f3904; public long f3905; public long f3906; public long f3907; + public long f3908; public long f3909; public long f3910; public long f3911; + public long f3912; public long f3913; public long f3914; public long f3915; + public long f3916; public long f3917; public long f3918; public long f3919; + public long f3920; public long f3921; public long f3922; public long f3923; + public long f3924; public long f3925; public long f3926; public long f3927; + public long f3928; public long f3929; public long f3930; public long f3931; + public long f3932; public long f3933; public long f3934; public long f3935; + public long f3936; public long f3937; public long f3938; public long f3939; + public long f3940; public long f3941; public long f3942; public long f3943; + public long f3944; public long f3945; public long f3946; public long f3947; + public long f3948; public long f3949; public long f3950; public long f3951; + public long f3952; public long f3953; public long f3954; public long f3955; + public long f3956; public long f3957; public long f3958; public long f3959; + public long f3960; public long f3961; public long f3962; public long f3963; + public long f3964; public long f3965; public long f3966; public long f3967; + public long f3968; public long f3969; public long f3970; public long f3971; + public long f3972; public long f3973; public long f3974; public long f3975; + public long f3976; public long f3977; public long f3978; public long f3979; + public long f3980; public long f3981; public long f3982; public long f3983; + public long f3984; public long f3985; public long f3986; public long f3987; + public long f3988; public long f3989; public long f3990; public long f3991; + public long f3992; public long f3993; public long f3994; public long f3995; + public long f3996; public long f3997; public long f3998; public long f3999; + public long f4000; public long f4001; public long f4002; public long f4003; + public long f4004; public long f4005; public long f4006; public long f4007; + public long f4008; public long f4009; public long f4010; public long f4011; + public long f4012; public long f4013; public long f4014; public long f4015; + public long f4016; public long f4017; public long f4018; public long f4019; + public long f4020; public long f4021; public long f4022; public long f4023; + public long f4024; public long f4025; public long f4026; public long f4027; + public long f4028; public long f4029; public long f4030; public long f4031; + public long f4032; public long f4033; public long f4034; public long f4035; + public long f4036; public long f4037; public long f4038; public long f4039; + public long f4040; public long f4041; public long f4042; public long f4043; + public long f4044; public long f4045; public long f4046; public long f4047; + public long f4048; public long f4049; public long f4050; public long f4051; + public long f4052; public long f4053; public long f4054; public long f4055; + public long f4056; public long f4057; public long f4058; public long f4059; + public long f4060; public long f4061; public long f4062; public long f4063; + public long f4064; public long f4065; public long f4066; public long f4067; + public long f4068; public long f4069; public long f4070; public long f4071; + public long f4072; public long f4073; public long f4074; public long f4075; + public long f4076; public long f4077; public long f4078; public long f4079; + public long f4080; public long f4081; public long f4082; public long f4083; + public long f4084; public long f4085; public long f4086; public long f4087; + public long f4088; public long f4089; public long f4090; public long f4091; + public long f4092; public long f4093; public long f4094; public long f4095; + public long f4096; public long f4097; public long f4098; public long f4099; + public long f4100; public long f4101; public long f4102; public long f4103; + public long f4104; public long f4105; public long f4106; public long f4107; + public long f4108; public long f4109; public long f4110; public long f4111; + public long f4112; public long f4113; public long f4114; public long f4115; + public long f4116; public long f4117; public long f4118; public long f4119; + public long f4120; public long f4121; public long f4122; public long f4123; + public long f4124; public long f4125; public long f4126; public long f4127; + public long f4128; public long f4129; public long f4130; public long f4131; + public long f4132; public long f4133; public long f4134; public long f4135; + public long f4136; public long f4137; public long f4138; public long f4139; + public long f4140; public long f4141; public long f4142; public long f4143; + public long f4144; public long f4145; public long f4146; public long f4147; + public long f4148; public long f4149; public long f4150; public long f4151; + public long f4152; public long f4153; public long f4154; public long f4155; + public long f4156; public long f4157; public long f4158; public long f4159; + public long f4160; public long f4161; public long f4162; public long f4163; + public long f4164; public long f4165; public long f4166; public long f4167; + public long f4168; public long f4169; public long f4170; public long f4171; + public long f4172; public long f4173; public long f4174; public long f4175; + public long f4176; public long f4177; public long f4178; public long f4179; + public long f4180; public long f4181; public long f4182; public long f4183; + public long f4184; public long f4185; public long f4186; public long f4187; + public long f4188; public long f4189; public long f4190; public long f4191; + public long f4192; public long f4193; public long f4194; public long f4195; + public long f4196; public long f4197; public long f4198; public long f4199; + public long f4200; public long f4201; public long f4202; public long f4203; + public long f4204; public long f4205; public long f4206; public long f4207; + public long f4208; public long f4209; public long f4210; public long f4211; + public long f4212; public long f4213; public long f4214; public long f4215; + public long f4216; public long f4217; public long f4218; public long f4219; + public long f4220; public long f4221; public long f4222; public long f4223; + public long f4224; public long f4225; public long f4226; public long f4227; + public long f4228; public long f4229; public long f4230; public long f4231; + public long f4232; public long f4233; public long f4234; public long f4235; + public long f4236; public long f4237; public long f4238; public long f4239; + public long f4240; public long f4241; public long f4242; public long f4243; + public long f4244; public long f4245; public long f4246; public long f4247; + public long f4248; public long f4249; public long f4250; public long f4251; + public long f4252; public long f4253; public long f4254; public long f4255; + public long f4256; public long f4257; public long f4258; public long f4259; + public long f4260; public long f4261; public long f4262; public long f4263; + public long f4264; public long f4265; public long f4266; public long f4267; + public long f4268; public long f4269; public long f4270; public long f4271; + public long f4272; public long f4273; public long f4274; public long f4275; + public long f4276; public long f4277; public long f4278; public long f4279; + public long f4280; public long f4281; public long f4282; public long f4283; + public long f4284; public long f4285; public long f4286; public long f4287; + public long f4288; public long f4289; public long f4290; public long f4291; + public long f4292; public long f4293; public long f4294; public long f4295; + public long f4296; public long f4297; public long f4298; public long f4299; + public long f4300; public long f4301; public long f4302; public long f4303; + public long f4304; public long f4305; public long f4306; public long f4307; + public long f4308; public long f4309; public long f4310; public long f4311; + public long f4312; public long f4313; public long f4314; public long f4315; + public long f4316; public long f4317; public long f4318; public long f4319; + public long f4320; public long f4321; public long f4322; public long f4323; + public long f4324; public long f4325; public long f4326; public long f4327; + public long f4328; public long f4329; public long f4330; public long f4331; + public long f4332; public long f4333; public long f4334; public long f4335; + public long f4336; public long f4337; public long f4338; public long f4339; + public long f4340; public long f4341; public long f4342; public long f4343; + public long f4344; public long f4345; public long f4346; public long f4347; + public long f4348; public long f4349; public long f4350; public long f4351; + public long f4352; public long f4353; public long f4354; public long f4355; + public long f4356; public long f4357; public long f4358; public long f4359; + public long f4360; public long f4361; public long f4362; public long f4363; + public long f4364; public long f4365; public long f4366; public long f4367; + public long f4368; public long f4369; public long f4370; public long f4371; + public long f4372; public long f4373; public long f4374; public long f4375; + public long f4376; public long f4377; public long f4378; public long f4379; + public long f4380; public long f4381; public long f4382; public long f4383; + public long f4384; public long f4385; public long f4386; public long f4387; + public long f4388; public long f4389; public long f4390; public long f4391; + public long f4392; public long f4393; public long f4394; public long f4395; + public long f4396; public long f4397; public long f4398; public long f4399; + public long f4400; public long f4401; public long f4402; public long f4403; + public long f4404; public long f4405; public long f4406; public long f4407; + public long f4408; public long f4409; public long f4410; public long f4411; + public long f4412; public long f4413; public long f4414; public long f4415; + public long f4416; public long f4417; public long f4418; public long f4419; + public long f4420; public long f4421; public long f4422; public long f4423; + public long f4424; public long f4425; public long f4426; public long f4427; + public long f4428; public long f4429; public long f4430; public long f4431; + public long f4432; public long f4433; public long f4434; public long f4435; + public long f4436; public long f4437; public long f4438; public long f4439; + public long f4440; public long f4441; public long f4442; public long f4443; + public long f4444; public long f4445; public long f4446; public long f4447; + public long f4448; public long f4449; public long f4450; public long f4451; + public long f4452; public long f4453; public long f4454; public long f4455; + public long f4456; public long f4457; public long f4458; public long f4459; + public long f4460; public long f4461; public long f4462; public long f4463; + public long f4464; public long f4465; public long f4466; public long f4467; + public long f4468; public long f4469; public long f4470; public long f4471; + public long f4472; public long f4473; public long f4474; public long f4475; + public long f4476; public long f4477; public long f4478; public long f4479; + public long f4480; public long f4481; public long f4482; public long f4483; + public long f4484; public long f4485; public long f4486; public long f4487; + public long f4488; public long f4489; public long f4490; public long f4491; + public long f4492; public long f4493; public long f4494; public long f4495; + public long f4496; public long f4497; public long f4498; public long f4499; + public long f4500; public long f4501; public long f4502; public long f4503; + public long f4504; public long f4505; public long f4506; public long f4507; + public long f4508; public long f4509; public long f4510; public long f4511; + public long f4512; public long f4513; public long f4514; public long f4515; + public long f4516; public long f4517; public long f4518; public long f4519; + public long f4520; public long f4521; public long f4522; public long f4523; + public long f4524; public long f4525; public long f4526; public long f4527; + public long f4528; public long f4529; public long f4530; public long f4531; + public long f4532; public long f4533; public long f4534; public long f4535; + public long f4536; public long f4537; public long f4538; public long f4539; + public long f4540; public long f4541; public long f4542; public long f4543; + public long f4544; public long f4545; public long f4546; public long f4547; + public long f4548; public long f4549; public long f4550; public long f4551; + public long f4552; public long f4553; public long f4554; public long f4555; + public long f4556; public long f4557; public long f4558; public long f4559; + public long f4560; public long f4561; public long f4562; public long f4563; + public long f4564; public long f4565; public long f4566; public long f4567; + public long f4568; public long f4569; public long f4570; public long f4571; + public long f4572; public long f4573; public long f4574; public long f4575; + public long f4576; public long f4577; public long f4578; public long f4579; + public long f4580; public long f4581; public long f4582; public long f4583; + public long f4584; public long f4585; public long f4586; public long f4587; + public long f4588; public long f4589; public long f4590; public long f4591; + public long f4592; public long f4593; public long f4594; public long f4595; + public long f4596; public long f4597; public long f4598; public long f4599; + public long f4600; public long f4601; public long f4602; public long f4603; + public long f4604; public long f4605; public long f4606; public long f4607; + public long f4608; public long f4609; public long f4610; public long f4611; + public long f4612; public long f4613; public long f4614; public long f4615; + public long f4616; public long f4617; public long f4618; public long f4619; + public long f4620; public long f4621; public long f4622; public long f4623; + public long f4624; public long f4625; public long f4626; public long f4627; + public long f4628; public long f4629; public long f4630; public long f4631; + public long f4632; public long f4633; public long f4634; public long f4635; + public long f4636; public long f4637; public long f4638; public long f4639; + public long f4640; public long f4641; public long f4642; public long f4643; + public long f4644; public long f4645; public long f4646; public long f4647; + public long f4648; public long f4649; public long f4650; public long f4651; + public long f4652; public long f4653; public long f4654; public long f4655; + public long f4656; public long f4657; public long f4658; public long f4659; + public long f4660; public long f4661; public long f4662; public long f4663; + public long f4664; public long f4665; public long f4666; public long f4667; + public long f4668; public long f4669; public long f4670; public long f4671; + public long f4672; public long f4673; public long f4674; public long f4675; + public long f4676; public long f4677; public long f4678; public long f4679; + public long f4680; public long f4681; public long f4682; public long f4683; + public long f4684; public long f4685; public long f4686; public long f4687; + public long f4688; public long f4689; public long f4690; public long f4691; + public long f4692; public long f4693; public long f4694; public long f4695; + public long f4696; public long f4697; public long f4698; public long f4699; + public long f4700; public long f4701; public long f4702; public long f4703; + public long f4704; public long f4705; public long f4706; public long f4707; + public long f4708; public long f4709; public long f4710; public long f4711; + public long f4712; public long f4713; public long f4714; public long f4715; + public long f4716; public long f4717; public long f4718; public long f4719; + public long f4720; public long f4721; public long f4722; public long f4723; + public long f4724; public long f4725; public long f4726; public long f4727; + public long f4728; public long f4729; public long f4730; public long f4731; + public long f4732; public long f4733; public long f4734; public long f4735; + public long f4736; public long f4737; public long f4738; public long f4739; + public long f4740; public long f4741; public long f4742; public long f4743; + public long f4744; public long f4745; public long f4746; public long f4747; + public long f4748; public long f4749; public long f4750; public long f4751; + public long f4752; public long f4753; public long f4754; public long f4755; + public long f4756; public long f4757; public long f4758; public long f4759; + public long f4760; public long f4761; public long f4762; public long f4763; + public long f4764; public long f4765; public long f4766; public long f4767; + public long f4768; public long f4769; public long f4770; public long f4771; + public long f4772; public long f4773; public long f4774; public long f4775; + public long f4776; public long f4777; public long f4778; public long f4779; + public long f4780; public long f4781; public long f4782; public long f4783; + public long f4784; public long f4785; public long f4786; public long f4787; + public long f4788; public long f4789; public long f4790; public long f4791; + public long f4792; public long f4793; public long f4794; public long f4795; + public long f4796; public long f4797; public long f4798; public long f4799; + public long f4800; public long f4801; public long f4802; public long f4803; + public long f4804; public long f4805; public long f4806; public long f4807; + public long f4808; public long f4809; public long f4810; public long f4811; + public long f4812; public long f4813; public long f4814; public long f4815; + public long f4816; public long f4817; public long f4818; public long f4819; + public long f4820; public long f4821; public long f4822; public long f4823; + public long f4824; public long f4825; public long f4826; public long f4827; + public long f4828; public long f4829; public long f4830; public long f4831; + public long f4832; public long f4833; public long f4834; public long f4835; + public long f4836; public long f4837; public long f4838; public long f4839; + public long f4840; public long f4841; public long f4842; public long f4843; + public long f4844; public long f4845; public long f4846; public long f4847; + public long f4848; public long f4849; public long f4850; public long f4851; + public long f4852; public long f4853; public long f4854; public long f4855; + public long f4856; public long f4857; public long f4858; public long f4859; + public long f4860; public long f4861; public long f4862; public long f4863; + public long f4864; public long f4865; public long f4866; public long f4867; + public long f4868; public long f4869; public long f4870; public long f4871; + public long f4872; public long f4873; public long f4874; public long f4875; + public long f4876; public long f4877; public long f4878; public long f4879; + public long f4880; public long f4881; public long f4882; public long f4883; + public long f4884; public long f4885; public long f4886; public long f4887; + public long f4888; public long f4889; public long f4890; public long f4891; + public long f4892; public long f4893; public long f4894; public long f4895; + public long f4896; public long f4897; public long f4898; public long f4899; + public long f4900; public long f4901; public long f4902; public long f4903; + public long f4904; public long f4905; public long f4906; public long f4907; + public long f4908; public long f4909; public long f4910; public long f4911; + public long f4912; public long f4913; public long f4914; public long f4915; + public long f4916; public long f4917; public long f4918; public long f4919; + public long f4920; public long f4921; public long f4922; public long f4923; + public long f4924; public long f4925; public long f4926; public long f4927; + public long f4928; public long f4929; public long f4930; public long f4931; + public long f4932; public long f4933; public long f4934; public long f4935; + public long f4936; public long f4937; public long f4938; public long f4939; + public long f4940; public long f4941; public long f4942; public long f4943; + public long f4944; public long f4945; public long f4946; public long f4947; + public long f4948; public long f4949; public long f4950; public long f4951; + public long f4952; public long f4953; public long f4954; public long f4955; + public long f4956; public long f4957; public long f4958; public long f4959; + public long f4960; public long f4961; public long f4962; public long f4963; + public long f4964; public long f4965; public long f4966; public long f4967; + public long f4968; public long f4969; public long f4970; public long f4971; + public long f4972; public long f4973; public long f4974; public long f4975; + public long f4976; public long f4977; public long f4978; public long f4979; + public long f4980; public long f4981; public long f4982; public long f4983; + public long f4984; public long f4985; public long f4986; public long f4987; + public long f4988; public long f4989; public long f4990; public long f4991; + public long f4992; public long f4993; public long f4994; public long f4995; + public long f4996; public long f4997; public long f4998; public long f4999; + public long f5000; public long f5001; public long f5002; public long f5003; + public long f5004; public long f5005; public long f5006; public long f5007; + public long f5008; public long f5009; public long f5010; public long f5011; + public long f5012; public long f5013; public long f5014; public long f5015; + public long f5016; public long f5017; public long f5018; public long f5019; + public long f5020; public long f5021; public long f5022; public long f5023; + public long f5024; public long f5025; public long f5026; public long f5027; + public long f5028; public long f5029; public long f5030; public long f5031; + public long f5032; public long f5033; public long f5034; public long f5035; + public long f5036; public long f5037; public long f5038; public long f5039; + public long f5040; public long f5041; public long f5042; public long f5043; + public long f5044; public long f5045; public long f5046; public long f5047; + public long f5048; public long f5049; public long f5050; public long f5051; + public long f5052; public long f5053; public long f5054; public long f5055; + public long f5056; public long f5057; public long f5058; public long f5059; + public long f5060; public long f5061; public long f5062; public long f5063; + public long f5064; public long f5065; public long f5066; public long f5067; + public long f5068; public long f5069; public long f5070; public long f5071; + public long f5072; public long f5073; public long f5074; public long f5075; + public long f5076; public long f5077; public long f5078; public long f5079; + public long f5080; public long f5081; public long f5082; public long f5083; + public long f5084; public long f5085; public long f5086; public long f5087; + public long f5088; public long f5089; public long f5090; public long f5091; + public long f5092; public long f5093; public long f5094; public long f5095; + public long f5096; public long f5097; public long f5098; public long f5099; + public long f5100; public long f5101; public long f5102; public long f5103; + public long f5104; public long f5105; public long f5106; public long f5107; + public long f5108; public long f5109; public long f5110; public long f5111; + public long f5112; public long f5113; public long f5114; public long f5115; + public long f5116; public long f5117; public long f5118; public long f5119; + public long f5120; public long f5121; public long f5122; public long f5123; + public long f5124; public long f5125; public long f5126; public long f5127; + public long f5128; public long f5129; public long f5130; public long f5131; + public long f5132; public long f5133; public long f5134; public long f5135; + public long f5136; public long f5137; public long f5138; public long f5139; + public long f5140; public long f5141; public long f5142; public long f5143; + public long f5144; public long f5145; public long f5146; public long f5147; + public long f5148; public long f5149; public long f5150; public long f5151; + public long f5152; public long f5153; public long f5154; public long f5155; + public long f5156; public long f5157; public long f5158; public long f5159; + public long f5160; public long f5161; public long f5162; public long f5163; + public long f5164; public long f5165; public long f5166; public long f5167; + public long f5168; public long f5169; public long f5170; public long f5171; + public long f5172; public long f5173; public long f5174; public long f5175; + public long f5176; public long f5177; public long f5178; public long f5179; + public long f5180; public long f5181; public long f5182; public long f5183; + public long f5184; public long f5185; public long f5186; public long f5187; + public long f5188; public long f5189; public long f5190; public long f5191; + public long f5192; public long f5193; public long f5194; public long f5195; + public long f5196; public long f5197; public long f5198; public long f5199; + public long f5200; public long f5201; public long f5202; public long f5203; + public long f5204; public long f5205; public long f5206; public long f5207; + public long f5208; public long f5209; public long f5210; public long f5211; + public long f5212; public long f5213; public long f5214; public long f5215; + public long f5216; public long f5217; public long f5218; public long f5219; + public long f5220; public long f5221; public long f5222; public long f5223; + public long f5224; public long f5225; public long f5226; public long f5227; + public long f5228; public long f5229; public long f5230; public long f5231; + public long f5232; public long f5233; public long f5234; public long f5235; + public long f5236; public long f5237; public long f5238; public long f5239; + public long f5240; public long f5241; public long f5242; public long f5243; + public long f5244; public long f5245; public long f5246; public long f5247; + public long f5248; public long f5249; public long f5250; public long f5251; + public long f5252; public long f5253; public long f5254; public long f5255; + public long f5256; public long f5257; public long f5258; public long f5259; + public long f5260; public long f5261; public long f5262; public long f5263; + public long f5264; public long f5265; public long f5266; public long f5267; + public long f5268; public long f5269; public long f5270; public long f5271; + public long f5272; public long f5273; public long f5274; public long f5275; + public long f5276; public long f5277; public long f5278; public long f5279; + public long f5280; public long f5281; public long f5282; public long f5283; + public long f5284; public long f5285; public long f5286; public long f5287; + public long f5288; public long f5289; public long f5290; public long f5291; + public long f5292; public long f5293; public long f5294; public long f5295; + public long f5296; public long f5297; public long f5298; public long f5299; + public long f5300; public long f5301; public long f5302; public long f5303; + public long f5304; public long f5305; public long f5306; public long f5307; + public long f5308; public long f5309; public long f5310; public long f5311; + public long f5312; public long f5313; public long f5314; public long f5315; + public long f5316; public long f5317; public long f5318; public long f5319; + public long f5320; public long f5321; public long f5322; public long f5323; + public long f5324; public long f5325; public long f5326; public long f5327; + public long f5328; public long f5329; public long f5330; public long f5331; + public long f5332; public long f5333; public long f5334; public long f5335; + public long f5336; public long f5337; public long f5338; public long f5339; + public long f5340; public long f5341; public long f5342; public long f5343; + public long f5344; public long f5345; public long f5346; public long f5347; + public long f5348; public long f5349; public long f5350; public long f5351; + public long f5352; public long f5353; public long f5354; public long f5355; + public long f5356; public long f5357; public long f5358; public long f5359; + public long f5360; public long f5361; public long f5362; public long f5363; + public long f5364; public long f5365; public long f5366; public long f5367; + public long f5368; public long f5369; public long f5370; public long f5371; + public long f5372; public long f5373; public long f5374; public long f5375; + public long f5376; public long f5377; public long f5378; public long f5379; + public long f5380; public long f5381; public long f5382; public long f5383; + public long f5384; public long f5385; public long f5386; public long f5387; + public long f5388; public long f5389; public long f5390; public long f5391; + public long f5392; public long f5393; public long f5394; public long f5395; + public long f5396; public long f5397; public long f5398; public long f5399; + public long f5400; public long f5401; public long f5402; public long f5403; + public long f5404; public long f5405; public long f5406; public long f5407; + public long f5408; public long f5409; public long f5410; public long f5411; + public long f5412; public long f5413; public long f5414; public long f5415; + public long f5416; public long f5417; public long f5418; public long f5419; + public long f5420; public long f5421; public long f5422; public long f5423; + public long f5424; public long f5425; public long f5426; public long f5427; + public long f5428; public long f5429; public long f5430; public long f5431; + public long f5432; public long f5433; public long f5434; public long f5435; + public long f5436; public long f5437; public long f5438; public long f5439; + public long f5440; public long f5441; public long f5442; public long f5443; + public long f5444; public long f5445; public long f5446; public long f5447; + public long f5448; public long f5449; public long f5450; public long f5451; + public long f5452; public long f5453; public long f5454; public long f5455; + public long f5456; public long f5457; public long f5458; public long f5459; + public long f5460; public long f5461; public long f5462; public long f5463; + public long f5464; public long f5465; public long f5466; public long f5467; + public long f5468; public long f5469; public long f5470; public long f5471; + public long f5472; public long f5473; public long f5474; public long f5475; + public long f5476; public long f5477; public long f5478; public long f5479; + public long f5480; public long f5481; public long f5482; public long f5483; + public long f5484; public long f5485; public long f5486; public long f5487; + public long f5488; public long f5489; public long f5490; public long f5491; + public long f5492; public long f5493; public long f5494; public long f5495; + public long f5496; public long f5497; public long f5498; public long f5499; + public long f5500; public long f5501; public long f5502; public long f5503; + public long f5504; public long f5505; public long f5506; public long f5507; + public long f5508; public long f5509; public long f5510; public long f5511; + public long f5512; public long f5513; public long f5514; public long f5515; + public long f5516; public long f5517; public long f5518; public long f5519; + public long f5520; public long f5521; public long f5522; public long f5523; + public long f5524; public long f5525; public long f5526; public long f5527; + public long f5528; public long f5529; public long f5530; public long f5531; + public long f5532; public long f5533; public long f5534; public long f5535; + public long f5536; public long f5537; public long f5538; public long f5539; + public long f5540; public long f5541; public long f5542; public long f5543; + public long f5544; public long f5545; public long f5546; public long f5547; + public long f5548; public long f5549; public long f5550; public long f5551; + public long f5552; public long f5553; public long f5554; public long f5555; + public long f5556; public long f5557; public long f5558; public long f5559; + public long f5560; public long f5561; public long f5562; public long f5563; + public long f5564; public long f5565; public long f5566; public long f5567; + public long f5568; public long f5569; public long f5570; public long f5571; + public long f5572; public long f5573; public long f5574; public long f5575; + public long f5576; public long f5577; public long f5578; public long f5579; + public long f5580; public long f5581; public long f5582; public long f5583; + public long f5584; public long f5585; public long f5586; public long f5587; + public long f5588; public long f5589; public long f5590; public long f5591; + public long f5592; public long f5593; public long f5594; public long f5595; + public long f5596; public long f5597; public long f5598; public long f5599; + public long f5600; public long f5601; public long f5602; public long f5603; + public long f5604; public long f5605; public long f5606; public long f5607; + public long f5608; public long f5609; public long f5610; public long f5611; + public long f5612; public long f5613; public long f5614; public long f5615; + public long f5616; public long f5617; public long f5618; public long f5619; + public long f5620; public long f5621; public long f5622; public long f5623; + public long f5624; public long f5625; public long f5626; public long f5627; + public long f5628; public long f5629; public long f5630; public long f5631; + public long f5632; public long f5633; public long f5634; public long f5635; + public long f5636; public long f5637; public long f5638; public long f5639; + public long f5640; public long f5641; public long f5642; public long f5643; + public long f5644; public long f5645; public long f5646; public long f5647; + public long f5648; public long f5649; public long f5650; public long f5651; + public long f5652; public long f5653; public long f5654; public long f5655; + public long f5656; public long f5657; public long f5658; public long f5659; + public long f5660; public long f5661; public long f5662; public long f5663; + public long f5664; public long f5665; public long f5666; public long f5667; + public long f5668; public long f5669; public long f5670; public long f5671; + public long f5672; public long f5673; public long f5674; public long f5675; + public long f5676; public long f5677; public long f5678; public long f5679; + public long f5680; public long f5681; public long f5682; public long f5683; + public long f5684; public long f5685; public long f5686; public long f5687; + public long f5688; public long f5689; public long f5690; public long f5691; + public long f5692; public long f5693; public long f5694; public long f5695; + public long f5696; public long f5697; public long f5698; public long f5699; + public long f5700; public long f5701; public long f5702; public long f5703; + public long f5704; public long f5705; public long f5706; public long f5707; + public long f5708; public long f5709; public long f5710; public long f5711; + public long f5712; public long f5713; public long f5714; public long f5715; + public long f5716; public long f5717; public long f5718; public long f5719; + public long f5720; public long f5721; public long f5722; public long f5723; + public long f5724; public long f5725; public long f5726; public long f5727; + public long f5728; public long f5729; public long f5730; public long f5731; + public long f5732; public long f5733; public long f5734; public long f5735; + public long f5736; public long f5737; public long f5738; public long f5739; + public long f5740; public long f5741; public long f5742; public long f5743; + public long f5744; public long f5745; public long f5746; public long f5747; + public long f5748; public long f5749; public long f5750; public long f5751; + public long f5752; public long f5753; public long f5754; public long f5755; + public long f5756; public long f5757; public long f5758; public long f5759; + public long f5760; public long f5761; public long f5762; public long f5763; + public long f5764; public long f5765; public long f5766; public long f5767; + public long f5768; public long f5769; public long f5770; public long f5771; + public long f5772; public long f5773; public long f5774; public long f5775; + public long f5776; public long f5777; public long f5778; public long f5779; + public long f5780; public long f5781; public long f5782; public long f5783; + public long f5784; public long f5785; public long f5786; public long f5787; + public long f5788; public long f5789; public long f5790; public long f5791; + public long f5792; public long f5793; public long f5794; public long f5795; + public long f5796; public long f5797; public long f5798; public long f5799; + public long f5800; public long f5801; public long f5802; public long f5803; + public long f5804; public long f5805; public long f5806; public long f5807; + public long f5808; public long f5809; public long f5810; public long f5811; + public long f5812; public long f5813; public long f5814; public long f5815; + public long f5816; public long f5817; public long f5818; public long f5819; + public long f5820; public long f5821; public long f5822; public long f5823; + public long f5824; public long f5825; public long f5826; public long f5827; + public long f5828; public long f5829; public long f5830; public long f5831; + public long f5832; public long f5833; public long f5834; public long f5835; + public long f5836; public long f5837; public long f5838; public long f5839; + public long f5840; public long f5841; public long f5842; public long f5843; + public long f5844; public long f5845; public long f5846; public long f5847; + public long f5848; public long f5849; public long f5850; public long f5851; + public long f5852; public long f5853; public long f5854; public long f5855; + public long f5856; public long f5857; public long f5858; public long f5859; + public long f5860; public long f5861; public long f5862; public long f5863; + public long f5864; public long f5865; public long f5866; public long f5867; + public long f5868; public long f5869; public long f5870; public long f5871; + public long f5872; public long f5873; public long f5874; public long f5875; + public long f5876; public long f5877; public long f5878; public long f5879; + public long f5880; public long f5881; public long f5882; public long f5883; + public long f5884; public long f5885; public long f5886; public long f5887; + public long f5888; public long f5889; public long f5890; public long f5891; + public long f5892; public long f5893; public long f5894; public long f5895; + public long f5896; public long f5897; public long f5898; public long f5899; + public long f5900; public long f5901; public long f5902; public long f5903; + public long f5904; public long f5905; public long f5906; public long f5907; + public long f5908; public long f5909; public long f5910; public long f5911; + public long f5912; public long f5913; public long f5914; public long f5915; + public long f5916; public long f5917; public long f5918; public long f5919; + public long f5920; public long f5921; public long f5922; public long f5923; + public long f5924; public long f5925; public long f5926; public long f5927; + public long f5928; public long f5929; public long f5930; public long f5931; + public long f5932; public long f5933; public long f5934; public long f5935; + public long f5936; public long f5937; public long f5938; public long f5939; + public long f5940; public long f5941; public long f5942; public long f5943; + public long f5944; public long f5945; public long f5946; public long f5947; + public long f5948; public long f5949; public long f5950; public long f5951; + public long f5952; public long f5953; public long f5954; public long f5955; + public long f5956; public long f5957; public long f5958; public long f5959; + public long f5960; public long f5961; public long f5962; public long f5963; + public long f5964; public long f5965; public long f5966; public long f5967; + public long f5968; public long f5969; public long f5970; public long f5971; + public long f5972; public long f5973; public long f5974; public long f5975; + public long f5976; public long f5977; public long f5978; public long f5979; + public long f5980; public long f5981; public long f5982; public long f5983; + public long f5984; public long f5985; public long f5986; public long f5987; + public long f5988; public long f5989; public long f5990; public long f5991; + public long f5992; public long f5993; public long f5994; public long f5995; + public long f5996; public long f5997; public long f5998; public long f5999; + public long f6000; public long f6001; public long f6002; public long f6003; + public long f6004; public long f6005; public long f6006; public long f6007; + public long f6008; public long f6009; public long f6010; public long f6011; + public long f6012; public long f6013; public long f6014; public long f6015; + public long f6016; public long f6017; public long f6018; public long f6019; + public long f6020; public long f6021; public long f6022; public long f6023; + public long f6024; public long f6025; public long f6026; public long f6027; + public long f6028; public long f6029; public long f6030; public long f6031; + public long f6032; public long f6033; public long f6034; public long f6035; + public long f6036; public long f6037; public long f6038; public long f6039; + public long f6040; public long f6041; public long f6042; public long f6043; + public long f6044; public long f6045; public long f6046; public long f6047; + public long f6048; public long f6049; public long f6050; public long f6051; + public long f6052; public long f6053; public long f6054; public long f6055; + public long f6056; public long f6057; public long f6058; public long f6059; + public long f6060; public long f6061; public long f6062; public long f6063; + public long f6064; public long f6065; public long f6066; public long f6067; + public long f6068; public long f6069; public long f6070; public long f6071; + public long f6072; public long f6073; public long f6074; public long f6075; + public long f6076; public long f6077; public long f6078; public long f6079; + public long f6080; public long f6081; public long f6082; public long f6083; + public long f6084; public long f6085; public long f6086; public long f6087; + public long f6088; public long f6089; public long f6090; public long f6091; + public long f6092; public long f6093; public long f6094; public long f6095; + public long f6096; public long f6097; public long f6098; public long f6099; + public long f6100; public long f6101; public long f6102; public long f6103; + public long f6104; public long f6105; public long f6106; public long f6107; + public long f6108; public long f6109; public long f6110; public long f6111; + public long f6112; public long f6113; public long f6114; public long f6115; + public long f6116; public long f6117; public long f6118; public long f6119; + public long f6120; public long f6121; public long f6122; public long f6123; + public long f6124; public long f6125; public long f6126; public long f6127; + public long f6128; public long f6129; public long f6130; public long f6131; + public long f6132; public long f6133; public long f6134; public long f6135; + public long f6136; public long f6137; public long f6138; public long f6139; + public long f6140; public long f6141; public long f6142; public long f6143; + public long f6144; public long f6145; public long f6146; public long f6147; + public long f6148; public long f6149; public long f6150; public long f6151; + public long f6152; public long f6153; public long f6154; public long f6155; + public long f6156; public long f6157; public long f6158; public long f6159; + public long f6160; public long f6161; public long f6162; public long f6163; + public long f6164; public long f6165; public long f6166; public long f6167; + public long f6168; public long f6169; public long f6170; public long f6171; + public long f6172; public long f6173; public long f6174; public long f6175; + public long f6176; public long f6177; public long f6178; public long f6179; + public long f6180; public long f6181; public long f6182; public long f6183; + public long f6184; public long f6185; public long f6186; public long f6187; + public long f6188; public long f6189; public long f6190; public long f6191; + public long f6192; public long f6193; public long f6194; public long f6195; + public long f6196; public long f6197; public long f6198; public long f6199; + public long f6200; public long f6201; public long f6202; public long f6203; + public long f6204; public long f6205; public long f6206; public long f6207; + public long f6208; public long f6209; public long f6210; public long f6211; + public long f6212; public long f6213; public long f6214; public long f6215; + public long f6216; public long f6217; public long f6218; public long f6219; + public long f6220; public long f6221; public long f6222; public long f6223; + public long f6224; public long f6225; public long f6226; public long f6227; + public long f6228; public long f6229; public long f6230; public long f6231; + public long f6232; public long f6233; public long f6234; public long f6235; + public long f6236; public long f6237; public long f6238; public long f6239; + public long f6240; public long f6241; public long f6242; public long f6243; + public long f6244; public long f6245; public long f6246; public long f6247; + public long f6248; public long f6249; public long f6250; public long f6251; + public long f6252; public long f6253; public long f6254; public long f6255; + public long f6256; public long f6257; public long f6258; public long f6259; + public long f6260; public long f6261; public long f6262; public long f6263; + public long f6264; public long f6265; public long f6266; public long f6267; + public long f6268; public long f6269; public long f6270; public long f6271; + public long f6272; public long f6273; public long f6274; public long f6275; + public long f6276; public long f6277; public long f6278; public long f6279; + public long f6280; public long f6281; public long f6282; public long f6283; + public long f6284; public long f6285; public long f6286; public long f6287; + public long f6288; public long f6289; public long f6290; public long f6291; + public long f6292; public long f6293; public long f6294; public long f6295; + public long f6296; public long f6297; public long f6298; public long f6299; + public long f6300; public long f6301; public long f6302; public long f6303; + public long f6304; public long f6305; public long f6306; public long f6307; + public long f6308; public long f6309; public long f6310; public long f6311; + public long f6312; public long f6313; public long f6314; public long f6315; + public long f6316; public long f6317; public long f6318; public long f6319; + public long f6320; public long f6321; public long f6322; public long f6323; + public long f6324; public long f6325; public long f6326; public long f6327; + public long f6328; public long f6329; public long f6330; public long f6331; + public long f6332; public long f6333; public long f6334; public long f6335; + public long f6336; public long f6337; public long f6338; public long f6339; + public long f6340; public long f6341; public long f6342; public long f6343; + public long f6344; public long f6345; public long f6346; public long f6347; + public long f6348; public long f6349; public long f6350; public long f6351; + public long f6352; public long f6353; public long f6354; public long f6355; + public long f6356; public long f6357; public long f6358; public long f6359; + public long f6360; public long f6361; public long f6362; public long f6363; + public long f6364; public long f6365; public long f6366; public long f6367; + public long f6368; public long f6369; public long f6370; public long f6371; + public long f6372; public long f6373; public long f6374; public long f6375; + public long f6376; public long f6377; public long f6378; public long f6379; + public long f6380; public long f6381; public long f6382; public long f6383; + public long f6384; public long f6385; public long f6386; public long f6387; + public long f6388; public long f6389; public long f6390; public long f6391; + public long f6392; public long f6393; public long f6394; public long f6395; + public long f6396; public long f6397; public long f6398; public long f6399; + public long f6400; public long f6401; public long f6402; public long f6403; + public long f6404; public long f6405; public long f6406; public long f6407; + public long f6408; public long f6409; public long f6410; public long f6411; + public long f6412; public long f6413; public long f6414; public long f6415; + public long f6416; public long f6417; public long f6418; public long f6419; + public long f6420; public long f6421; public long f6422; public long f6423; + public long f6424; public long f6425; public long f6426; public long f6427; + public long f6428; public long f6429; public long f6430; public long f6431; + public long f6432; public long f6433; public long f6434; public long f6435; + public long f6436; public long f6437; public long f6438; public long f6439; + public long f6440; public long f6441; public long f6442; public long f6443; + public long f6444; public long f6445; public long f6446; public long f6447; + public long f6448; public long f6449; public long f6450; public long f6451; + public long f6452; public long f6453; public long f6454; public long f6455; + public long f6456; public long f6457; public long f6458; public long f6459; + public long f6460; public long f6461; public long f6462; public long f6463; + public long f6464; public long f6465; public long f6466; public long f6467; + public long f6468; public long f6469; public long f6470; public long f6471; + public long f6472; public long f6473; public long f6474; public long f6475; + public long f6476; public long f6477; public long f6478; public long f6479; + public long f6480; public long f6481; public long f6482; public long f6483; + public long f6484; public long f6485; public long f6486; public long f6487; + public long f6488; public long f6489; public long f6490; public long f6491; + public long f6492; public long f6493; public long f6494; public long f6495; + public long f6496; public long f6497; public long f6498; public long f6499; + public long f6500; public long f6501; public long f6502; public long f6503; + public long f6504; public long f6505; public long f6506; public long f6507; + public long f6508; public long f6509; public long f6510; public long f6511; + public long f6512; public long f6513; public long f6514; public long f6515; + public long f6516; public long f6517; public long f6518; public long f6519; + public long f6520; public long f6521; public long f6522; public long f6523; + public long f6524; public long f6525; public long f6526; public long f6527; + public long f6528; public long f6529; public long f6530; public long f6531; + public long f6532; public long f6533; public long f6534; public long f6535; + public long f6536; public long f6537; public long f6538; public long f6539; + public long f6540; public long f6541; public long f6542; public long f6543; + public long f6544; public long f6545; public long f6546; public long f6547; + public long f6548; public long f6549; public long f6550; public long f6551; + public long f6552; public long f6553; public long f6554; public long f6555; + public long f6556; public long f6557; public long f6558; public long f6559; + public long f6560; public long f6561; public long f6562; public long f6563; + public long f6564; public long f6565; public long f6566; public long f6567; + public long f6568; public long f6569; public long f6570; public long f6571; + public long f6572; public long f6573; public long f6574; public long f6575; + public long f6576; public long f6577; public long f6578; public long f6579; + public long f6580; public long f6581; public long f6582; public long f6583; + public long f6584; public long f6585; public long f6586; public long f6587; + public long f6588; public long f6589; public long f6590; public long f6591; + public long f6592; public long f6593; public long f6594; public long f6595; + public long f6596; public long f6597; public long f6598; public long f6599; + public long f6600; public long f6601; public long f6602; public long f6603; + public long f6604; public long f6605; public long f6606; public long f6607; + public long f6608; public long f6609; public long f6610; public long f6611; + public long f6612; public long f6613; public long f6614; public long f6615; + public long f6616; public long f6617; public long f6618; public long f6619; + public long f6620; public long f6621; public long f6622; public long f6623; + public long f6624; public long f6625; public long f6626; public long f6627; + public long f6628; public long f6629; public long f6630; public long f6631; + public long f6632; public long f6633; public long f6634; public long f6635; + public long f6636; public long f6637; public long f6638; public long f6639; + public long f6640; public long f6641; public long f6642; public long f6643; + public long f6644; public long f6645; public long f6646; public long f6647; + public long f6648; public long f6649; public long f6650; public long f6651; + public long f6652; public long f6653; public long f6654; public long f6655; + public long f6656; public long f6657; public long f6658; public long f6659; + public long f6660; public long f6661; public long f6662; public long f6663; + public long f6664; public long f6665; public long f6666; public long f6667; + public long f6668; public long f6669; public long f6670; public long f6671; + public long f6672; public long f6673; public long f6674; public long f6675; + public long f6676; public long f6677; public long f6678; public long f6679; + public long f6680; public long f6681; public long f6682; public long f6683; + public long f6684; public long f6685; public long f6686; public long f6687; + public long f6688; public long f6689; public long f6690; public long f6691; + public long f6692; public long f6693; public long f6694; public long f6695; + public long f6696; public long f6697; public long f6698; public long f6699; + public long f6700; public long f6701; public long f6702; public long f6703; + public long f6704; public long f6705; public long f6706; public long f6707; + public long f6708; public long f6709; public long f6710; public long f6711; + public long f6712; public long f6713; public long f6714; public long f6715; + public long f6716; public long f6717; public long f6718; public long f6719; + public long f6720; public long f6721; public long f6722; public long f6723; + public long f6724; public long f6725; public long f6726; public long f6727; + public long f6728; public long f6729; public long f6730; public long f6731; + public long f6732; public long f6733; public long f6734; public long f6735; + public long f6736; public long f6737; public long f6738; public long f6739; + public long f6740; public long f6741; public long f6742; public long f6743; + public long f6744; public long f6745; public long f6746; public long f6747; + public long f6748; public long f6749; public long f6750; public long f6751; + public long f6752; public long f6753; public long f6754; public long f6755; + public long f6756; public long f6757; public long f6758; public long f6759; + public long f6760; public long f6761; public long f6762; public long f6763; + public long f6764; public long f6765; public long f6766; public long f6767; + public long f6768; public long f6769; public long f6770; public long f6771; + public long f6772; public long f6773; public long f6774; public long f6775; + public long f6776; public long f6777; public long f6778; public long f6779; + public long f6780; public long f6781; public long f6782; public long f6783; + public long f6784; public long f6785; public long f6786; public long f6787; + public long f6788; public long f6789; public long f6790; public long f6791; + public long f6792; public long f6793; public long f6794; public long f6795; + public long f6796; public long f6797; public long f6798; public long f6799; + public long f6800; public long f6801; public long f6802; public long f6803; + public long f6804; public long f6805; public long f6806; public long f6807; + public long f6808; public long f6809; public long f6810; public long f6811; + public long f6812; public long f6813; public long f6814; public long f6815; + public long f6816; public long f6817; public long f6818; public long f6819; + public long f6820; public long f6821; public long f6822; public long f6823; + public long f6824; public long f6825; public long f6826; public long f6827; + public long f6828; public long f6829; public long f6830; public long f6831; + public long f6832; public long f6833; public long f6834; public long f6835; + public long f6836; public long f6837; public long f6838; public long f6839; + public long f6840; public long f6841; public long f6842; public long f6843; + public long f6844; public long f6845; public long f6846; public long f6847; + public long f6848; public long f6849; public long f6850; public long f6851; + public long f6852; public long f6853; public long f6854; public long f6855; + public long f6856; public long f6857; public long f6858; public long f6859; + public long f6860; public long f6861; public long f6862; public long f6863; + public long f6864; public long f6865; public long f6866; public long f6867; + public long f6868; public long f6869; public long f6870; public long f6871; + public long f6872; public long f6873; public long f6874; public long f6875; + public long f6876; public long f6877; public long f6878; public long f6879; + public long f6880; public long f6881; public long f6882; public long f6883; + public long f6884; public long f6885; public long f6886; public long f6887; + public long f6888; public long f6889; public long f6890; public long f6891; + public long f6892; public long f6893; public long f6894; public long f6895; + public long f6896; public long f6897; public long f6898; public long f6899; + public long f6900; public long f6901; public long f6902; public long f6903; + public long f6904; public long f6905; public long f6906; public long f6907; + public long f6908; public long f6909; public long f6910; public long f6911; + public long f6912; public long f6913; public long f6914; public long f6915; + public long f6916; public long f6917; public long f6918; public long f6919; + public long f6920; public long f6921; public long f6922; public long f6923; + public long f6924; public long f6925; public long f6926; public long f6927; + public long f6928; public long f6929; public long f6930; public long f6931; + public long f6932; public long f6933; public long f6934; public long f6935; + public long f6936; public long f6937; public long f6938; public long f6939; + public long f6940; public long f6941; public long f6942; public long f6943; + public long f6944; public long f6945; public long f6946; public long f6947; + public long f6948; public long f6949; public long f6950; public long f6951; + public long f6952; public long f6953; public long f6954; public long f6955; + public long f6956; public long f6957; public long f6958; public long f6959; + public long f6960; public long f6961; public long f6962; public long f6963; + public long f6964; public long f6965; public long f6966; public long f6967; + public long f6968; public long f6969; public long f6970; public long f6971; + public long f6972; public long f6973; public long f6974; public long f6975; + public long f6976; public long f6977; public long f6978; public long f6979; + public long f6980; public long f6981; public long f6982; public long f6983; + public long f6984; public long f6985; public long f6986; public long f6987; + public long f6988; public long f6989; public long f6990; public long f6991; + public long f6992; public long f6993; public long f6994; public long f6995; + public long f6996; public long f6997; public long f6998; public long f6999; + public long f7000; public long f7001; public long f7002; public long f7003; + public long f7004; public long f7005; public long f7006; public long f7007; + public long f7008; public long f7009; public long f7010; public long f7011; + public long f7012; public long f7013; public long f7014; public long f7015; + public long f7016; public long f7017; public long f7018; public long f7019; + public long f7020; public long f7021; public long f7022; public long f7023; + public long f7024; public long f7025; public long f7026; public long f7027; + public long f7028; public long f7029; public long f7030; public long f7031; + public long f7032; public long f7033; public long f7034; public long f7035; + public long f7036; public long f7037; public long f7038; public long f7039; + public long f7040; public long f7041; public long f7042; public long f7043; + public long f7044; public long f7045; public long f7046; public long f7047; + public long f7048; public long f7049; public long f7050; public long f7051; + public long f7052; public long f7053; public long f7054; public long f7055; + public long f7056; public long f7057; public long f7058; public long f7059; + public long f7060; public long f7061; public long f7062; public long f7063; + public long f7064; public long f7065; public long f7066; public long f7067; + public long f7068; public long f7069; public long f7070; public long f7071; + public long f7072; public long f7073; public long f7074; public long f7075; + public long f7076; public long f7077; public long f7078; public long f7079; + public long f7080; public long f7081; public long f7082; public long f7083; + public long f7084; public long f7085; public long f7086; public long f7087; + public long f7088; public long f7089; public long f7090; public long f7091; + public long f7092; public long f7093; public long f7094; public long f7095; + public long f7096; public long f7097; public long f7098; public long f7099; + public long f7100; public long f7101; public long f7102; public long f7103; + public long f7104; public long f7105; public long f7106; public long f7107; + public long f7108; public long f7109; public long f7110; public long f7111; + public long f7112; public long f7113; public long f7114; public long f7115; + public long f7116; public long f7117; public long f7118; public long f7119; + public long f7120; public long f7121; public long f7122; public long f7123; + public long f7124; public long f7125; public long f7126; public long f7127; + public long f7128; public long f7129; public long f7130; public long f7131; + public long f7132; public long f7133; public long f7134; public long f7135; + public long f7136; public long f7137; public long f7138; public long f7139; + public long f7140; public long f7141; public long f7142; public long f7143; + public long f7144; public long f7145; public long f7146; public long f7147; + public long f7148; public long f7149; public long f7150; public long f7151; + public long f7152; public long f7153; public long f7154; public long f7155; + public long f7156; public long f7157; public long f7158; public long f7159; + public long f7160; public long f7161; public long f7162; public long f7163; + public long f7164; public long f7165; public long f7166; public long f7167; + public long f7168; public long f7169; public long f7170; public long f7171; + public long f7172; public long f7173; public long f7174; public long f7175; + public long f7176; public long f7177; public long f7178; public long f7179; + public long f7180; public long f7181; public long f7182; public long f7183; + public long f7184; public long f7185; public long f7186; public long f7187; + public long f7188; public long f7189; public long f7190; public long f7191; + public long f7192; public long f7193; public long f7194; public long f7195; + public long f7196; public long f7197; public long f7198; public long f7199; + public long f7200; public long f7201; public long f7202; public long f7203; + public long f7204; public long f7205; public long f7206; public long f7207; + public long f7208; public long f7209; public long f7210; public long f7211; + public long f7212; public long f7213; public long f7214; public long f7215; + public long f7216; public long f7217; public long f7218; public long f7219; + public long f7220; public long f7221; public long f7222; public long f7223; + public long f7224; public long f7225; public long f7226; public long f7227; + public long f7228; public long f7229; public long f7230; public long f7231; + public long f7232; public long f7233; public long f7234; public long f7235; + public long f7236; public long f7237; public long f7238; public long f7239; + public long f7240; public long f7241; public long f7242; public long f7243; + public long f7244; public long f7245; public long f7246; public long f7247; + public long f7248; public long f7249; public long f7250; public long f7251; + public long f7252; public long f7253; public long f7254; public long f7255; + public long f7256; public long f7257; public long f7258; public long f7259; + public long f7260; public long f7261; public long f7262; public long f7263; + public long f7264; public long f7265; public long f7266; public long f7267; + public long f7268; public long f7269; public long f7270; public long f7271; + public long f7272; public long f7273; public long f7274; public long f7275; + public long f7276; public long f7277; public long f7278; public long f7279; + public long f7280; public long f7281; public long f7282; public long f7283; + public long f7284; public long f7285; public long f7286; public long f7287; + public long f7288; public long f7289; public long f7290; public long f7291; + public long f7292; public long f7293; public long f7294; public long f7295; + public long f7296; public long f7297; public long f7298; public long f7299; + public long f7300; public long f7301; public long f7302; public long f7303; + public long f7304; public long f7305; public long f7306; public long f7307; + public long f7308; public long f7309; public long f7310; public long f7311; + public long f7312; public long f7313; public long f7314; public long f7315; + public long f7316; public long f7317; public long f7318; public long f7319; + public long f7320; public long f7321; public long f7322; public long f7323; + public long f7324; public long f7325; public long f7326; public long f7327; + public long f7328; public long f7329; public long f7330; public long f7331; + public long f7332; public long f7333; public long f7334; public long f7335; + public long f7336; public long f7337; public long f7338; public long f7339; + public long f7340; public long f7341; public long f7342; public long f7343; + public long f7344; public long f7345; public long f7346; public long f7347; + public long f7348; public long f7349; public long f7350; public long f7351; + public long f7352; public long f7353; public long f7354; public long f7355; + public long f7356; public long f7357; public long f7358; public long f7359; + public long f7360; public long f7361; public long f7362; public long f7363; + public long f7364; public long f7365; public long f7366; public long f7367; + public long f7368; public long f7369; public long f7370; public long f7371; + public long f7372; public long f7373; public long f7374; public long f7375; + public long f7376; public long f7377; public long f7378; public long f7379; + public long f7380; public long f7381; public long f7382; public long f7383; + public long f7384; public long f7385; public long f7386; public long f7387; + public long f7388; public long f7389; public long f7390; public long f7391; + public long f7392; public long f7393; public long f7394; public long f7395; + public long f7396; public long f7397; public long f7398; public long f7399; + public long f7400; public long f7401; public long f7402; public long f7403; + public long f7404; public long f7405; public long f7406; public long f7407; + public long f7408; public long f7409; public long f7410; public long f7411; + public long f7412; public long f7413; public long f7414; public long f7415; + public long f7416; public long f7417; public long f7418; public long f7419; + public long f7420; public long f7421; public long f7422; public long f7423; + public long f7424; public long f7425; public long f7426; public long f7427; + public long f7428; public long f7429; public long f7430; public long f7431; + public long f7432; public long f7433; public long f7434; public long f7435; + public long f7436; public long f7437; public long f7438; public long f7439; + public long f7440; public long f7441; public long f7442; public long f7443; + public long f7444; public long f7445; public long f7446; public long f7447; + public long f7448; public long f7449; public long f7450; public long f7451; + public long f7452; public long f7453; public long f7454; public long f7455; + public long f7456; public long f7457; public long f7458; public long f7459; + public long f7460; public long f7461; public long f7462; public long f7463; + public long f7464; public long f7465; public long f7466; public long f7467; + public long f7468; public long f7469; public long f7470; public long f7471; + public long f7472; public long f7473; public long f7474; public long f7475; + public long f7476; public long f7477; public long f7478; public long f7479; + public long f7480; public long f7481; public long f7482; public long f7483; + public long f7484; public long f7485; public long f7486; public long f7487; + public long f7488; public long f7489; public long f7490; public long f7491; + public long f7492; public long f7493; public long f7494; public long f7495; + public long f7496; public long f7497; public long f7498; public long f7499; + public long f7500; public long f7501; public long f7502; public long f7503; + public long f7504; public long f7505; public long f7506; public long f7507; + public long f7508; public long f7509; public long f7510; public long f7511; + public long f7512; public long f7513; public long f7514; public long f7515; + public long f7516; public long f7517; public long f7518; public long f7519; + public long f7520; public long f7521; public long f7522; public long f7523; + public long f7524; public long f7525; public long f7526; public long f7527; + public long f7528; public long f7529; public long f7530; public long f7531; + public long f7532; public long f7533; public long f7534; public long f7535; + public long f7536; public long f7537; public long f7538; public long f7539; + public long f7540; public long f7541; public long f7542; public long f7543; + public long f7544; public long f7545; public long f7546; public long f7547; + public long f7548; public long f7549; public long f7550; public long f7551; + public long f7552; public long f7553; public long f7554; public long f7555; + public long f7556; public long f7557; public long f7558; public long f7559; + public long f7560; public long f7561; public long f7562; public long f7563; + public long f7564; public long f7565; public long f7566; public long f7567; + public long f7568; public long f7569; public long f7570; public long f7571; + public long f7572; public long f7573; public long f7574; public long f7575; + public long f7576; public long f7577; public long f7578; public long f7579; + public long f7580; public long f7581; public long f7582; public long f7583; + public long f7584; public long f7585; public long f7586; public long f7587; + public long f7588; public long f7589; public long f7590; public long f7591; + public long f7592; public long f7593; public long f7594; public long f7595; + public long f7596; public long f7597; public long f7598; public long f7599; + public long f7600; public long f7601; public long f7602; public long f7603; + public long f7604; public long f7605; public long f7606; public long f7607; + public long f7608; public long f7609; public long f7610; public long f7611; + public long f7612; public long f7613; public long f7614; public long f7615; + public long f7616; public long f7617; public long f7618; public long f7619; + public long f7620; public long f7621; public long f7622; public long f7623; + public long f7624; public long f7625; public long f7626; public long f7627; + public long f7628; public long f7629; public long f7630; public long f7631; + public long f7632; public long f7633; public long f7634; public long f7635; + public long f7636; public long f7637; public long f7638; public long f7639; + public long f7640; public long f7641; public long f7642; public long f7643; + public long f7644; public long f7645; public long f7646; public long f7647; + public long f7648; public long f7649; public long f7650; public long f7651; + public long f7652; public long f7653; public long f7654; public long f7655; + public long f7656; public long f7657; public long f7658; public long f7659; + public long f7660; public long f7661; public long f7662; public long f7663; + public long f7664; public long f7665; public long f7666; public long f7667; + public long f7668; public long f7669; public long f7670; public long f7671; + public long f7672; public long f7673; public long f7674; public long f7675; + public long f7676; public long f7677; public long f7678; public long f7679; + public long f7680; public long f7681; public long f7682; public long f7683; + public long f7684; public long f7685; public long f7686; public long f7687; + public long f7688; public long f7689; public long f7690; public long f7691; + public long f7692; public long f7693; public long f7694; public long f7695; + public long f7696; public long f7697; public long f7698; public long f7699; + public long f7700; public long f7701; public long f7702; public long f7703; + public long f7704; public long f7705; public long f7706; public long f7707; + public long f7708; public long f7709; public long f7710; public long f7711; + public long f7712; public long f7713; public long f7714; public long f7715; + public long f7716; public long f7717; public long f7718; public long f7719; + public long f7720; public long f7721; public long f7722; public long f7723; + public long f7724; public long f7725; public long f7726; public long f7727; + public long f7728; public long f7729; public long f7730; public long f7731; + public long f7732; public long f7733; public long f7734; public long f7735; + public long f7736; public long f7737; public long f7738; public long f7739; + public long f7740; public long f7741; public long f7742; public long f7743; + public long f7744; public long f7745; public long f7746; public long f7747; + public long f7748; public long f7749; public long f7750; public long f7751; + public long f7752; public long f7753; public long f7754; public long f7755; + public long f7756; public long f7757; public long f7758; public long f7759; + public long f7760; public long f7761; public long f7762; public long f7763; + public long f7764; public long f7765; public long f7766; public long f7767; + public long f7768; public long f7769; public long f7770; public long f7771; + public long f7772; public long f7773; public long f7774; public long f7775; + public long f7776; public long f7777; public long f7778; public long f7779; + public long f7780; public long f7781; public long f7782; public long f7783; + public long f7784; public long f7785; public long f7786; public long f7787; + public long f7788; public long f7789; public long f7790; public long f7791; + public long f7792; public long f7793; public long f7794; public long f7795; + public long f7796; public long f7797; public long f7798; public long f7799; + public long f7800; public long f7801; public long f7802; public long f7803; + public long f7804; public long f7805; public long f7806; public long f7807; + public long f7808; public long f7809; public long f7810; public long f7811; + public long f7812; public long f7813; public long f7814; public long f7815; + public long f7816; public long f7817; public long f7818; public long f7819; + public long f7820; public long f7821; public long f7822; public long f7823; + public long f7824; public long f7825; public long f7826; public long f7827; + public long f7828; public long f7829; public long f7830; public long f7831; + public long f7832; public long f7833; public long f7834; public long f7835; + public long f7836; public long f7837; public long f7838; public long f7839; + public long f7840; public long f7841; public long f7842; public long f7843; + public long f7844; public long f7845; public long f7846; public long f7847; + public long f7848; public long f7849; public long f7850; public long f7851; + public long f7852; public long f7853; public long f7854; public long f7855; + public long f7856; public long f7857; public long f7858; public long f7859; + public long f7860; public long f7861; public long f7862; public long f7863; + public long f7864; public long f7865; public long f7866; public long f7867; + public long f7868; public long f7869; public long f7870; public long f7871; + public long f7872; public long f7873; public long f7874; public long f7875; + public long f7876; public long f7877; public long f7878; public long f7879; + public long f7880; public long f7881; public long f7882; public long f7883; + public long f7884; public long f7885; public long f7886; public long f7887; + public long f7888; public long f7889; public long f7890; public long f7891; + public long f7892; public long f7893; public long f7894; public long f7895; + public long f7896; public long f7897; public long f7898; public long f7899; + public long f7900; public long f7901; public long f7902; public long f7903; + public long f7904; public long f7905; public long f7906; public long f7907; + public long f7908; public long f7909; public long f7910; public long f7911; + public long f7912; public long f7913; public long f7914; public long f7915; + public long f7916; public long f7917; public long f7918; public long f7919; + public long f7920; public long f7921; public long f7922; public long f7923; + public long f7924; public long f7925; public long f7926; public long f7927; + public long f7928; public long f7929; public long f7930; public long f7931; + public long f7932; public long f7933; public long f7934; public long f7935; + public long f7936; public long f7937; public long f7938; public long f7939; + public long f7940; public long f7941; public long f7942; public long f7943; + public long f7944; public long f7945; public long f7946; public long f7947; + public long f7948; public long f7949; public long f7950; public long f7951; + public long f7952; public long f7953; public long f7954; public long f7955; + public long f7956; public long f7957; public long f7958; public long f7959; + public long f7960; public long f7961; public long f7962; public long f7963; + public long f7964; public long f7965; public long f7966; public long f7967; + public long f7968; public long f7969; public long f7970; public long f7971; + public long f7972; public long f7973; public long f7974; public long f7975; + public long f7976; public long f7977; public long f7978; public long f7979; + public long f7980; public long f7981; public long f7982; public long f7983; + public long f7984; public long f7985; public long f7986; public long f7987; + public long f7988; public long f7989; public long f7990; public long f7991; + public long f7992; public long f7993; public long f7994; public long f7995; + public long f7996; public long f7997; public long f7998; public long f7999; + public long f8000; public long f8001; public long f8002; public long f8003; + public long f8004; public long f8005; public long f8006; public long f8007; + public long f8008; public long f8009; public long f8010; public long f8011; + public long f8012; public long f8013; public long f8014; public long f8015; + public long f8016; public long f8017; public long f8018; public long f8019; + public long f8020; public long f8021; public long f8022; public long f8023; + public long f8024; public long f8025; public long f8026; public long f8027; + public long f8028; public long f8029; public long f8030; public long f8031; + public long f8032; public long f8033; public long f8034; public long f8035; + public long f8036; public long f8037; public long f8038; public long f8039; + public long f8040; public long f8041; public long f8042; public long f8043; + public long f8044; public long f8045; public long f8046; public long f8047; + public long f8048; public long f8049; public long f8050; public long f8051; + public long f8052; public long f8053; public long f8054; public long f8055; + public long f8056; public long f8057; public long f8058; public long f8059; + public long f8060; public long f8061; public long f8062; public long f8063; + public long f8064; public long f8065; public long f8066; public long f8067; + public long f8068; public long f8069; public long f8070; public long f8071; + public long f8072; public long f8073; public long f8074; public long f8075; + public long f8076; public long f8077; public long f8078; public long f8079; + public long f8080; public long f8081; public long f8082; public long f8083; + public long f8084; public long f8085; public long f8086; public long f8087; + public long f8088; public long f8089; public long f8090; public long f8091; + public long f8092; public long f8093; public long f8094; public long f8095; + public long f8096; public long f8097; public long f8098; public long f8099; + public long f8100; public long f8101; public long f8102; public long f8103; + public long f8104; public long f8105; public long f8106; public long f8107; + public long f8108; public long f8109; public long f8110; public long f8111; + public long f8112; public long f8113; public long f8114; public long f8115; + public long f8116; public long f8117; public long f8118; public long f8119; + public long f8120; public long f8121; public long f8122; public long f8123; + public long f8124; public long f8125; public long f8126; public long f8127; + public long f8128; public long f8129; public long f8130; public long f8131; + public long f8132; public long f8133; public long f8134; public long f8135; + public long f8136; public long f8137; public long f8138; public long f8139; + public long f8140; public long f8141; public long f8142; public long f8143; + public long f8144; public long f8145; public long f8146; public long f8147; + public long f8148; public long f8149; public long f8150; public long f8151; + public long f8152; public long f8153; public long f8154; public long f8155; + public long f8156; public long f8157; public long f8158; public long f8159; + public long f8160; public long f8161; public long f8162; public long f8163; + public long f8164; public long f8165; public long f8166; public long f8167; + public long f8168; public long f8169; public long f8170; public long f8171; + public long f8172; public long f8173; public long f8174; public long f8175; + public long f8176; public long f8177; public long f8178; public long f8179; + public long f8180; public long f8181; public long f8182; public long f8183; + public long f8184; public long f8185; public long f8186; public long f8187; + public long f8188; public long f8189; public long f8190; public long f8191; + public long f8192; public long f8193; public long f8194; public long f8195; + public long f8196; public long f8197; public long f8198; public long f8199; + public long f8200; + + public static void printV(PR26858 o) + { + System.out.println(o.f8200); + } + + public static void main(String args[]) + { + PR26858 x = new PR26858(); + + try + { + printV(x); + printV(null); + System.out.println("bad"); + } + catch (Exception e) + { + System.out.println("ok"); + } + } +} diff --git a/libjava/testsuite/libjava.lang/PR26858.out b/libjava/testsuite/libjava.lang/PR26858.out new file mode 100644 index 000000000..17cb597de --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR26858.out @@ -0,0 +1,2 @@ +0 +ok diff --git a/libjava/testsuite/libjava.lang/PR27908.jar b/libjava/testsuite/libjava.lang/PR27908.jar Binary files differnew file mode 100644 index 000000000..1ec1127dd --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR27908.jar diff --git a/libjava/testsuite/libjava.lang/PR27908.java b/libjava/testsuite/libjava.lang/PR27908.java new file mode 100644 index 000000000..addb1d772 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR27908.java @@ -0,0 +1,103 @@ +class PR27908 +{ + public static void main (String[] argv) + throws InterruptedException + { + run1 r1 = new run1(); + run2 r2 = new run2(); + run3 r3 = new run3(); + + Thread t1, t2, t3; + + (t1 = new Thread (r1)).start(); + (t2 = new Thread (r2)).start(); + (t3 = new Thread (r3)).start(); + + while (! (r1.isRunning() && r2.isRunning() && r3.isRunning())) + Thread.yield(); + + r1.stop(); + r2.stop(); + r3.stop(); + + Thread.sleep(5000); + + if (t1.isAlive() || t2.isAlive() || t3.isAlive()) + { + System.out.println ("fail"); + System.exit(1); + } + } + + private static class run1 implements Runnable + { + volatile int counter; + volatile boolean running; + + public void run () + { + counter = 0; + running = true; + while (running) + counter++; + } + + void stop () + { + running = false; + } + + public boolean isRunning() + { + return running; + } + } + + private static class run2 implements Runnable + { + volatile int counter; + boolean running; + + public void run () + { + counter = 0; + running = true; + while (running) + counter++; + } + + void stop () + { + running = false; + } + + public boolean isRunning() + { + return running; + } + } + + static class run3 implements Runnable + { + volatile int counter; + private volatile boolean running; + + public void run () + { + counter = 0; + running = true; + while (running) + counter++; + } + + void stop () + { + running = false; + } + + public boolean isRunning() + { + return running; + } + } +} diff --git a/libjava/testsuite/libjava.lang/PR27908.out b/libjava/testsuite/libjava.lang/PR27908.out new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR27908.out diff --git a/libjava/testsuite/libjava.lang/PR29013.jar b/libjava/testsuite/libjava.lang/PR29013.jar Binary files differnew file mode 100644 index 000000000..198ac6e2e --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR29013.jar diff --git a/libjava/testsuite/libjava.lang/PR29013.java b/libjava/testsuite/libjava.lang/PR29013.java new file mode 100644 index 000000000..942ba97bb --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR29013.java @@ -0,0 +1,9 @@ +public class PR29013 { + public static int result() { return 5; } + + public static void computeResult() { result(); } + + public static void main(String[] args) { + computeResult(); + } +} diff --git a/libjava/testsuite/libjava.lang/PR29013.out b/libjava/testsuite/libjava.lang/PR29013.out new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR29013.out diff --git a/libjava/testsuite/libjava.lang/PR29495.jar b/libjava/testsuite/libjava.lang/PR29495.jar Binary files differnew file mode 100644 index 000000000..6e03871c6 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR29495.jar diff --git a/libjava/testsuite/libjava.lang/PR29495.java b/libjava/testsuite/libjava.lang/PR29495.java new file mode 100644 index 000000000..7df00e80d --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR29495.java @@ -0,0 +1,56 @@ +// Test various reflection methods. + +import java.lang.annotation.Inherited; +import java.lang.reflect.Method; +import java.lang.reflect.Field; + +public class PR29495 +{ + public class container<T> + { + // This class has a synthetic field... + + public T get(T v) { return v; } + } + + public class concrete extends container<String> + { + // This makes us have a synthetic bridge method. + public String get(String v) { return "hi" + v; } + } + + // varargs method + public static void va(Object... args) + { + } + + public static void check(boolean x, String m) + { + if (! x) + System.out.println("fail: " + m); + } + + public static void main(String[] args) throws Throwable + { + check (Inherited.class.isAnnotation(), "Inherited isAnnotation"); + + Method m = PR29495.class.getDeclaredMethod("va", new Class[] { Object[].class }); + check (m.isVarArgs(), "va isVarArgs"); + + m = concrete.class.getDeclaredMethod("get", new Class[] { Object.class }); + check (m.isSynthetic(), "get isSynthetic"); + check (m.isBridge(), "get isBridge"); + + Field[] fs = container.class.getDeclaredFields(); + boolean ok = false; + for (int i = 0; i < fs.length; ++i) + { + if (fs[i].isSynthetic()) + { + ok = true; + break; + } + } + check (ok, "container has synthetic field"); + } +} diff --git a/libjava/testsuite/libjava.lang/PR29495.out b/libjava/testsuite/libjava.lang/PR29495.out new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR29495.out diff --git a/libjava/testsuite/libjava.lang/PR3096.jar b/libjava/testsuite/libjava.lang/PR3096.jar Binary files differnew file mode 100644 index 000000000..4ed8f4ab6 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR3096.jar diff --git a/libjava/testsuite/libjava.lang/PR3096.java b/libjava/testsuite/libjava.lang/PR3096.java new file mode 100644 index 000000000..d5407ff1e --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR3096.java @@ -0,0 +1,36 @@ +// This test case was built for java/3096. + +class PR3096 +{ + static void foo (int x[], int i) { + ++x[i]; + } + static void foo (float x[], int i) { + ++x[i]; + } + public static void main(String [] args) { + int a[] = new int [1]; + float f[] = new float [1]; + int b[]; + int i = 0; + foo (a,0); + foo (f,0); + System.out.println (a[0]); + System.out.println (f[0]); + System.out.println ((b=a)[0]); + (b=a)[i]=99; + b[0]++; + System.out.println (a[0]+", "+b[0]); + System.out.println (++a[i]); + System.out.println (a[i]); + System.out.println (a[i]++); + System.out.println (a[i]); + String s[] = new String [1]; + String y[]; + s[0]=""; + s[0] += "Peace "; + System.out.println (s[0]); + (y=s)[0] += "now!"; + System.out.println (s[0]+", "+y[0]); + } +} diff --git a/libjava/testsuite/libjava.lang/PR3096.out b/libjava/testsuite/libjava.lang/PR3096.out new file mode 100644 index 000000000..1b197cbda --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR3096.out @@ -0,0 +1,10 @@ +1 +1.0 +1 +100, 100 +101 +101 +101 +102 +Peace +Peace now!, Peace now! diff --git a/libjava/testsuite/libjava.lang/PR31264.jar b/libjava/testsuite/libjava.lang/PR31264.jar Binary files differnew file mode 100644 index 000000000..26731c83b --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR31264.jar diff --git a/libjava/testsuite/libjava.lang/PR31264.java b/libjava/testsuite/libjava.lang/PR31264.java new file mode 100644 index 000000000..5c0e85f01 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR31264.java @@ -0,0 +1,28 @@ +/* + * Javolution - Java(TM) Solution for Real-Time and Embedded Systems + * Copyright (C) 2006 - Javolution (http://javolution.org/) + * All rights reserved. + * + * Permission to use, copy, modify, and distribute this software is + * freely granted, provided that this notice is preserved. + */ + +public final class PR31264 +{ + public static long fubar(double d, int n) + { + long bits = Double.doubleToRawLongBits(d); + int exp = ((int)(bits >> 52)) & 0x7FF; + long m = bits & 0x000fffffffffffffL; + if (exp == 0) + { + if (m == 0) return 0L; + return fubar(d * 18014398509481984L, n - 54); // 2^54 Exact. + } + return m; + } + + public static void main(String[] argv) + { + } +} diff --git a/libjava/testsuite/libjava.lang/PR31264.out b/libjava/testsuite/libjava.lang/PR31264.out new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR31264.out diff --git a/libjava/testsuite/libjava.lang/PR35020.jar b/libjava/testsuite/libjava.lang/PR35020.jar Binary files differnew file mode 100644 index 000000000..09c4ef481 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR35020.jar diff --git a/libjava/testsuite/libjava.lang/PR35020.java b/libjava/testsuite/libjava.lang/PR35020.java new file mode 100644 index 000000000..ff5f6bf06 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR35020.java @@ -0,0 +1,30 @@ +class outer$inner +{ +}; + +public class PR35020 +{ + class PR35020$Inner + { + }; + class inner + { + } + public static void main(String[] args) + { + System.out.println(inner.class.getSimpleName()); + System.out.println(PR35020.class.getSimpleName()); + System.out.println(Class.class.getSimpleName()); + System.out.println((new int[7]).getClass().getSimpleName()); + System.out.println((new Object[1][1][1][1][1][1][1][1]).getClass().getSimpleName()); + System.out.println((new java.security.PrivilegedAction() + { + public Object run() { + return null; + } + }).getClass().getSimpleName()); + System.out.println(PR35020$Inner.class.getSimpleName()); + System.out.println(outer$inner.class.getSimpleName()); + System.out.println(outer$inner.inner.class.getSimpleName()); + } +} diff --git a/libjava/testsuite/libjava.lang/PR35020.out b/libjava/testsuite/libjava.lang/PR35020.out new file mode 100644 index 000000000..9bf85e209 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR35020.out @@ -0,0 +1,9 @@ +inner +PR35020 +Class +int[] +Object[][][][][][][][] + +PR35020$Inner +outer$inner +inner diff --git a/libjava/testsuite/libjava.lang/PR36252.jar b/libjava/testsuite/libjava.lang/PR36252.jar Binary files differnew file mode 100644 index 000000000..2c0d2c0e9 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR36252.jar diff --git a/libjava/testsuite/libjava.lang/PR36252.java b/libjava/testsuite/libjava.lang/PR36252.java new file mode 100644 index 000000000..4f39a678b --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR36252.java @@ -0,0 +1,16 @@ +import java.io.UnsupportedEncodingException; + +public class PR36252 +{ + public static void main(String[] args) + { + try { + byte[] txt = new byte[] {-55, 87, -55, -42, -55, -20}; + // This new String(...) should not throw an OutOfMemoryError. + String s = new String(txt, 0, 6, "MS932"); + } catch (UnsupportedEncodingException e) { + // Silently ignore. + } + System.out.println("ok"); + } +} diff --git a/libjava/testsuite/libjava.lang/PR36252.out b/libjava/testsuite/libjava.lang/PR36252.out new file mode 100644 index 000000000..9766475a4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR36252.out @@ -0,0 +1 @@ +ok diff --git a/libjava/testsuite/libjava.lang/PR3731.jar b/libjava/testsuite/libjava.lang/PR3731.jar Binary files differnew file mode 100644 index 000000000..7473cb4bd --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR3731.jar diff --git a/libjava/testsuite/libjava.lang/PR3731.java b/libjava/testsuite/libjava.lang/PR3731.java new file mode 100644 index 000000000..8e974ccca --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR3731.java @@ -0,0 +1,14 @@ +// Check whether "instanceof" initializes its class argument. + +public class PR3731 { + static B b; + public static void main(String[] args) { + System.out.println(b instanceof B); + } +} + +class B { + static { + System.out.println("Initialized"); + } +} diff --git a/libjava/testsuite/libjava.lang/PR3731.out b/libjava/testsuite/libjava.lang/PR3731.out new file mode 100644 index 000000000..c508d5366 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR3731.out @@ -0,0 +1 @@ +false diff --git a/libjava/testsuite/libjava.lang/PR5057.jar b/libjava/testsuite/libjava.lang/PR5057.jar Binary files differnew file mode 100644 index 000000000..ac7ac9570 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR5057.jar diff --git a/libjava/testsuite/libjava.lang/PR5057.java b/libjava/testsuite/libjava.lang/PR5057.java new file mode 100644 index 000000000..590ffdfa0 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR5057.java @@ -0,0 +1,16 @@ +/* Test to make sure <clinit> is generated correctly. */ + +public class PR5057 +{ + public static int x; + + static + { + x = 72; + } + + public static void main (String[] args) + { + System.out.println (x); + } +} diff --git a/libjava/testsuite/libjava.lang/PR5057.out b/libjava/testsuite/libjava.lang/PR5057.out new file mode 100644 index 000000000..ea70ce013 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR5057.out @@ -0,0 +1 @@ +72 diff --git a/libjava/testsuite/libjava.lang/PR5057_2.jar b/libjava/testsuite/libjava.lang/PR5057_2.jar Binary files differnew file mode 100644 index 000000000..b0accb747 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR5057_2.jar diff --git a/libjava/testsuite/libjava.lang/PR5057_2.java b/libjava/testsuite/libjava.lang/PR5057_2.java new file mode 100644 index 000000000..8e789ff34 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR5057_2.java @@ -0,0 +1,19 @@ +/* Test to make sure <clinit> is generated correctly. */ + +class R +{ + public static int z = 23; +} + +public class PR5057_2 extends R +{ + static + { + R.z = 72; + } + + public static void main (String[] args) + { + System.out.println (R.z); + } +} diff --git a/libjava/testsuite/libjava.lang/PR5057_2.out b/libjava/testsuite/libjava.lang/PR5057_2.out new file mode 100644 index 000000000..ea70ce013 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR5057_2.out @@ -0,0 +1 @@ +72 diff --git a/libjava/testsuite/libjava.lang/PR55.jar b/libjava/testsuite/libjava.lang/PR55.jar Binary files differnew file mode 100644 index 000000000..a5cb7d61e --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR55.jar diff --git a/libjava/testsuite/libjava.lang/PR55.java b/libjava/testsuite/libjava.lang/PR55.java new file mode 100644 index 000000000..66619bf2c --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR55.java @@ -0,0 +1,9 @@ +public class PR55 { + + // This demonstrates a bug in gcj + + public static void main(String[] argv){ + int i = 666; + System.out.println("The number "+i+" is "+ (""+i).length() +" digits wide"); + } +} diff --git a/libjava/testsuite/libjava.lang/PR55.out b/libjava/testsuite/libjava.lang/PR55.out new file mode 100644 index 000000000..510a24206 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR55.out @@ -0,0 +1 @@ +The number 666 is 3 digits wide diff --git a/libjava/testsuite/libjava.lang/PR56.jar b/libjava/testsuite/libjava.lang/PR56.jar Binary files differnew file mode 100644 index 000000000..20f87b596 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR56.jar diff --git a/libjava/testsuite/libjava.lang/PR56.java b/libjava/testsuite/libjava.lang/PR56.java new file mode 100644 index 000000000..27f7c3021 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR56.java @@ -0,0 +1,8 @@ +public final class PR56 { + public static void main(String[] args) { + Object o = args; + int[] a; + if (!(o instanceof int[]) || (a = (int[])o).length != 2) { + } + } +} diff --git a/libjava/testsuite/libjava.lang/PR56.out b/libjava/testsuite/libjava.lang/PR56.out new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR56.out diff --git a/libjava/testsuite/libjava.lang/PR6085.jar b/libjava/testsuite/libjava.lang/PR6085.jar Binary files differnew file mode 100644 index 000000000..ec7066085 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR6085.jar diff --git a/libjava/testsuite/libjava.lang/PR6085.java b/libjava/testsuite/libjava.lang/PR6085.java new file mode 100644 index 000000000..f883bb5f8 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR6085.java @@ -0,0 +1,35 @@ +public class PR6085 +{ + public static void main(String[] args) + { + F1 f1 = new F1(); + } + + static class F1 + { + F11 f11; + F12 f12; + + F1() + { + f12 = new F12(); + System.out.println (f12.i); + System.out.println (f12.k); + } + + class F11 + { + int k = 90; + F11() {} + } + + class F12 extends F11 + { + int i; + F12() + { + i = 17; + } + } + } +} diff --git a/libjava/testsuite/libjava.lang/PR6085.out b/libjava/testsuite/libjava.lang/PR6085.out new file mode 100644 index 000000000..812f0e716 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR6085.out @@ -0,0 +1,2 @@ +17 +90 diff --git a/libjava/testsuite/libjava.lang/PR6204.jar b/libjava/testsuite/libjava.lang/PR6204.jar Binary files differnew file mode 100644 index 000000000..704de3a06 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR6204.jar diff --git a/libjava/testsuite/libjava.lang/PR6204.java b/libjava/testsuite/libjava.lang/PR6204.java new file mode 100644 index 000000000..06eb43d33 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR6204.java @@ -0,0 +1,38 @@ +class X +{ + public Y getY() + { + return new Y(1); + } +} + +class Y extends X +{ + int i; + + Y(int i) + { + this.i = i; + } + + public Y getY() + { + return new Y(2); + } +} + +class A +{ + X x = new Y(-1); + public X getX() { return x; } +} + +public class PR6204 extends A +{ + public Y getY() { return super.getX().getY(); } + + public static void main(String[] args) + { + System.out.println (new PR6204().getY().i); + } +} diff --git a/libjava/testsuite/libjava.lang/PR6204.out b/libjava/testsuite/libjava.lang/PR6204.out new file mode 100644 index 000000000..0cfbf0888 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR6204.out @@ -0,0 +1 @@ +2 diff --git a/libjava/testsuite/libjava.lang/PR6520.jar b/libjava/testsuite/libjava.lang/PR6520.jar Binary files differnew file mode 100644 index 000000000..441d1ea50 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR6520.jar diff --git a/libjava/testsuite/libjava.lang/PR6520.java b/libjava/testsuite/libjava.lang/PR6520.java new file mode 100644 index 000000000..617c6b2f1 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR6520.java @@ -0,0 +1,13 @@ +public class PR6520 +{ + public static void check (double x, double y) + { + System.out.println (x == y); + } + + public static void main(String[] args) + { + check (Math.min (2.0f, Float.NaN), Float.NaN); + } + } + diff --git a/libjava/testsuite/libjava.lang/PR6729.jar b/libjava/testsuite/libjava.lang/PR6729.jar Binary files differnew file mode 100644 index 000000000..7e63700af --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR6729.jar diff --git a/libjava/testsuite/libjava.lang/PR6729.java b/libjava/testsuite/libjava.lang/PR6729.java new file mode 100644 index 000000000..58dac182d --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR6729.java @@ -0,0 +1,13 @@ +public class PR6729 +{ + static int attr = 0x9; + + public static void main(String [] args) { + boolean res = ( ( 1 << attr ) & 0x1000 ) != 0 ; + System.out.println("this should be "+res+": "+isWhite()); + } + + public static boolean isWhite() { + return ( ( 1 << attr ) & 0x1000 ) != 0 ; + } +} diff --git a/libjava/testsuite/libjava.lang/PR6729.out b/libjava/testsuite/libjava.lang/PR6729.out new file mode 100644 index 000000000..a2248e204 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR6729.out @@ -0,0 +1 @@ +this should be false: false diff --git a/libjava/testsuite/libjava.lang/PR6820.jar b/libjava/testsuite/libjava.lang/PR6820.jar Binary files differnew file mode 100644 index 000000000..ba5d3e1f4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR6820.jar diff --git a/libjava/testsuite/libjava.lang/PR6820.java b/libjava/testsuite/libjava.lang/PR6820.java new file mode 100644 index 000000000..c505eb2f0 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR6820.java @@ -0,0 +1,15 @@ +public class PR6820 +{ + static void m(int a, int b) { + System.out.println("a="+a+" b="+b); + } + + static int a = 10; + + public static void main(String[] args) { + int b = 10; + m(a,++a); + m(b,++b); + } +} + diff --git a/libjava/testsuite/libjava.lang/PR6820.out b/libjava/testsuite/libjava.lang/PR6820.out new file mode 100644 index 000000000..836bd5c28 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR6820.out @@ -0,0 +1,2 @@ +a=10 b=11 +a=10 b=11 diff --git a/libjava/testsuite/libjava.lang/PR7482.jar b/libjava/testsuite/libjava.lang/PR7482.jar Binary files differnew file mode 100644 index 000000000..f03520219 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR7482.jar diff --git a/libjava/testsuite/libjava.lang/PR7482.java b/libjava/testsuite/libjava.lang/PR7482.java new file mode 100644 index 000000000..223fea66e --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR7482.java @@ -0,0 +1,35 @@ +public class PR7482 +{ + private interface I { } + private static class B { } + private static class U extends B implements I { } + private static class V extends B implements I { } + + static I field; + + private static void g1(Object o) + { + I val; + if (o == null) + val = new U(); + else + val = new V(); + field = val; + } + + private static I g2(Object o) + { + I val; + if (o == null) + val = new U(); + else + val = new V(); + return val; + } + + public static void main(String[] args) + { + g1(null); + g2(null); + } +} diff --git a/libjava/testsuite/libjava.lang/PR7482.out b/libjava/testsuite/libjava.lang/PR7482.out new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR7482.out diff --git a/libjava/testsuite/libjava.lang/PR8866.jar b/libjava/testsuite/libjava.lang/PR8866.jar Binary files differnew file mode 100644 index 000000000..2bc6d5866 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR8866.jar diff --git a/libjava/testsuite/libjava.lang/PR8866.java b/libjava/testsuite/libjava.lang/PR8866.java new file mode 100644 index 000000000..fa6206674 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR8866.java @@ -0,0 +1,22 @@ +public class PR8866 +{ + public static void main (String args[]) + { + String attTypeString = ""; + + switch (args.length) { + case 1: + attTypeString = "string"; + case 4: + attTypeString = "ID";; + case 5: + attTypeString = "IDREF";; + case 6: + attTypeString = "NMTOKEN";; + case 7: + attTypeString = "NOTATION";; + default: + ; + } + } +} diff --git a/libjava/testsuite/libjava.lang/Process_1.jar b/libjava/testsuite/libjava.lang/Process_1.jar Binary files differnew file mode 100644 index 000000000..8499991d7 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Process_1.jar diff --git a/libjava/testsuite/libjava.lang/Process_1.java b/libjava/testsuite/libjava.lang/Process_1.java new file mode 100644 index 000000000..adc635466 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Process_1.java @@ -0,0 +1,41 @@ +// Create a process and read from its standard output. +// +import java.io.BufferedReader; +import java.io.InputStream; +import java.io.InputStreamReader; + + +public class Process_1 +{ + public static void main(String[] args) + { + try + { + Runtime r = Runtime.getRuntime(); + String s = "Hello World"; + String[] a = { "echo", s }; + Process p = r.exec(a); + InputStream is = p.getInputStream(); + InputStreamReader isr = new InputStreamReader(is); + BufferedReader br = new BufferedReader(isr); + String result = br.readLine(); + if (! s.equals(result)) + { + System.out.println("bad 1"); + return; + } + result = br.readLine(); + if (result != null) + { + System.out.println("bad 2"); + return; + } + int c = p.waitFor(); + System.out.println(c == 0 ? "ok" : "bad 3"); + } + catch (Exception ex) + { + System.out.println(ex.toString()); + } + } +} diff --git a/libjava/testsuite/libjava.lang/Process_1.out b/libjava/testsuite/libjava.lang/Process_1.out new file mode 100644 index 000000000..9766475a4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Process_1.out @@ -0,0 +1 @@ +ok diff --git a/libjava/testsuite/libjava.lang/Process_2.jar b/libjava/testsuite/libjava.lang/Process_2.jar Binary files differnew file mode 100644 index 000000000..2b26bff2d --- /dev/null +++ b/libjava/testsuite/libjava.lang/Process_2.jar diff --git a/libjava/testsuite/libjava.lang/Process_2.java b/libjava/testsuite/libjava.lang/Process_2.java new file mode 100644 index 000000000..d90e653a4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Process_2.java @@ -0,0 +1,40 @@ +// Create a process and read from its standard error. +import java.io.BufferedReader; +import java.io.InputStream; +import java.io.InputStreamReader; + + +public class Process_2 +{ + public static void main(String[] args) + { + try + { + Runtime r = Runtime.getRuntime(); + String s = "Hello World"; + String[] a = { "sh", "-c", "echo " + s + " >&2" }; + Process p = r.exec(a); + InputStream is = p.getErrorStream(); + InputStreamReader isr = new InputStreamReader(is); + BufferedReader br = new BufferedReader(isr); + String result = br.readLine(); + if (! s.equals(result)) + { + System.out.println("bad 1"); + return; + } + result = br.readLine(); + if (result != null) + { + System.out.println("bad 2"); + return; + } + int c = p.waitFor(); + System.out.println(c == 0 ? "ok" : "bad 3"); + } + catch (Exception ex) + { + System.out.println(ex.toString()); + } + } +} diff --git a/libjava/testsuite/libjava.lang/Process_2.out b/libjava/testsuite/libjava.lang/Process_2.out new file mode 100644 index 000000000..9766475a4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Process_2.out @@ -0,0 +1 @@ +ok diff --git a/libjava/testsuite/libjava.lang/Process_3.jar b/libjava/testsuite/libjava.lang/Process_3.jar Binary files differnew file mode 100644 index 000000000..620a644e7 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Process_3.jar diff --git a/libjava/testsuite/libjava.lang/Process_3.java b/libjava/testsuite/libjava.lang/Process_3.java new file mode 100644 index 000000000..ebde9f8d8 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Process_3.java @@ -0,0 +1,73 @@ +// Create a process and pipe data through it. waitFor() the process +// in a different thread than the one that created it. +import java.io.BufferedReader; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.OutputStream; +import java.io.PrintStream; + + +public class Process_3 implements Runnable +{ + Process p; + + public void run() + { + try + { + Runtime r = Runtime.getRuntime(); + String[] a = { "sed", "-e", "s/Hello/Goodbye/" }; + synchronized (this) + { + p = r.exec(a); + this.notifyAll(); + } + OutputStream os = p.getOutputStream(); + PrintStream ps = new PrintStream(os); + ps.println("Hello World"); + ps.close(); + } + catch (Exception ex) + { + System.out.println(ex.toString()); + System.exit(1); + } + } + + public static void main(String[] args) + { + try + { + Process_3 p3 = new Process_3(); + Thread t = new Thread(p3); + t.start(); + synchronized (p3) + { + while (p3.p == null) + p3.wait(); + } + + InputStream is = p3.p.getInputStream(); + InputStreamReader isr = new InputStreamReader(is); + BufferedReader br = new BufferedReader(isr); + String result = br.readLine(); + if (! "Goodbye World".equals(result)) + { + System.out.println("bad 1"); + return; + } + result = br.readLine(); + if (result != null) + { + System.out.println("bad 2"); + return; + } + int c = p3.p.waitFor(); + System.out.println(c == 0 ? "ok" : "bad 3"); + } + catch (Exception ex) + { + System.out.println(ex.toString()); + } + } +} diff --git a/libjava/testsuite/libjava.lang/Process_3.out b/libjava/testsuite/libjava.lang/Process_3.out new file mode 100644 index 000000000..9766475a4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Process_3.out @@ -0,0 +1 @@ +ok diff --git a/libjava/testsuite/libjava.lang/Process_4.jar b/libjava/testsuite/libjava.lang/Process_4.jar Binary files differnew file mode 100644 index 000000000..2014ad040 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Process_4.jar diff --git a/libjava/testsuite/libjava.lang/Process_4.java b/libjava/testsuite/libjava.lang/Process_4.java new file mode 100644 index 000000000..1511a74a6 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Process_4.java @@ -0,0 +1,20 @@ +// Create a process and verify failure exit code. +public class Process_4 +{ + public static void main(String[] args) + { + try + { + Runtime r = Runtime.getRuntime(); + String[] a = { "false" }; + Process p = r.exec(a); + int c = p.waitFor(); + // Solaris' false doesn't return 1. + System.out.println(c != 0 ? "ok" : "bad"); + } + catch (Exception ex) + { + System.out.println(ex.toString()); + } + } +} diff --git a/libjava/testsuite/libjava.lang/Process_4.out b/libjava/testsuite/libjava.lang/Process_4.out new file mode 100644 index 000000000..9766475a4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Process_4.out @@ -0,0 +1 @@ +ok diff --git a/libjava/testsuite/libjava.lang/Process_5.jar b/libjava/testsuite/libjava.lang/Process_5.jar Binary files differnew file mode 100644 index 000000000..1046430dd --- /dev/null +++ b/libjava/testsuite/libjava.lang/Process_5.jar diff --git a/libjava/testsuite/libjava.lang/Process_5.java b/libjava/testsuite/libjava.lang/Process_5.java new file mode 100644 index 000000000..61fd5b740 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Process_5.java @@ -0,0 +1,43 @@ +// Create a long running process and verify that the exitValue is not +// immediately available. Then destroy() it and verify that it +// terminates quickly with a non-zero exitValue. +public class Process_5 +{ + public static void main(String[] args) + { + try + { + int c; + long startTime = System.currentTimeMillis(); + Runtime r = Runtime.getRuntime(); + String[] a = { "sleep", "120" }; + Process p = r.exec(a); + + try + { + c = p.exitValue(); + System.out.println("bad 1"); + return; + } + catch (IllegalThreadStateException itse) + { + // Ignore as this is good here. + } + + p.destroy(); + + c = p.waitFor(); + + long endTime = System.currentTimeMillis(); + + if (endTime - startTime > 110000L) + System.out.println("bad 2"); + + System.out.println(c != 0 ? "ok" : "bad 3"); + } + catch (Exception ex) + { + System.out.println(ex.toString()); + } + } +} diff --git a/libjava/testsuite/libjava.lang/Process_5.out b/libjava/testsuite/libjava.lang/Process_5.out new file mode 100644 index 000000000..9766475a4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Process_5.out @@ -0,0 +1 @@ +ok diff --git a/libjava/testsuite/libjava.lang/Process_6.jar b/libjava/testsuite/libjava.lang/Process_6.jar Binary files differnew file mode 100644 index 000000000..a1a35005d --- /dev/null +++ b/libjava/testsuite/libjava.lang/Process_6.jar diff --git a/libjava/testsuite/libjava.lang/Process_6.java b/libjava/testsuite/libjava.lang/Process_6.java new file mode 100644 index 000000000..3bf015f76 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Process_6.java @@ -0,0 +1,31 @@ +// Create a running process for a non existent executable. +// Verify that IOException is thrown. +import java.io.IOException; + + +public class Process_6 +{ + public static void main(String[] args) + { + try + { + int c; + Runtime r = Runtime.getRuntime(); + String[] a = { "blablabla_failure" }; + + try + { + Process p = r.exec(a); + System.out.println("bad"); + } + catch (IOException ioe) + { + System.out.println("ok"); + } + } + catch (Exception ex) + { + System.out.println(ex.toString()); + } + } +} diff --git a/libjava/testsuite/libjava.lang/Process_6.out b/libjava/testsuite/libjava.lang/Process_6.out new file mode 100644 index 000000000..9766475a4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Process_6.out @@ -0,0 +1 @@ +ok diff --git a/libjava/testsuite/libjava.lang/Process_7.jar b/libjava/testsuite/libjava.lang/Process_7.jar Binary files differnew file mode 100644 index 000000000..261578e8a --- /dev/null +++ b/libjava/testsuite/libjava.lang/Process_7.jar diff --git a/libjava/testsuite/libjava.lang/Process_7.java b/libjava/testsuite/libjava.lang/Process_7.java new file mode 100644 index 000000000..d6f654eb2 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Process_7.java @@ -0,0 +1,45 @@ +// Verify we can modify the environment. +import java.io.BufferedReader; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.util.Map; + + + +public class Process_7 +{ + public static void main(String[] args) + { + try + { + ProcessBuilder pb = new ProcessBuilder("env"); + Map<String, String> e = pb.environment(); + e.clear(); + String v = "process7_value"; + String k = "PROCESS_7_KEY"; + e.put(k, v); + Process p = pb.start(); + InputStream is = p.getInputStream(); + InputStreamReader isr = new InputStreamReader(is); + BufferedReader br = new BufferedReader(isr); + boolean found = false; + + String result; + while ((result = br.readLine()) != null) + { + if (result.equals(k + '=' + v)) + found = true; + } + if (!found) + { + System.out.println("bad"); + return; + } + System.out.println("ok"); + } + catch (Exception ex) + { + System.out.println(ex.toString()); + } + } +} diff --git a/libjava/testsuite/libjava.lang/Process_7.out b/libjava/testsuite/libjava.lang/Process_7.out new file mode 100644 index 000000000..9766475a4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Process_7.out @@ -0,0 +1 @@ +ok diff --git a/libjava/testsuite/libjava.lang/ProxyTest.jar b/libjava/testsuite/libjava.lang/ProxyTest.jar Binary files differnew file mode 100644 index 000000000..509054b97 --- /dev/null +++ b/libjava/testsuite/libjava.lang/ProxyTest.jar diff --git a/libjava/testsuite/libjava.lang/ProxyTest.java b/libjava/testsuite/libjava.lang/ProxyTest.java new file mode 100644 index 000000000..46689b43a --- /dev/null +++ b/libjava/testsuite/libjava.lang/ProxyTest.java @@ -0,0 +1,37 @@ +import java.lang.reflect.*; + +interface Twas +{ + Object brillig(); +} + +interface Slithy +{ + void toves(int gyre); +} + +public class ProxyTest +{ + static class MyInvocationHandler implements InvocationHandler + { + public Object invoke(Object proxy, Method method, Object[] args) + { + System.out.println (method.getDeclaringClass()); + System.out.println (args == null + ? args + : args.getClass().getName()); + return this; + } + } + + public static void main(String[] argv) + throws InstantiationException, IllegalAccessException + { + Twas wabe + = (Twas)Proxy.newProxyInstance(ProxyTest.class.getClassLoader(), + new Class[] { Slithy.class, Twas.class }, + new MyInvocationHandler()); + wabe.brillig(); + ((Slithy)wabe).toves(2); + } +} diff --git a/libjava/testsuite/libjava.lang/ProxyTest.out b/libjava/testsuite/libjava.lang/ProxyTest.out new file mode 100644 index 000000000..e81ce6000 --- /dev/null +++ b/libjava/testsuite/libjava.lang/ProxyTest.out @@ -0,0 +1,4 @@ +interface Twas +null +interface Slithy +[Ljava.lang.Object; diff --git a/libjava/testsuite/libjava.lang/RH194522.jar b/libjava/testsuite/libjava.lang/RH194522.jar Binary files differnew file mode 100644 index 000000000..a7c75a246 --- /dev/null +++ b/libjava/testsuite/libjava.lang/RH194522.jar diff --git a/libjava/testsuite/libjava.lang/RH194522.java b/libjava/testsuite/libjava.lang/RH194522.java new file mode 100644 index 000000000..5ea446cbd --- /dev/null +++ b/libjava/testsuite/libjava.lang/RH194522.java @@ -0,0 +1,18 @@ +// Test case for http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=194522 + +import java.io.*; +import java.nio.charset.Charset; + +public class RH194522 +{ + public static void main(String[] args) throws Exception + { + Charset c = Charset.forName("UTF-8"); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + PrintWriter pw = new PrintWriter(new OutputStreamWriter(baos, c)); + pw.println("hi"); + pw.println("bob"); + pw.flush(); + pw.close(); + } +} diff --git a/libjava/testsuite/libjava.lang/RH194522.out b/libjava/testsuite/libjava.lang/RH194522.out new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/libjava/testsuite/libjava.lang/RH194522.out diff --git a/libjava/testsuite/libjava.lang/Serialization.jar b/libjava/testsuite/libjava.lang/Serialization.jar Binary files differnew file mode 100644 index 000000000..376cb6b46 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Serialization.jar diff --git a/libjava/testsuite/libjava.lang/Serialization.java b/libjava/testsuite/libjava.lang/Serialization.java new file mode 100644 index 000000000..817875331 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Serialization.java @@ -0,0 +1,32 @@ +import java.io.*; +import java.util.*; + +public class Serialization +{ + public static void main(String[] args) + throws IOException, ClassNotFoundException + { + File f = new File("test.ser"); + ObjectOutputStream objStream = + new ObjectOutputStream(new FileOutputStream(f)); + objStream.writeInt(8); + objStream.writeObject(new Integer(99)); + List l = new LinkedList(); + l.add(new Integer(1)); + l.add(new Short((short) 7)); + l.add(new Float(9.95)); + l.add(new Long(-900000000000001l)); + l.add(new Double(-3.14159)); + l.add(new Character('X')); + l.add(new Byte((byte) 'z')); + objStream.writeObject(l); + objStream.close(); + + ObjectInputStream ois = new ObjectInputStream(new FileInputStream(f)); + System.out.println (ois.readInt()); + System.out.println (ois.readObject()); + System.out.println (ois.readObject()); + ois.close(); + f.delete(); + } +} diff --git a/libjava/testsuite/libjava.lang/Serialization.out b/libjava/testsuite/libjava.lang/Serialization.out new file mode 100644 index 000000000..9c4e5d06c --- /dev/null +++ b/libjava/testsuite/libjava.lang/Serialization.out @@ -0,0 +1,3 @@ +8 +99 +[1, 7, 9.95, -900000000000001, -3.14159, X, 122] diff --git a/libjava/testsuite/libjava.lang/Shazam.jar b/libjava/testsuite/libjava.lang/Shazam.jar Binary files differnew file mode 100644 index 000000000..b3257f6f8 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Shazam.jar diff --git a/libjava/testsuite/libjava.lang/Shazam.java b/libjava/testsuite/libjava.lang/Shazam.java new file mode 100644 index 000000000..d3defc065 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Shazam.java @@ -0,0 +1,18 @@ +import java.io.*; + +public class Shazam { + + private static String shazam () + { + try { + return "shazam"; + } finally { + System.out.println ("The next line should say \"shazam\""); + } + } + + public static void main (String[] args) + { + System.out.println (shazam ()); + } +} diff --git a/libjava/testsuite/libjava.lang/Shazam.out b/libjava/testsuite/libjava.lang/Shazam.out new file mode 100644 index 000000000..42cc30d72 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Shazam.out @@ -0,0 +1,2 @@ +The next line should say "shazam" +shazam diff --git a/libjava/testsuite/libjava.lang/StackTrace2.jar b/libjava/testsuite/libjava.lang/StackTrace2.jar Binary files differnew file mode 100644 index 000000000..0aacb8fa6 --- /dev/null +++ b/libjava/testsuite/libjava.lang/StackTrace2.jar diff --git a/libjava/testsuite/libjava.lang/StackTrace2.java b/libjava/testsuite/libjava.lang/StackTrace2.java new file mode 100644 index 000000000..01c7d5bac --- /dev/null +++ b/libjava/testsuite/libjava.lang/StackTrace2.java @@ -0,0 +1,77 @@ +// Check that stack trace's work, and stack trace line numbers, if available, +// are correct. + +public class StackTrace2 +{ + public static void main(String[] args) + { + try + { + new StackTrace2().a(); + } + catch (Exception x) + { + StackTraceElement[] trace = x.getStackTrace(); + checkTrace(trace); + } + } + + void a() + { + new Inner().foo(); + } + + class Inner + { + public void foo() + { + doCrash(null); + } + + public void doCrash(Object o) + { + o.toString(); + } + } + + static void checkTrace(StackTraceElement[] trace) + { + System.out.println("Trace length = " + trace.length); + checkLine(trace[0], "StackTrace2$Inner", "doCrash", 33); + checkLine(trace[1], "StackTrace2$Inner", "foo", 28); + checkLine(trace[2], "StackTrace2", "a", 21); + checkLine(trace[3], "StackTrace2", "main", 10); + } + + static void checkLine(StackTraceElement frame, String expected_cl, + String expected_method, int expected_line) + { + if (frame.getClassName().equals(expected_cl)) + System.out.print(expected_cl); + else + System.out.print("FAIL - expected " + expected_cl + ", got: " + + frame.getClassName()); + + System.out.print("."); + + if (frame.getMethodName().equals(expected_method)) + System.out.print(expected_method); + else + System.out.print("FAIL - expected " + expected_method + ", got: " + + frame.getMethodName()); + + System.out.print(":"); + + // Permit either the correct line number or no line number. This is so + // we don't fail on platforms that don't yet support reading debug info + // for stack traces, or when no debug info is available. + if (frame.getLineNumber() < 0 + || (frame.getLineNumber() == expected_line + && frame.getFileName().equals("StackTrace2.java"))) + System.out.println("OK"); + else + System.out.println("FAIL - expected " + expected_line + ", got: " + + frame.getLineNumber() + ", in file " + + frame.getFileName()); + } +} diff --git a/libjava/testsuite/libjava.lang/StackTrace2.out b/libjava/testsuite/libjava.lang/StackTrace2.out new file mode 100644 index 000000000..dafadce81 --- /dev/null +++ b/libjava/testsuite/libjava.lang/StackTrace2.out @@ -0,0 +1,5 @@ +Trace length = 4 +StackTrace2$Inner.doCrash:OK +StackTrace2$Inner.foo:OK +StackTrace2.a:OK +StackTrace2.main:OK diff --git a/libjava/testsuite/libjava.lang/StaticConstructor.jar b/libjava/testsuite/libjava.lang/StaticConstructor.jar Binary files differnew file mode 100644 index 000000000..0f4ff4c79 --- /dev/null +++ b/libjava/testsuite/libjava.lang/StaticConstructor.jar diff --git a/libjava/testsuite/libjava.lang/StaticConstructor.java b/libjava/testsuite/libjava.lang/StaticConstructor.java new file mode 100644 index 000000000..54c0f5376 --- /dev/null +++ b/libjava/testsuite/libjava.lang/StaticConstructor.java @@ -0,0 +1,29 @@ +// Test to make sure static initializers are called + +class bar +{ + public static int zog; + public static int zag; + + static + { + zog = 12; + zag = 2; + } + + public bar() { } +} + +public class StaticConstructor +{ + static int foo () + { + return new bar().zog; + } + + public static void main(String args[]) + { + System.out.println ("" + (foo() + bar.zag)); + } +} + diff --git a/libjava/testsuite/libjava.lang/StaticConstructor.out b/libjava/testsuite/libjava.lang/StaticConstructor.out new file mode 100644 index 000000000..8351c1939 --- /dev/null +++ b/libjava/testsuite/libjava.lang/StaticConstructor.out @@ -0,0 +1 @@ +14 diff --git a/libjava/testsuite/libjava.lang/StringBuffer_1.jar b/libjava/testsuite/libjava.lang/StringBuffer_1.jar Binary files differnew file mode 100644 index 000000000..fd406afbc --- /dev/null +++ b/libjava/testsuite/libjava.lang/StringBuffer_1.jar diff --git a/libjava/testsuite/libjava.lang/StringBuffer_1.java b/libjava/testsuite/libjava.lang/StringBuffer_1.java new file mode 100644 index 000000000..142912259 --- /dev/null +++ b/libjava/testsuite/libjava.lang/StringBuffer_1.java @@ -0,0 +1,124 @@ +// Test StringBuffer.replace(), reverse(), insert(String), append(String), +// and delete(). + +public class StringBuffer_1 +{ + public static void main(String args[]) + { + StringBuffer sb = new StringBuffer("45"); + sb.insert(0, "123"); + sb.append("89"); + sb.insert(5, "6"); + sb.insert(6, '7'); + System.out.println (sb); + + sb.delete (3, 99); + + String foo = sb.toString(); + + System.out.println (foo); + sb.reverse(); + System.out.println (foo); + + System.out.println (sb); + sb = new StringBuffer("1234"); + System.out.println(sb.reverse()); + + sb = new StringBuffer("123456789"); + sb.append ("0"); + System.out.println(sb); + + sb.replace (2, 99, "foo"); + System.out.println (sb); + + sb = new StringBuffer("123456789"); + sb.replace (1, 1, "XX"); + System.out.println (sb); + + sb = new StringBuffer("123456789"); + sb.replace (0, 2, "XX"); + System.out.println (sb); + + sb = new StringBuffer("123456789"); + sb.replace (5, 9, "54321"); + System.out.println (sb); + + sb = new StringBuffer("123456789"); + + sb.delete (1,4); + System.out.println (sb); + + // Test bounds checks + try + { + sb.insert (-2, "x"); + } + catch (StringIndexOutOfBoundsException x) + { + System.out.println (x.getClass()); + } + + try + { + sb.insert (96, "x"); + } + catch (StringIndexOutOfBoundsException x) + { + System.out.println (x.getClass()); + } + + try + { + sb.delete (-2, 2); + } + catch (StringIndexOutOfBoundsException x) + { + System.out.println (x.getClass()); + } + + try + { + sb.delete (96, 418); + } + catch (StringIndexOutOfBoundsException x) + { + System.out.println (x.getClass()); + } + + try + { + sb.delete (4, 2); + } + catch (StringIndexOutOfBoundsException x) + { + System.out.println (x.getClass()); + } + + try + { + sb.replace (-2, 2, "54321"); + } + catch (StringIndexOutOfBoundsException x) + { + System.out.println (x.getClass()); + } + + try + { + sb.replace (4, 2, "54321"); + } + catch (StringIndexOutOfBoundsException x) + { + System.out.println (x.getClass()); + } + + try + { + sb.replace (12, 18, "54321"); + } + catch (StringIndexOutOfBoundsException x) + { + System.out.println (x.getClass()); + } + } +} diff --git a/libjava/testsuite/libjava.lang/StringBuffer_1.out b/libjava/testsuite/libjava.lang/StringBuffer_1.out new file mode 100644 index 000000000..cdc78ff0b --- /dev/null +++ b/libjava/testsuite/libjava.lang/StringBuffer_1.out @@ -0,0 +1,19 @@ +123456789 +123 +123 +321 +4321 +1234567890 +12foo +1XX23456789 +XX3456789 +1234554321 +156789 +class java.lang.StringIndexOutOfBoundsException +class java.lang.StringIndexOutOfBoundsException +class java.lang.StringIndexOutOfBoundsException +class java.lang.StringIndexOutOfBoundsException +class java.lang.StringIndexOutOfBoundsException +class java.lang.StringIndexOutOfBoundsException +class java.lang.StringIndexOutOfBoundsException +class java.lang.StringIndexOutOfBoundsException diff --git a/libjava/testsuite/libjava.lang/StringBuffer_overflow.jar b/libjava/testsuite/libjava.lang/StringBuffer_overflow.jar Binary files differnew file mode 100644 index 000000000..be8b655ea --- /dev/null +++ b/libjava/testsuite/libjava.lang/StringBuffer_overflow.jar diff --git a/libjava/testsuite/libjava.lang/StringBuffer_overflow.java b/libjava/testsuite/libjava.lang/StringBuffer_overflow.java new file mode 100644 index 000000000..68e18da2f --- /dev/null +++ b/libjava/testsuite/libjava.lang/StringBuffer_overflow.java @@ -0,0 +1,126 @@ +/* This tests some corner cases of arithmetic in StringBuffer. */ + +/* These tests can all be run on a 32 bit machine with modest amounts + * of memory. */ + +/* The symptom of the problem is that ArrayIndexOutOfBoundsException + * gets thrown, while the documentation says that + * StringIndexOutOfBoundsException should be thrown. */ + +class StringBuffer_overflow +{ + /* Test correct exception on getChars. */ + static void getChars() + { + StringBuffer b = new StringBuffer ("x"); + char[] s = new char [1]; + try + { + // The substring we are attempting to obtain is invalid, + // so we should get a StringIndexOutOfBoundsException. + b.getChars (1, -1 << 31, s, 0); + Fail ("getChars", "no exception"); + } + catch (Throwable e) + { + ExpectStringIndex ("getChars()", e); + } + } + + /* Test correct exception on append with bogus count. */ + static void append() + { + StringBuffer s = new StringBuffer("a"); + try + { + s.append ("".toCharArray(), 1, (1<<31)-1); + Fail ("append", "no exception"); + } + catch (Throwable e) + { + ExpectStringIndex ("append", e); + } + } + + // Check that append still more or less works. + static void appendbasic() + { + StringBuffer s = new StringBuffer(); + + try + { + if (!new StringBuffer().append ("abcdefg".toCharArray()) + .toString().equals ("abcdefg")) + { + Fail ("appendbasic", "append gives incorrect result"); + } + } + catch (Throwable e) + { + Fail ("appendbasic", e); + } + } + + /* Test correct expception on substring with bogus indexes. */ + static void substring() + { + StringBuffer s = new StringBuffer ("abc"); + try + { + // end - begin == -2 - ((1<<31)-1) == (1<<31) - 1 > 0. */ + s.substring ((1<<31)-1, -2); + Fail ("substring", "no exception"); + } + catch (Throwable e) + { + ExpectStringIndex ("substring", e); + } + } + + static void insert() + { + StringBuffer s = new StringBuffer (""); + try + { + s.insert (0, "abcd".toCharArray(), (1<<31)-1, 1); + Fail ("insert", "no exception"); + } + catch (Throwable e) + { + ExpectStringIndex ("insert", e); + } + } + + + public static void main (String[] unused) + { + getChars(); + append(); + appendbasic(); + substring(); + insert(); + + if (tests_failed == 0) + { + System.out.println ("ok"); + } + } + + static int tests_failed = 0; + + static void ExpectStringIndex (String name, Throwable exception) + { + if (! (exception instanceof StringIndexOutOfBoundsException)) + { + Fail (name, exception); + } + } + static void Fail (String name, Object why) + { + ++tests_failed; + + System.err.print (name); + System.err.print ('\t'); + System.err.println (why); + } +} diff --git a/libjava/testsuite/libjava.lang/StringBuffer_overflow.out b/libjava/testsuite/libjava.lang/StringBuffer_overflow.out new file mode 100644 index 000000000..9766475a4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/StringBuffer_overflow.out @@ -0,0 +1 @@ +ok diff --git a/libjava/testsuite/libjava.lang/String_overflow.jar b/libjava/testsuite/libjava.lang/String_overflow.jar Binary files differnew file mode 100644 index 000000000..1400db820 --- /dev/null +++ b/libjava/testsuite/libjava.lang/String_overflow.jar diff --git a/libjava/testsuite/libjava.lang/String_overflow.java b/libjava/testsuite/libjava.lang/String_overflow.java new file mode 100644 index 000000000..5a1a907c5 --- /dev/null +++ b/libjava/testsuite/libjava.lang/String_overflow.java @@ -0,0 +1,140 @@ +class String_overflow +{ + static void getChars() + { + String source = "abcdefg"; + char[] dest = new char [3]; + + try + { + source.getChars (0, 5, // Source + dest, (1<<31) - 1); + Fail ("getChars", "Should not have succeeded"); + } + catch (Throwable e) + { + ExpectArrayIndex ("getChars", e); + } + } + + /* How do I stop a compiler warning causing a test to fail? + static void getBytes() + { + String source = "abcdefg"; + byte[] dest = new byte[3]; + + try + { + source.getBytes (0, 5, dest, (1<<31) - 1); + Fail ("getBytes", "Should not have succeeded"); + } + catch (Throwable e) + { + ExpectArrayIndex ("getBytes", e); + } + } + */ + + static void regionMatches() + { + if ("abcdefg".regionMatches (4, "abcdefg", 4, -1)) + { + Fail ("regionMatches", "Should not return true"); + } + + try + { + if ("abcdefg".regionMatches (4, "abcdefg", 4, (1<<31)-1)) + { + Fail ("regionMatches (2nd)", "Should not return true"); + } + } + catch (Throwable e) + { + Fail ("regionMatches (2nd)", e); + } + } + + static void regionMatchesCase() + { + if ("abcdefg".regionMatches (true, 4, "abcdefg", 4, -1)) + { + Fail ("regionMatchesCase", "Should not return true"); + } + + try + { + if ("abcdefg".regionMatches (true, 4, "abcdefg", 4, (1<<31)-1)) + { + Fail ("regionMatchesCase (2nd)", "Should not return true"); + } + } + catch (Throwable e) + { + Fail ("regionMatchesCase (2nd)", e); + } + } + + static void startsWith() + { + // We make the arg pretty big to try and cause a segfault. + String s = new String ("abcdef"); + StringBuffer b = new StringBuffer (1000000); + b.setLength (1000000); + String arg = new String (b); + + try + { + s.startsWith (arg, (1<<31) - 1000000); + } + catch (Throwable e) + { + Fail ("startsWith", e); + } + } + + static void valueOf() + { + char[] array = new char[] {'a', 'b', 'c', 'd', 'e'}; + try + { + String.valueOf (array, 4, (1<<31)-1); + Fail ("valueOf", "should not succeed"); + } + catch (Throwable e) + { + ExpectArrayIndex ("valueOf", e); + } + } + + public static void main (String[] args) throws Throwable + { + getChars(); + // getBytes(); + regionMatches(); + regionMatchesCase(); + startsWith(); + valueOf(); + + if (tests_failed == 0) + System.out.println ("ok"); + } + + static void ExpectArrayIndex (String test, Throwable e) + { + if (e instanceof ArrayIndexOutOfBoundsException) + return; + + Fail (test, e); + } + + static void Fail (String test, Object problem) + { + ++tests_failed; + System.err.print (test); + System.err.print ('\t'); + System.err.println (problem); + } + + static int tests_failed; +} diff --git a/libjava/testsuite/libjava.lang/String_overflow.out b/libjava/testsuite/libjava.lang/String_overflow.out new file mode 100644 index 000000000..9766475a4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/String_overflow.out @@ -0,0 +1 @@ +ok diff --git a/libjava/testsuite/libjava.lang/SyncGlobal.jar b/libjava/testsuite/libjava.lang/SyncGlobal.jar Binary files differnew file mode 100644 index 000000000..54589c286 --- /dev/null +++ b/libjava/testsuite/libjava.lang/SyncGlobal.jar diff --git a/libjava/testsuite/libjava.lang/SyncGlobal.java b/libjava/testsuite/libjava.lang/SyncGlobal.java new file mode 100644 index 000000000..63613958e --- /dev/null +++ b/libjava/testsuite/libjava.lang/SyncGlobal.java @@ -0,0 +1,24 @@ +// Test suitability of alignment of statically-allocated Objects. +class SyncGlobal +{ + private static final byte[] global_1 = { 1 }; + private static final byte[] global_2 = { 2, 3 }; + private static final byte[] global_3 = { 4, 5, 6 }; + private static final byte[] global_4 = { 7, 8, 9, 10 }; + private static final byte[] global_5 = { 11, 12, 13, 14, 15 }; + private static final byte[] global_6 = { 16, 17, 18, 19, 20, 21 }; + private static final byte[] global_7 = { 22, 23, 24, 25, 26, 27, 28 }; + private static final byte[] global_8 = { 29, 30, 31, 32, 33, 34, 35, 36 }; + + public static void main (String args[]) + { + synchronized (global_1) { System.out.println ("PASS1"); } + synchronized (global_2) { System.out.println ("PASS2"); } + synchronized (global_3) { System.out.println ("PASS3"); } + synchronized (global_4) { System.out.println ("PASS4"); } + synchronized (global_5) { System.out.println ("PASS5"); } + synchronized (global_6) { System.out.println ("PASS6"); } + synchronized (global_7) { System.out.println ("PASS7"); } + synchronized (global_8) { System.out.println ("PASS8"); } + } +} diff --git a/libjava/testsuite/libjava.lang/SyncGlobal.out b/libjava/testsuite/libjava.lang/SyncGlobal.out new file mode 100644 index 000000000..5c3cc7d09 --- /dev/null +++ b/libjava/testsuite/libjava.lang/SyncGlobal.out @@ -0,0 +1,8 @@ +PASS1 +PASS2 +PASS3 +PASS4 +PASS5 +PASS6 +PASS7 +PASS8 diff --git a/libjava/testsuite/libjava.lang/SyncTest.jar b/libjava/testsuite/libjava.lang/SyncTest.jar Binary files differnew file mode 100644 index 000000000..3f30e7a0f --- /dev/null +++ b/libjava/testsuite/libjava.lang/SyncTest.jar diff --git a/libjava/testsuite/libjava.lang/SyncTest.java b/libjava/testsuite/libjava.lang/SyncTest.java new file mode 100644 index 000000000..85573f8a4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/SyncTest.java @@ -0,0 +1,34 @@ +// Test atomic increment via synchronized blocks. +public class SyncTest implements Runnable { + static int counter; + + public void run() { + // We cache the .class value; otherwise this code is + // slow enough that it will time out in some situations. + Object lock = SyncTest.class; + for (int n = 0; n < 1000000; n++) + synchronized (lock) { + counter++; + } + } + + public static void main(String[] args) { + SyncTest test = new SyncTest(); + Thread[] thr = new Thread[4]; + + for (int n = 0; n < thr.length; n++) { + thr[n] = new Thread(test); + thr[n].start(); + } + + for (int n = 0; n < thr.length; n++) { + try { + thr[n].join(); + } catch (InterruptedException ex) { + } + } + + System.out.println(counter == 1000000 * thr.length ? + "ok" : "fail: " + counter); + } +} diff --git a/libjava/testsuite/libjava.lang/SyncTest.out b/libjava/testsuite/libjava.lang/SyncTest.out new file mode 100644 index 000000000..9766475a4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/SyncTest.out @@ -0,0 +1 @@ +ok diff --git a/libjava/testsuite/libjava.lang/SyncTest.xfail b/libjava/testsuite/libjava.lang/SyncTest.xfail new file mode 100644 index 000000000..3f95317a4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/SyncTest.xfail @@ -0,0 +1 @@ +need-threads diff --git a/libjava/testsuite/libjava.lang/Synch.jar b/libjava/testsuite/libjava.lang/Synch.jar Binary files differnew file mode 100644 index 000000000..10b758009 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Synch.jar diff --git a/libjava/testsuite/libjava.lang/Synch.java b/libjava/testsuite/libjava.lang/Synch.java new file mode 100644 index 000000000..15e2d26b4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Synch.java @@ -0,0 +1,17 @@ +public class Synch +{ + public synchronized void s() + { + // This call to notify() isn't supposed to cause a + // java.lang.IllegalMonitorStateException. + notify (); + } + + public static void main (String[] args) + { + (new Synch()).s(); + System.out.println ("Ok"); + } +} + + diff --git a/libjava/testsuite/libjava.lang/Synch.out b/libjava/testsuite/libjava.lang/Synch.out new file mode 100644 index 000000000..7326d9603 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Synch.out @@ -0,0 +1 @@ +Ok diff --git a/libjava/testsuite/libjava.lang/TLtest.jar b/libjava/testsuite/libjava.lang/TLtest.jar Binary files differnew file mode 100644 index 000000000..de4ed66d9 --- /dev/null +++ b/libjava/testsuite/libjava.lang/TLtest.jar diff --git a/libjava/testsuite/libjava.lang/TLtest.java b/libjava/testsuite/libjava.lang/TLtest.java new file mode 100644 index 000000000..6ddd0cbcd --- /dev/null +++ b/libjava/testsuite/libjava.lang/TLtest.java @@ -0,0 +1,60 @@ +class TLtest extends Thread { + + public static void main (String [] args) { + Data d = new Data (); + new ThreadTest (d, "A").start (); + new ThreadTest (d, "B").start (); + } +} + +class Data { + + private static ThreadLocal owner = new ThreadLocal () { + public Object initialValue () { return ("0"); } + }; + /* A thread will call `set' to set a value it wants an instance + of Data to associate with it and only it. */ + synchronized public void set (String v){owner.set (v);} + /* A thread will call `get' to get a value it wants an instance + of Data to associate with it and only it. */ + synchronized public String get (){return (String)owner.get();} +} + +class ThreadTest extends Thread { + + public Data d; + + ThreadTest (Data d, String name) { + super (name); + this.d = d; + } + + public void run () { + + int value = 0; + int ref = 0; + + for (int i = 0; i < 20; i++) { + + int rand = (int)(Math.random ()*20); + + /* Read `value', ref is kept for comparison */ + value = Integer.parseInt (d.get()); + + /* change `value' and ref by a random number, store `value'. */ + value += rand; ref += rand; + d.set (Integer.toString (value)); + + try { + sleep((int)((Math.random() * 20))); + } catch (InterruptedException e) {} + } + + /* If a thread didn't have private value to attach to the + instance of Data, results wouldn't be the same */ + if (ref == value) + System.out.println ("test OK."); + else + System.out.println ("test failed."); + } +} diff --git a/libjava/testsuite/libjava.lang/TLtest.out b/libjava/testsuite/libjava.lang/TLtest.out new file mode 100644 index 000000000..951592b66 --- /dev/null +++ b/libjava/testsuite/libjava.lang/TLtest.out @@ -0,0 +1,2 @@ +test OK. +test OK. diff --git a/libjava/testsuite/libjava.lang/TLtest.xfail b/libjava/testsuite/libjava.lang/TLtest.xfail new file mode 100644 index 000000000..3f95317a4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/TLtest.xfail @@ -0,0 +1 @@ +need-threads diff --git a/libjava/testsuite/libjava.lang/TestProxy.jar b/libjava/testsuite/libjava.lang/TestProxy.jar Binary files differnew file mode 100644 index 000000000..706f086a4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/TestProxy.jar diff --git a/libjava/testsuite/libjava.lang/TestProxy.java b/libjava/testsuite/libjava.lang/TestProxy.java new file mode 100644 index 000000000..08e16aa33 --- /dev/null +++ b/libjava/testsuite/libjava.lang/TestProxy.java @@ -0,0 +1,36 @@ +import java.lang.reflect.Proxy; +import java.lang.reflect.InvocationHandler; +import java.lang.reflect.Method; +import java.net.*; + +public class TestProxy +{ + public static class MyInvocationHandler implements InvocationHandler + { + public Object invoke (Object proxy, + Method method, + Object[] args) + throws Throwable + { + System.out.println (args[0]); + return null; + } + } + + public static void main (String[] args) + { + try { + InvocationHandler ih = new MyInvocationHandler(); + + SocketOptions c = (SocketOptions) + Proxy.newProxyInstance (SocketOptions.class.getClassLoader(), + new Class[]{SocketOptions.class}, + ih); + + c.getOption (555); + + } catch (Exception e) { + e.printStackTrace (); + } + } +} diff --git a/libjava/testsuite/libjava.lang/TestProxy.out b/libjava/testsuite/libjava.lang/TestProxy.out new file mode 100644 index 000000000..3749383de --- /dev/null +++ b/libjava/testsuite/libjava.lang/TestProxy.out @@ -0,0 +1 @@ +555 diff --git a/libjava/testsuite/libjava.lang/Thread_Alive.jar b/libjava/testsuite/libjava.lang/Thread_Alive.jar Binary files differnew file mode 100644 index 000000000..548b6a95f --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_Alive.jar diff --git a/libjava/testsuite/libjava.lang/Thread_Alive.java b/libjava/testsuite/libjava.lang/Thread_Alive.java new file mode 100644 index 000000000..e885e1624 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_Alive.java @@ -0,0 +1,46 @@ +// Test the status of the isAlive() flag before, during, and after thread +// execution. Check that thread's threadgroup is null after thread exits. + +public class Thread_Alive implements Runnable +{ + public static void main(String args[]) throws InterruptedException + { + Thread_Alive ta = new Thread_Alive(); + Thread t = new Thread(ta); + System.out.println(t.isAlive()); + t.start(); + System.out.println(t.isAlive()); + + Thread.sleep(50); + + synchronized (ta) + { + ta.notifyAll(); + } + + t.join(); + System.out.println(t.isAlive()); + + try + { + t.start(); + System.out.println("Error: dead thread can be restarted."); + } + catch (IllegalThreadStateException x) + { + System.out.println ("ok"); + } + + System.out.println(t.getThreadGroup()); + } + + public synchronized void run() + { + try + { + wait(); + } + catch (InterruptedException x) {} + } + +} diff --git a/libjava/testsuite/libjava.lang/Thread_Alive.out b/libjava/testsuite/libjava.lang/Thread_Alive.out new file mode 100644 index 000000000..1d1790d92 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_Alive.out @@ -0,0 +1,5 @@ +false +true +false +ok +null diff --git a/libjava/testsuite/libjava.lang/Thread_Alive.xfail b/libjava/testsuite/libjava.lang/Thread_Alive.xfail new file mode 100644 index 000000000..3f95317a4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_Alive.xfail @@ -0,0 +1 @@ +need-threads diff --git a/libjava/testsuite/libjava.lang/Thread_HoldsLock.jar b/libjava/testsuite/libjava.lang/Thread_HoldsLock.jar Binary files differnew file mode 100644 index 000000000..8c094f6b7 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_HoldsLock.jar diff --git a/libjava/testsuite/libjava.lang/Thread_HoldsLock.java b/libjava/testsuite/libjava.lang/Thread_HoldsLock.java new file mode 100644 index 000000000..62119a160 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_HoldsLock.java @@ -0,0 +1,27 @@ +// Test that Thread.holdsLock() works. + +class Lock {} + +public class Thread_HoldsLock +{ + static Lock lock = new Lock(); + + public static void main(String args[]) throws InterruptedException + { + Thread_HoldsLock thl = new Thread_HoldsLock(); + + thl.check(); + synchronized (lock) + { + thl.check(); + } + thl.check(); + } + + public void check() + { + Thread this_thread = Thread.currentThread(); + System.out.println(this_thread.holdsLock(lock)); + } +} + diff --git a/libjava/testsuite/libjava.lang/Thread_HoldsLock.out b/libjava/testsuite/libjava.lang/Thread_HoldsLock.out new file mode 100644 index 000000000..eed403754 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_HoldsLock.out @@ -0,0 +1,3 @@ +false +true +false diff --git a/libjava/testsuite/libjava.lang/Thread_Interrupt.jar b/libjava/testsuite/libjava.lang/Thread_Interrupt.jar Binary files differnew file mode 100644 index 000000000..b52d43673 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_Interrupt.jar diff --git a/libjava/testsuite/libjava.lang/Thread_Interrupt.java b/libjava/testsuite/libjava.lang/Thread_Interrupt.java new file mode 100644 index 000000000..a69247422 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_Interrupt.java @@ -0,0 +1,156 @@ +// Test interrupt() behaviour on a thread in wait(), sleep(), and spinning +// in a loop. + +class ThreadBase extends Thread +{ + boolean ready = false; + + synchronized void ready() + { + ready = true; + } +} + +class Waiter extends ThreadBase +{ + public synchronized void run() + { + super.ready(); + System.out.println ("wait()"); + try + { + wait(); + System.out.println("Error: wait() completed normally."); + } + catch (InterruptedException x) + { + if (isInterrupted() || interrupted()) + System.out.println("Error: interrupt flag is still set."); + + } + System.out.println("interrupted - ok"); + } +} + +class Sleeper extends ThreadBase +{ + public void run() + { + super.ready(); + System.out.println ("sleep()"); + try + { + sleep(5000); + System.out.println("Error: sleep() completed normally."); + } + catch (InterruptedException x) + { + if (isInterrupted() || interrupted()) + System.out.println("Error: interrupt flag is still set."); + + System.out.println("interrupted - ok"); + } + } +} + +class Looper extends ThreadBase +{ + public void run() + { + super.ready(); + System.out.println ("Busy waiting"); + + int count = 0; + long start = System.currentTimeMillis(); + while (true) + { + Thread.yield(); + if (isInterrupted ()) + break; + long now = System.currentTimeMillis(); + if ((now - start) > 5000) + break; + } + synchronized (this) + { + if (interrupted ()) + { + System.out.println ("interrupted - ok"); + if (isInterrupted () || interrupted ()) + System.out.println("Error: interrupt flag is still set."); + } + else + System.out.println ("Error: Busy wait was not interrupted."); + } + } +} + +class Joiner extends ThreadBase +{ + public void run() + { + super.ready(); + System.out.println("join()"); + try + { + join(2000); + System.out.println("Error: join() completed normally??!"); + } + catch (InterruptedException x) + { + if (isInterrupted() || interrupted()) + System.out.println("Error: interrupt flag is still set."); + + System.out.println("interrupted - ok"); + } + + } +} + +public class Thread_Interrupt +{ + public static void main(String args[]) + { + Waiter w = new Waiter(); + w.start (); + sleep_and_interrupt (w); + + Sleeper s = new Sleeper(); + s.start (); + sleep_and_interrupt (s); + + Looper l = new Looper (); + l.start (); + sleep_and_interrupt (l); + + Joiner j = new Joiner (); + j.start (); + sleep_and_interrupt (j); + } + + public static void sleep_and_interrupt(ThreadBase t) + { + try + { + synchronized (t) + { + while (!t.ready) + t.wait(10); + } + + Thread.sleep (50); + t.interrupt (); + long t1 = System.currentTimeMillis(); + t.join (5000); + long time = System.currentTimeMillis() - t1; + if (time > 2900) + { + System.out.println ("Error: join() from main thread timed out"); + } + } + catch (InterruptedException x) + { + System.out.println("Error: main thread interrupted."); + } + } +} diff --git a/libjava/testsuite/libjava.lang/Thread_Interrupt.out b/libjava/testsuite/libjava.lang/Thread_Interrupt.out new file mode 100644 index 000000000..b3a5c3100 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_Interrupt.out @@ -0,0 +1,8 @@ +wait() +interrupted - ok +sleep() +interrupted - ok +Busy waiting +interrupted - ok +join() +interrupted - ok diff --git a/libjava/testsuite/libjava.lang/Thread_Interrupt.xfail b/libjava/testsuite/libjava.lang/Thread_Interrupt.xfail new file mode 100644 index 000000000..3f95317a4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_Interrupt.xfail @@ -0,0 +1 @@ +need-threads diff --git a/libjava/testsuite/libjava.lang/Thread_Join.jar b/libjava/testsuite/libjava.lang/Thread_Join.jar Binary files differnew file mode 100644 index 000000000..4a1d2529c --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_Join.jar diff --git a/libjava/testsuite/libjava.lang/Thread_Join.java b/libjava/testsuite/libjava.lang/Thread_Join.java new file mode 100644 index 000000000..9f7f2fb15 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_Join.java @@ -0,0 +1,67 @@ +// Many threads join a single thread. + +class Sleeper implements Runnable +{ + int num = -1; + + public Sleeper(int num) + { + this.num = num; + } + + public void run() + { + System.out.println("sleeping"); + try + { + Thread.sleep(500); + } + catch (InterruptedException x) + { + System.out.println("sleep() interrupted"); + } + System.out.println("done"); + } +} + +class Joiner implements Runnable +{ + Thread join_target; + + public Joiner(Thread t) + { + this.join_target = t; + } + + public void run() + { + try + { + long start = System.currentTimeMillis(); + join_target.join(2000); + if ((System.currentTimeMillis() - start) > 1900) + System.out.println("Error: Join timed out"); + else + System.out.println("ok"); + } + catch (InterruptedException x) + { + System.out.println("join() interrupted"); + } + } + +} + +public class Thread_Join +{ + public static void main(String[] args) + { + Thread primary = new Thread(new Sleeper(1)); + primary.start(); + for (int i=0; i < 10; i++) + { + Thread t = new Thread(new Joiner(primary)); + t.start(); + } + } +} diff --git a/libjava/testsuite/libjava.lang/Thread_Join.out b/libjava/testsuite/libjava.lang/Thread_Join.out new file mode 100644 index 000000000..ac72ef3f9 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_Join.out @@ -0,0 +1,12 @@ +sleeping +done +ok +ok +ok +ok +ok +ok +ok +ok +ok +ok diff --git a/libjava/testsuite/libjava.lang/Thread_Join.xfail b/libjava/testsuite/libjava.lang/Thread_Join.xfail new file mode 100644 index 000000000..3f95317a4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_Join.xfail @@ -0,0 +1 @@ +need-threads diff --git a/libjava/testsuite/libjava.lang/Thread_Monitor.jar b/libjava/testsuite/libjava.lang/Thread_Monitor.jar Binary files differnew file mode 100644 index 000000000..2345c8b63 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_Monitor.jar diff --git a/libjava/testsuite/libjava.lang/Thread_Monitor.java b/libjava/testsuite/libjava.lang/Thread_Monitor.java new file mode 100644 index 000000000..649a75c76 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_Monitor.java @@ -0,0 +1,64 @@ +// Test that monitor locks work and are recursive. + +class T implements Runnable +{ + public int count = 0; + Counter c; + + public T (Counter c) + { + this.c = c; + } + + public void run() + { + while (true) + { + // NOTE: double-synchronization here. + synchronized (c) + { + if (c.getCount() <= 100000) + count++; + else + break; + } + } + } +} + +class Counter +{ + int i = 0; + public synchronized int getCount () + { + return ++i; + } +} + +public class Thread_Monitor +{ + public static void main(String args[]) + { + Counter c = new Counter(); + T t1 = new T(c); + T t2 = new T(c); + + Thread th1 = new Thread(t1); + Thread th2 = new Thread(t2); + th1.start(); + th2.start(); + try + { + th1.join(); + th2.join(); + } + catch (InterruptedException x) + { + System.out.println("failed: Interrupted"); + } + if (t1.count + t2.count == 100000) + System.out.println ("ok"); + else + System.out.println ("failed: total count incorrect"); + } +} diff --git a/libjava/testsuite/libjava.lang/Thread_Monitor.out b/libjava/testsuite/libjava.lang/Thread_Monitor.out new file mode 100644 index 000000000..9766475a4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_Monitor.out @@ -0,0 +1 @@ +ok diff --git a/libjava/testsuite/libjava.lang/Thread_Monitor.xfail b/libjava/testsuite/libjava.lang/Thread_Monitor.xfail new file mode 100644 index 000000000..3f95317a4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_Monitor.xfail @@ -0,0 +1 @@ +need-threads diff --git a/libjava/testsuite/libjava.lang/Thread_Sleep.jar b/libjava/testsuite/libjava.lang/Thread_Sleep.jar Binary files differnew file mode 100644 index 000000000..2320add29 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_Sleep.jar diff --git a/libjava/testsuite/libjava.lang/Thread_Sleep.java b/libjava/testsuite/libjava.lang/Thread_Sleep.java new file mode 100644 index 000000000..7220a6a3a --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_Sleep.java @@ -0,0 +1,23 @@ +// Test that Thread.sleep() works. + +public class Thread_Sleep +{ + public static void main(String args[]) + { + try + { + long start = System.currentTimeMillis(); + System.out.println("sleeping"); + Thread.sleep(50); + long end = System.currentTimeMillis(); + if ((end - start) < 50) + System.out.println ("failed"); + else + System.out.println("ok"); + } + catch (InterruptedException x) + { + System.out.println("error: Thread interrupted."); + } + } +} diff --git a/libjava/testsuite/libjava.lang/Thread_Sleep.out b/libjava/testsuite/libjava.lang/Thread_Sleep.out new file mode 100644 index 000000000..1622a213a --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_Sleep.out @@ -0,0 +1,2 @@ +sleeping +ok diff --git a/libjava/testsuite/libjava.lang/Thread_Sleep.xfail b/libjava/testsuite/libjava.lang/Thread_Sleep.xfail new file mode 100644 index 000000000..3f95317a4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_Sleep.xfail @@ -0,0 +1 @@ +need-threads diff --git a/libjava/testsuite/libjava.lang/Thread_Sleep_2.jar b/libjava/testsuite/libjava.lang/Thread_Sleep_2.jar Binary files differnew file mode 100644 index 000000000..a657ed91a --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_Sleep_2.jar diff --git a/libjava/testsuite/libjava.lang/Thread_Sleep_2.java b/libjava/testsuite/libjava.lang/Thread_Sleep_2.java new file mode 100644 index 000000000..37c0d3bb6 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_Sleep_2.java @@ -0,0 +1,34 @@ +// Test that Thread.sleep() is accurate +// and that nanoTime actually measures in nanoseconds. + +public class Thread_Sleep_2 +{ + public static void main(String args[]) + { + try + { + boolean ok = true; + for (int i = 0; i < 100; i++) + { + long start = System.nanoTime(); + Thread.sleep(10); + long end = System.nanoTime(); + if ((end - start) < 10000000) + { + System.out.print ("failed, iteration "); + System.out.print (i); + System.out.print (", time "); + System.out.print (end - start); + System.out.println ("ns"); + ok = false; + } + } + if (ok) + System.out.println ("ok"); + } + catch (InterruptedException x) + { + System.out.println("error: Thread interrupted."); + } + } +} diff --git a/libjava/testsuite/libjava.lang/Thread_Sleep_2.out b/libjava/testsuite/libjava.lang/Thread_Sleep_2.out new file mode 100644 index 000000000..9766475a4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_Sleep_2.out @@ -0,0 +1 @@ +ok diff --git a/libjava/testsuite/libjava.lang/Thread_Sleep_2.xfail b/libjava/testsuite/libjava.lang/Thread_Sleep_2.xfail new file mode 100644 index 000000000..3f95317a4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_Sleep_2.xfail @@ -0,0 +1 @@ +need-threads diff --git a/libjava/testsuite/libjava.lang/Thread_Wait.jar b/libjava/testsuite/libjava.lang/Thread_Wait.jar Binary files differnew file mode 100644 index 000000000..1ecb6a3e3 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_Wait.jar diff --git a/libjava/testsuite/libjava.lang/Thread_Wait.java b/libjava/testsuite/libjava.lang/Thread_Wait.java new file mode 100644 index 000000000..88508243a --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_Wait.java @@ -0,0 +1,48 @@ +// Test basic thread creation and wait/notify functionality. + +public class Thread_Wait implements Runnable +{ + public static void main(String args[]) + { + new Thread_Wait(); + } + + public Thread_Wait() + { + System.out.println("creating thread"); + Thread t = new Thread(this); + t.start(); + + try + { + Thread.sleep(100); + } + catch (Exception x) + { + System.out.println("exception occurred: " + x); + } + + synchronized (this) + { + System.out.println("notifying other thread"); + notify(); + } + } + + public void run() + { + System.out.println ("new thread running"); + synchronized (this) + { + try + { + wait(); + } + catch (Exception x) + { + System.out.println("exception occurred: " + x); + } + } + System.out.println ("thread notified okay"); + } +} diff --git a/libjava/testsuite/libjava.lang/Thread_Wait.out b/libjava/testsuite/libjava.lang/Thread_Wait.out new file mode 100644 index 000000000..09cbb785c --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_Wait.out @@ -0,0 +1,4 @@ +creating thread +new thread running +notifying other thread +thread notified okay diff --git a/libjava/testsuite/libjava.lang/Thread_Wait.xfail b/libjava/testsuite/libjava.lang/Thread_Wait.xfail new file mode 100644 index 000000000..3f95317a4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_Wait.xfail @@ -0,0 +1 @@ +need-threads diff --git a/libjava/testsuite/libjava.lang/Thread_Wait_2.jar b/libjava/testsuite/libjava.lang/Thread_Wait_2.jar Binary files differnew file mode 100644 index 000000000..b043de48a --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_Wait_2.jar diff --git a/libjava/testsuite/libjava.lang/Thread_Wait_2.java b/libjava/testsuite/libjava.lang/Thread_Wait_2.java new file mode 100644 index 000000000..7ee51726c --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_Wait_2.java @@ -0,0 +1,143 @@ +// Create many threads waiting on a monitor. Interrupt some of them. Do the +// others wake up correctly with notify() and/or notifyAll()? + +import java.util.Vector; + +class Waiter extends Thread +{ + Object monitor; + int thread_num; + boolean interrupted = false; + boolean notified = false; + + Waiter (Object monitor, int thread_num) + { + this.monitor = monitor; + this.thread_num = thread_num; + } + + public void run() + { + synchronized (monitor) + { + try + { + monitor.wait(); + notified = true; + } + catch (InterruptedException x) + { + interrupted = true; + } + } + + } +} + +public class Thread_Wait_2 +{ + static Vector threads; + static Object monitor = new Object(); + + static final int NUM_THREADS = 10; + + public static void main(String args[]) + { + + + try + { + makeThreads (); + + Thread.sleep(250); + + // Interrupt a few threads... + Waiter i1 = (Waiter) threads.elementAt(3); + Waiter i2 = (Waiter) threads.elementAt(4); + Waiter i3 = (Waiter) threads.elementAt(9); + i1.interrupt(); + i2.interrupt(); + i3.interrupt(); + + // Call notify the exact number of times required to wake the remaining + // threads. + synchronized (monitor) + { + for (int i=0; i < NUM_THREADS -3 ; i++) + { + monitor.notify (); + } + } + + joinAll(); + printStatus(); + + // Repeat all the above, but use notifyAll() instead. + makeThreads(); + + Thread.sleep(250); + + // Interrupt a few threads... + i1 = (Waiter) threads.elementAt(0); + i2 = (Waiter) threads.elementAt(1); + i3 = (Waiter) threads.elementAt(9); + i1.interrupt(); + i2.interrupt(); + i3.interrupt(); + + // Call notifyAll to wake the remaining threads. + synchronized (monitor) + { + monitor.notifyAll (); + } + + joinAll(); + printStatus(); + + } + catch (InterruptedException x) + { + System.out.println (x); + } + + + } + + static void makeThreads() + { + threads = new Vector(NUM_THREADS); + + for (int i=0; i < NUM_THREADS; i++) + { + Waiter w = new Waiter(monitor, i); + w.start(); + threads.addElement(w); + } + } + + static void joinAll() + { + try + { + for (int i=0; i < threads.size(); i++) + { + Thread t = (Thread) threads.elementAt(i); + t.join(); + } + } + catch (InterruptedException x) {} + } + + static void printStatus() + { + for (int i=0; i < threads.size(); i++) + { + Waiter w = (Waiter) threads.elementAt(i); + if (w.interrupted) + System.out.println (i + " interrupted."); + if (w.notified) + System.out.println (i + " notified."); + } + } + +} diff --git a/libjava/testsuite/libjava.lang/Thread_Wait_2.out b/libjava/testsuite/libjava.lang/Thread_Wait_2.out new file mode 100644 index 000000000..4a71f07f9 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_Wait_2.out @@ -0,0 +1,20 @@ +0 notified. +1 notified. +2 notified. +3 interrupted. +4 interrupted. +5 notified. +6 notified. +7 notified. +8 notified. +9 interrupted. +0 interrupted. +1 interrupted. +2 notified. +3 notified. +4 notified. +5 notified. +6 notified. +7 notified. +8 notified. +9 interrupted. diff --git a/libjava/testsuite/libjava.lang/Thread_Wait_2.xfail b/libjava/testsuite/libjava.lang/Thread_Wait_2.xfail new file mode 100644 index 000000000..3f95317a4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_Wait_2.xfail @@ -0,0 +1 @@ +need-threads diff --git a/libjava/testsuite/libjava.lang/Thread_Wait_Interrupt.jar b/libjava/testsuite/libjava.lang/Thread_Wait_Interrupt.jar Binary files differnew file mode 100644 index 000000000..dcafc43c6 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_Wait_Interrupt.jar diff --git a/libjava/testsuite/libjava.lang/Thread_Wait_Interrupt.java b/libjava/testsuite/libjava.lang/Thread_Wait_Interrupt.java new file mode 100644 index 000000000..609527cda --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_Wait_Interrupt.java @@ -0,0 +1,75 @@ +// Create two threads waiting on a monitor. Interrupt one of them. Does the +// other wake up correctly? + +class Waiter extends Thread +{ + Object monitor; + int thread_num; + boolean interrupted = false; + boolean notified = false; + + Waiter (Object monitor, int thread_num) + { + this.monitor = monitor; + this.thread_num = thread_num; + } + + public void run() + { + synchronized (monitor) + { + System.out.println ("Thread waiting."); + try + { + long start = System.currentTimeMillis(); + monitor.wait(1000); + long time = System.currentTimeMillis() - start; + if (time > 990) + System.out.println ("Error: wait on thread " + thread_num + + " timed out."); + else + notified = true; + } + catch (InterruptedException x) + { + interrupted = true; + } + } + + } +} + +public class Thread_Wait_Interrupt +{ + public static void main(String args[]) + { + Object monitor = new Object(); + Waiter w1 = new Waiter(monitor, 1); + Waiter w2 = new Waiter(monitor, 2); + w1.start(); + w2.start(); + try + { + Thread.sleep(250); + + synchronized (monitor) + { + w1.interrupt(); + monitor.notify(); + } + + w1.join(); + w2.join(); + System.out.println("join ok"); + System.out.println("Thread 1 " + + (w1.interrupted ? "interrupted ok" : "error")); + System.out.println("Thread 2 " + + (w2.notified ? "notified ok" : "error")); + + } + catch (InterruptedException x) + { + System.out.println (x); + } + } +} diff --git a/libjava/testsuite/libjava.lang/Thread_Wait_Interrupt.out b/libjava/testsuite/libjava.lang/Thread_Wait_Interrupt.out new file mode 100644 index 000000000..4f3b16678 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_Wait_Interrupt.out @@ -0,0 +1,5 @@ +Thread waiting. +Thread waiting. +join ok +Thread 1 interrupted ok +Thread 2 notified ok diff --git a/libjava/testsuite/libjava.lang/Thread_Wait_Interrupt.xfail b/libjava/testsuite/libjava.lang/Thread_Wait_Interrupt.xfail new file mode 100644 index 000000000..3f95317a4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Thread_Wait_Interrupt.xfail @@ -0,0 +1 @@ +need-threads diff --git a/libjava/testsuite/libjava.lang/Throw_1.jar b/libjava/testsuite/libjava.lang/Throw_1.jar Binary files differnew file mode 100644 index 000000000..330562d50 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Throw_1.jar diff --git a/libjava/testsuite/libjava.lang/Throw_1.java b/libjava/testsuite/libjava.lang/Throw_1.java new file mode 100644 index 000000000..4a0780aec --- /dev/null +++ b/libjava/testsuite/libjava.lang/Throw_1.java @@ -0,0 +1,25 @@ +// Some tests of `throw'. + +public class Throw_1 +{ + public static Throwable get () + { + return null; + } + + public static void main (String[] args) + { + Throwable t = get (); + try + { + throw t; + } + catch (NullPointerException y) + { + } + catch (Throwable x) + { + System.out.println ("no"); + } + } +} diff --git a/libjava/testsuite/libjava.lang/Throw_1.out b/libjava/testsuite/libjava.lang/Throw_1.out new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/libjava/testsuite/libjava.lang/Throw_1.out diff --git a/libjava/testsuite/libjava.lang/Throw_2.jar b/libjava/testsuite/libjava.lang/Throw_2.jar Binary files differnew file mode 100644 index 000000000..6cfb11fe5 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Throw_2.jar diff --git a/libjava/testsuite/libjava.lang/Throw_2.java b/libjava/testsuite/libjava.lang/Throw_2.java new file mode 100644 index 000000000..6d1d0e6b4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Throw_2.java @@ -0,0 +1,59 @@ +// Check that NullPointerExceptions thrown from library code are +// caught. This detects a number of failures that can be caused by +// libgcj being built incorrectly. In particular, we ensure that a +// SEGV in native (i.e. C++) code in libgcj is handled correctly. + +// Regrettably, we cannot guarantee that Double.parseDouble() will +// always be native code, or that it will never be inlined. It could +// be argued that we should add a method to libgcj that will be +// guaranteed forever to be native, but I'm reluctant to add to the +// library for the sole purpose of performing this test. + +public class Throw_2 +{ + public static Throwable obj() + { + return null; + } + + public static String str() + { + return null; + } + + static double d; + + public static void main (String[] args) + { + // This NullPointerException will, at the time of writing, be + // thrown from Java code in libgcj. + try + { + java.util.Vector v = new java.util.Vector (null); + System.out.println ("fail: no exception thrown"); + } + catch (NullPointerException _) + { + System.out.println ("1"); + } + catch (Throwable _) + { + System.out.println ("fail: " + _); + } + // This one will, at the time of writing, be thrown from C++ + // code in libgcj. + try + { + d = Double.parseDouble(str()); + System.out.println ("fail: no exception thrown"); + } + catch (NullPointerException _) + { + System.out.println ("2"); + } + catch (Throwable _) + { + System.out.println ("fail: " + _); + } + } +} diff --git a/libjava/testsuite/libjava.lang/Throw_2.out b/libjava/testsuite/libjava.lang/Throw_2.out new file mode 100644 index 000000000..1191247b6 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Throw_2.out @@ -0,0 +1,2 @@ +1 +2 diff --git a/libjava/testsuite/libjava.lang/Throw_3.jar b/libjava/testsuite/libjava.lang/Throw_3.jar Binary files differnew file mode 100644 index 000000000..0aefbe04f --- /dev/null +++ b/libjava/testsuite/libjava.lang/Throw_3.jar diff --git a/libjava/testsuite/libjava.lang/Throw_3.java b/libjava/testsuite/libjava.lang/Throw_3.java new file mode 100644 index 000000000..5d9a2dc7a --- /dev/null +++ b/libjava/testsuite/libjava.lang/Throw_3.java @@ -0,0 +1,41 @@ +// Check that a NPE likely thrown from the first instruction of a +// method (foo) is properly caught. +public class Throw_3 +{ + public static void main(String[] args) + { + Throw_3 al = new Throw_3(); + try + { + al.foo(null); + } + catch (NullPointerException npe) + { + StackTraceElement ste[] = npe.getStackTrace(); + StackTraceElement top = ste[0]; + if ("foo".equals(top.getMethodName())) + { + System.out.println("ok"); + return; + } + } + System.out.println("bad"); + } + + public int bar(int[] a) + { + System.out.println("Bar"); + return 5; + } + + /** + * If the second parameter ('this' being the first) is passed in a + * register, then the first machine instruction in foo is likely to + * fault when null is passed. + */ + public int foo(int[] a) + { + int l = a.length; + return l + l; + } +} diff --git a/libjava/testsuite/libjava.lang/Throw_3.out b/libjava/testsuite/libjava.lang/Throw_3.out new file mode 100644 index 000000000..9766475a4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/Throw_3.out @@ -0,0 +1 @@ +ok diff --git a/libjava/testsuite/libjava.lang/WalkerTest.jar b/libjava/testsuite/libjava.lang/WalkerTest.jar Binary files differnew file mode 100644 index 000000000..64faf04df --- /dev/null +++ b/libjava/testsuite/libjava.lang/WalkerTest.jar diff --git a/libjava/testsuite/libjava.lang/WalkerTest.java b/libjava/testsuite/libjava.lang/WalkerTest.java new file mode 100644 index 000000000..f4e41fecf --- /dev/null +++ b/libjava/testsuite/libjava.lang/WalkerTest.java @@ -0,0 +1,15 @@ +class Foo +{ + Class bar() + { + return gnu.classpath.VMStackWalker.getCallingClass(); + } +} + +public class WalkerTest +{ + public static void main(String[] argv) + { + System.out.println(new Foo().bar()); + } +} diff --git a/libjava/testsuite/libjava.lang/WalkerTest.out b/libjava/testsuite/libjava.lang/WalkerTest.out new file mode 100644 index 000000000..9b8eb0030 --- /dev/null +++ b/libjava/testsuite/libjava.lang/WalkerTest.out @@ -0,0 +1 @@ +class WalkerTest diff --git a/libjava/testsuite/libjava.lang/anfi.jar b/libjava/testsuite/libjava.lang/anfi.jar Binary files differnew file mode 100644 index 000000000..81225e4d2 --- /dev/null +++ b/libjava/testsuite/libjava.lang/anfi.jar diff --git a/libjava/testsuite/libjava.lang/anfi.java b/libjava/testsuite/libjava.lang/anfi.java new file mode 100644 index 000000000..d9e7de752 --- /dev/null +++ b/libjava/testsuite/libjava.lang/anfi.java @@ -0,0 +1,33 @@ +// Class anfi +// Generated on Sat Jan 29 16:06:33 PST 2000 +// Anonymous with access to outer context locals + +class anfi { + + itf foo (final String s, final int i) { + return new itf () { + String buff = s+" "+i; + public void setString (String s) { buff = s+" "+i; } + public String getString () { return buff; } + }; + } + + void test () { + itf x = foo ("Hello", 123); + System.out.println (x.getString ()); + x.setString ("Frinkahedron"); + System.out.println (x.getString ()); + } + + public static void main (String[] arg) + { + System.out.println ("Testing class `anfi'..."); + new anfi().test(); + } +} + +interface itf { + void setString (String s); + String getString(); + String buff = null; +} diff --git a/libjava/testsuite/libjava.lang/anfi.out b/libjava/testsuite/libjava.lang/anfi.out new file mode 100644 index 000000000..52ac97cf9 --- /dev/null +++ b/libjava/testsuite/libjava.lang/anfi.out @@ -0,0 +1,3 @@ +Testing class `anfi'... +Hello 123 +Frinkahedron 123 diff --git a/libjava/testsuite/libjava.lang/anon.jar b/libjava/testsuite/libjava.lang/anon.jar Binary files differnew file mode 100644 index 000000000..295e1647a --- /dev/null +++ b/libjava/testsuite/libjava.lang/anon.jar diff --git a/libjava/testsuite/libjava.lang/anon.java b/libjava/testsuite/libjava.lang/anon.java new file mode 100644 index 000000000..c24b4f0a2 --- /dev/null +++ b/libjava/testsuite/libjava.lang/anon.java @@ -0,0 +1,52 @@ +// Class anon +// Generated on Wed Dec 29 10:07:09 PST 1999 +// + + +interface itf {int count = 0;void setCount (int i);int getCount ();} + +class anon { + + int count = 34; + + class x implements itf { + int count = 3; + public void setCount (int j) { } + public int getCount () { return count*3; } + } + + + itf foo () { + class y implements itf { + int count = 3; + public void setCount (int j) { count = j; } + public int getCount () { return count+1; } + } + return new y (); + } + + itf bar () { + return new itf () { + // The class defined right here will implement `itf' + int count = 5; + public void setCount (int j) { count = j; } + public int getCount () { return count+1; } + } ; + } + + void test () { + itf a = foo (); + itf b = bar (); + x c = this.new x (); + System.out.println (a.getCount ()); + System.out.println (b.getCount ()); + System.out.println (c.getCount ()); + System.out.println (this.count); + } + + public static void main (String[] arg) + { + System.out.println ("Testing class `anon'..."); + new anon ().test (); + } +} diff --git a/libjava/testsuite/libjava.lang/anon.out b/libjava/testsuite/libjava.lang/anon.out new file mode 100644 index 000000000..3b397bbe5 --- /dev/null +++ b/libjava/testsuite/libjava.lang/anon.out @@ -0,0 +1,5 @@ +Testing class `anon'... +4 +6 +9 +34 diff --git a/libjava/testsuite/libjava.lang/anon2.jar b/libjava/testsuite/libjava.lang/anon2.jar Binary files differnew file mode 100644 index 000000000..3906ff540 --- /dev/null +++ b/libjava/testsuite/libjava.lang/anon2.jar diff --git a/libjava/testsuite/libjava.lang/anon2.java b/libjava/testsuite/libjava.lang/anon2.java new file mode 100644 index 000000000..a14eef88e --- /dev/null +++ b/libjava/testsuite/libjava.lang/anon2.java @@ -0,0 +1,50 @@ +// Class anon2 +// Generated on Wed Dec 29 10:07:09 PST 1999 +// + + +class anon2 { + + int count = 34; + int field; + + anon2 () { System.out.println ("anon2()"); } + + anon2 (foobar x) { + System.out.println ("Yikes!"+x.zoink()); + } + + anon2 foo () { + class y extends anon2 { + int count = 3; + public void setCount (int j) { count = j; } + public int getCount () { return count+1; } + y (int i) { System.out.println ("y(int)"); } + } + return new y (3); + } + + anon2 bar () { + foobar xyz = new foobar (); + return new anon2 (xyz) { + int count = 5; + public void setCount (int j) { field = 3; count = j; } + public int getCount () { return count+1; } + } ; + } + + void test () { + anon2 b = bar (); + anon2 c = foo (); + } + + public static void main (String[] arg) + { + System.out.println ("Testing class `anon2'..."); + new anon2 ().test (); + } +} + +class foobar { + public String zoink() { return " zoinked"; } +} diff --git a/libjava/testsuite/libjava.lang/anon2.out b/libjava/testsuite/libjava.lang/anon2.out new file mode 100644 index 000000000..2a1257491 --- /dev/null +++ b/libjava/testsuite/libjava.lang/anon2.out @@ -0,0 +1,5 @@ +Testing class `anon2'... +anon2() +Yikes! zoinked +anon2() +y(int) diff --git a/libjava/testsuite/libjava.lang/anon3.jar b/libjava/testsuite/libjava.lang/anon3.jar Binary files differnew file mode 100644 index 000000000..83bce16f8 --- /dev/null +++ b/libjava/testsuite/libjava.lang/anon3.jar diff --git a/libjava/testsuite/libjava.lang/anon3.java b/libjava/testsuite/libjava.lang/anon3.java new file mode 100644 index 000000000..0af8804d8 --- /dev/null +++ b/libjava/testsuite/libjava.lang/anon3.java @@ -0,0 +1,28 @@ +// Class anon3 +// Generated on Wed Dec 29 10:07:09 PST 1999 +// + + +class anon3 { + + itf bar () { + return new itf () { + int count = 5; + public void setCount (int j) { count = 3; } + public int getCount () { return count; } + } ; + } + + void test () { + itf x = bar (); + System.out.println (x.getCount ()); + } + + public static void main (String[] arg) + { + System.out.println ("Testing class `anon3'..."); + new anon3 ().test (); + } +} + +interface itf { void setCount (int j); int getCount(); int count = 0; } diff --git a/libjava/testsuite/libjava.lang/anon3.out b/libjava/testsuite/libjava.lang/anon3.out new file mode 100644 index 000000000..87855491b --- /dev/null +++ b/libjava/testsuite/libjava.lang/anon3.out @@ -0,0 +1,2 @@ +Testing class `anon3'... +5 diff --git a/libjava/testsuite/libjava.lang/anon4.jar b/libjava/testsuite/libjava.lang/anon4.jar Binary files differnew file mode 100644 index 000000000..5362e8d59 --- /dev/null +++ b/libjava/testsuite/libjava.lang/anon4.jar diff --git a/libjava/testsuite/libjava.lang/anon4.java b/libjava/testsuite/libjava.lang/anon4.java new file mode 100644 index 000000000..4fd526227 --- /dev/null +++ b/libjava/testsuite/libjava.lang/anon4.java @@ -0,0 +1,30 @@ +// Class anon4 +// Generated on Wed Dec 29 10:07:09 PST 1999 +// + + +class anon4 { + + private int field = 3; + + itf bar () { + return new itf () { + int count = 5; + public void setCount (int j) { count = 3+field; } + public int getCount () { return count+field; } + } ; + } + + void test () { + itf x = bar (); + System.out.println (x.getCount ()); + } + + public static void main (String[] arg) + { + System.out.println ("Testing class `anon4'..."); + new anon4 ().test (); + } +} + +interface itf { void setCount (int j); int getCount(); int count = 0; } diff --git a/libjava/testsuite/libjava.lang/anon4.out b/libjava/testsuite/libjava.lang/anon4.out new file mode 100644 index 000000000..ff8b8916e --- /dev/null +++ b/libjava/testsuite/libjava.lang/anon4.out @@ -0,0 +1,2 @@ +Testing class `anon4'... +8 diff --git a/libjava/testsuite/libjava.lang/anon_ctor_itf_arg.jar b/libjava/testsuite/libjava.lang/anon_ctor_itf_arg.jar Binary files differnew file mode 100644 index 000000000..d9c42028a --- /dev/null +++ b/libjava/testsuite/libjava.lang/anon_ctor_itf_arg.jar diff --git a/libjava/testsuite/libjava.lang/anon_ctor_itf_arg.java b/libjava/testsuite/libjava.lang/anon_ctor_itf_arg.java new file mode 100644 index 000000000..1fd16f12b --- /dev/null +++ b/libjava/testsuite/libjava.lang/anon_ctor_itf_arg.java @@ -0,0 +1,38 @@ +/* From java/3285, By p.thio@valescom.com */ + +interface I +{ + void print (); +}; + +class C1 +implements I +{ + public void print () { System.out.println ("C1: Message"); } +} + +abstract +class C2 +{ + C2(I i) + { + i.print (); + } + abstract void h(); +} + +public +class anon_ctor_itf_arg +{ + public static + void main(String argv[]) + { + C1 c1 = new C1(); + new C2(c1) + { + void h() + { + } + }; + } +} diff --git a/libjava/testsuite/libjava.lang/anon_ctor_itf_arg.out b/libjava/testsuite/libjava.lang/anon_ctor_itf_arg.out new file mode 100644 index 000000000..abddf8e8f --- /dev/null +++ b/libjava/testsuite/libjava.lang/anon_ctor_itf_arg.out @@ -0,0 +1 @@ +C1: Message diff --git a/libjava/testsuite/libjava.lang/anonarray.jar b/libjava/testsuite/libjava.lang/anonarray.jar Binary files differnew file mode 100644 index 000000000..d2b2070b4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/anonarray.jar diff --git a/libjava/testsuite/libjava.lang/anonarray.java b/libjava/testsuite/libjava.lang/anonarray.java new file mode 100644 index 000000000..8239c51f9 --- /dev/null +++ b/libjava/testsuite/libjava.lang/anonarray.java @@ -0,0 +1,22 @@ +// Class anonarray +// Generated on Tue Feb 1 16:11:29 PST 2000 +// Simple anonymous array, of primitive types. + +class anonarray { + + static void foo (int [][] x) { + for (int i = 0; i < x.length; i++) + { + for (int j = 0; j < x[i].length; j++) + System.out.print (x[i][j]); + System.out.println(); + } + } + + public static void main (String[] arg) + { + foo (new int[][] {{2,3},{5,7}}); + System.out.println ((new int [][] {{11,13},{17,19}}).length); + System.out.println ((new int [][] {{23,29},{31,37}})[0][1]); + } +} diff --git a/libjava/testsuite/libjava.lang/anonarray.out b/libjava/testsuite/libjava.lang/anonarray.out new file mode 100644 index 000000000..4ad3f56ef --- /dev/null +++ b/libjava/testsuite/libjava.lang/anonarray.out @@ -0,0 +1,4 @@ +23 +57 +2 +29 diff --git a/libjava/testsuite/libjava.lang/anonarray2.jar b/libjava/testsuite/libjava.lang/anonarray2.jar Binary files differnew file mode 100644 index 000000000..608a08174 --- /dev/null +++ b/libjava/testsuite/libjava.lang/anonarray2.jar diff --git a/libjava/testsuite/libjava.lang/anonarray2.java b/libjava/testsuite/libjava.lang/anonarray2.java new file mode 100644 index 000000000..46df5e711 --- /dev/null +++ b/libjava/testsuite/libjava.lang/anonarray2.java @@ -0,0 +1,22 @@ +// Class anonarray2 +// Generated on Tue Feb 1 21:14:06 PST 2000 +// Anonymous array, with a non primitive type. + +class anonarray2 { + + static void foo (String [][] x) { + for (int i = 0; i < x.length; i++) + { + for (int j = 0; j < x[i].length; j++) + System.out.print (x[i][j]); + System.out.println(); + } + } + + public static void main (String[] arg) + { + foo (new String[][] {{"2","3"},{"5","7"}}); + System.out.println ((new String [][] {{"11","13"},{"17","19"}}).length); + System.out.println ((new String [][] {{"23","29"},{"31","37"}})[0][1]); + } +} diff --git a/libjava/testsuite/libjava.lang/anonarray2.out b/libjava/testsuite/libjava.lang/anonarray2.out new file mode 100644 index 000000000..4ad3f56ef --- /dev/null +++ b/libjava/testsuite/libjava.lang/anonarray2.out @@ -0,0 +1,4 @@ +23 +57 +2 +29 diff --git a/libjava/testsuite/libjava.lang/anonarray3.jar b/libjava/testsuite/libjava.lang/anonarray3.jar Binary files differnew file mode 100644 index 000000000..b24906fa8 --- /dev/null +++ b/libjava/testsuite/libjava.lang/anonarray3.jar diff --git a/libjava/testsuite/libjava.lang/anonarray3.java b/libjava/testsuite/libjava.lang/anonarray3.java new file mode 100644 index 000000000..264365b13 --- /dev/null +++ b/libjava/testsuite/libjava.lang/anonarray3.java @@ -0,0 +1,13 @@ +// Class anonarray3 +// Generated on Tue Feb 8 19:18:10 PST 2000 +// + +class anonarray3 { + private static final int[] foo (int x) { + return new int[] { x+1 }; + } + public static void main (String[] arg) + { + System.out.println (foo (34)[0]); + } +} diff --git a/libjava/testsuite/libjava.lang/anonarray3.out b/libjava/testsuite/libjava.lang/anonarray3.out new file mode 100644 index 000000000..8f92bfdd4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/anonarray3.out @@ -0,0 +1 @@ +35 diff --git a/libjava/testsuite/libjava.lang/assign.jar b/libjava/testsuite/libjava.lang/assign.jar Binary files differnew file mode 100644 index 000000000..1b9896c7e --- /dev/null +++ b/libjava/testsuite/libjava.lang/assign.jar diff --git a/libjava/testsuite/libjava.lang/assign.java b/libjava/testsuite/libjava.lang/assign.java new file mode 100644 index 000000000..ff288c93b --- /dev/null +++ b/libjava/testsuite/libjava.lang/assign.java @@ -0,0 +1,19 @@ +// Test for an array assignment bug we've had. + +public class assign +{ + public static class base + { + } + + public static class derived extends base + { + } + + public static void main(String[] args) + { + base[][] x1 = new base[3][3]; + derived[] x2 = new derived[3]; + x1[0] = x2; + } +} diff --git a/libjava/testsuite/libjava.lang/assign.out b/libjava/testsuite/libjava.lang/assign.out new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/libjava/testsuite/libjava.lang/assign.out diff --git a/libjava/testsuite/libjava.lang/assign2.jar b/libjava/testsuite/libjava.lang/assign2.jar Binary files differnew file mode 100644 index 000000000..8f1e1164b --- /dev/null +++ b/libjava/testsuite/libjava.lang/assign2.jar diff --git a/libjava/testsuite/libjava.lang/assign2.java b/libjava/testsuite/libjava.lang/assign2.java new file mode 100644 index 000000000..41fdcb594 --- /dev/null +++ b/libjava/testsuite/libjava.lang/assign2.java @@ -0,0 +1,21 @@ +// Test for an array assignment bug we've had. + +public class assign2 +{ + public static Object[][] c () { return new Long[5][5]; } + + public static Object[] d () { return new Integer[3]; } + + public static void main(String[] args) + { + try + { + Object[][] x = c(); + x[0] = d(); + } + catch (ArrayStoreException _) + { + System.out.println("good"); + } + } +} diff --git a/libjava/testsuite/libjava.lang/assign2.out b/libjava/testsuite/libjava.lang/assign2.out new file mode 100644 index 000000000..12799ccbe --- /dev/null +++ b/libjava/testsuite/libjava.lang/assign2.out @@ -0,0 +1 @@ +good diff --git a/libjava/testsuite/libjava.lang/bclink.jar b/libjava/testsuite/libjava.lang/bclink.jar Binary files differnew file mode 100644 index 000000000..86709d63d --- /dev/null +++ b/libjava/testsuite/libjava.lang/bclink.jar diff --git a/libjava/testsuite/libjava.lang/bclink.java b/libjava/testsuite/libjava.lang/bclink.java new file mode 100644 index 000000000..b10c678e1 --- /dev/null +++ b/libjava/testsuite/libjava.lang/bclink.java @@ -0,0 +1,12 @@ +// This tests that a C++ ABI class can derive from a BC ABI class. +// This can't always work, but if the base class does not change then +// it will work fine. + +import org.xml.sax.*; + +public class bclink extends SAXParseException { + public bclink() { super ("hi", null); } + + public static void main(String[] args) throws Throwable { + } +} diff --git a/libjava/testsuite/libjava.lang/bclink.out b/libjava/testsuite/libjava.lang/bclink.out new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/libjava/testsuite/libjava.lang/bclink.out diff --git a/libjava/testsuite/libjava.lang/bytearray.jar b/libjava/testsuite/libjava.lang/bytearray.jar Binary files differnew file mode 100644 index 000000000..550ae7b85 --- /dev/null +++ b/libjava/testsuite/libjava.lang/bytearray.jar diff --git a/libjava/testsuite/libjava.lang/bytearray.java b/libjava/testsuite/libjava.lang/bytearray.java new file mode 100644 index 000000000..88fdc9af0 --- /dev/null +++ b/libjava/testsuite/libjava.lang/bytearray.java @@ -0,0 +1,10 @@ +public class bytearray +{ + public static void main (String[] argv) throws Throwable { + Class c = Class.forName ("[Ljava.lang.String;"); + c = Class.forName ("[B"); + System.out.println (c); + c = ClassLoader.getSystemClassLoader().loadClass ("[[Ljava.lang.String;"); + System.out.println (c); + } +} diff --git a/libjava/testsuite/libjava.lang/bytearray.out b/libjava/testsuite/libjava.lang/bytearray.out new file mode 100644 index 000000000..520d568e9 --- /dev/null +++ b/libjava/testsuite/libjava.lang/bytearray.out @@ -0,0 +1,2 @@ +class [B +class [[Ljava.lang.String; diff --git a/libjava/testsuite/libjava.lang/direct_read.jar b/libjava/testsuite/libjava.lang/direct_read.jar Binary files differnew file mode 100644 index 000000000..da334fb58 --- /dev/null +++ b/libjava/testsuite/libjava.lang/direct_read.jar diff --git a/libjava/testsuite/libjava.lang/direct_read.java b/libjava/testsuite/libjava.lang/direct_read.java new file mode 100644 index 000000000..573428493 --- /dev/null +++ b/libjava/testsuite/libjava.lang/direct_read.java @@ -0,0 +1,27 @@ +// Class direct_read +// Generated on Sat Nov 13 23:26:34 UTC 1999 +// + +class direct_read { + + int foo; + + class direct_read_inner { + void test () { + int x = foo; + System.out.println ("x="+x); + } + } + + void foo () + { + foo = 670; + direct_read_inner inn = this.new direct_read_inner (); + inn.test (); + } + public static void main (String[] arg) + { + System.out.println ("Testing class `direct_read'..."); + new direct_read().foo (); + } +} diff --git a/libjava/testsuite/libjava.lang/direct_read.out b/libjava/testsuite/libjava.lang/direct_read.out new file mode 100644 index 000000000..f8f3c6475 --- /dev/null +++ b/libjava/testsuite/libjava.lang/direct_read.out @@ -0,0 +1,2 @@ +Testing class `direct_read'... +x=670 diff --git a/libjava/testsuite/libjava.lang/direct_write.jar b/libjava/testsuite/libjava.lang/direct_write.jar Binary files differnew file mode 100644 index 000000000..b3188aa64 --- /dev/null +++ b/libjava/testsuite/libjava.lang/direct_write.jar diff --git a/libjava/testsuite/libjava.lang/direct_write.java b/libjava/testsuite/libjava.lang/direct_write.java new file mode 100644 index 000000000..2745f8601 --- /dev/null +++ b/libjava/testsuite/libjava.lang/direct_write.java @@ -0,0 +1,27 @@ +// Class direct_write +// Generated on Mon Nov 15 17:10:56 UTC 1999 +// + +class direct_write { + + int foo; + + class direct_write_inner { + void test () { + foo = 670; + } + } + + void foo () + { + foo = 650; + direct_write_inner inn = this.new direct_write_inner (); + inn.test (); + System.out.println ("foo="+foo); + } + public static void main (String[] arg) + { + System.out.println ("Testing class `direct_write'..."); + new direct_write().foo (); + } +} diff --git a/libjava/testsuite/libjava.lang/direct_write.out b/libjava/testsuite/libjava.lang/direct_write.out new file mode 100644 index 000000000..b4ff636ee --- /dev/null +++ b/libjava/testsuite/libjava.lang/direct_write.out @@ -0,0 +1,2 @@ +Testing class `direct_write'... +foo=670 diff --git a/libjava/testsuite/libjava.lang/emptystring.jar b/libjava/testsuite/libjava.lang/emptystring.jar Binary files differnew file mode 100644 index 000000000..6303487c2 --- /dev/null +++ b/libjava/testsuite/libjava.lang/emptystring.jar diff --git a/libjava/testsuite/libjava.lang/emptystring.java b/libjava/testsuite/libjava.lang/emptystring.java new file mode 100644 index 000000000..9da2ead72 --- /dev/null +++ b/libjava/testsuite/libjava.lang/emptystring.java @@ -0,0 +1,15 @@ +public class emptystring +{ + public static void main(String[] args) + { + System.out.println("null".equals(n(0) + "")); + System.out.println("null".equals("" + n(0))); + System.out.println("x".equals(n(1) + "")); + System.out.println("x".equals("" + n(1))); + } + + static String n(int i) + { + if (i==0) return null; else return "x"; + } +} diff --git a/libjava/testsuite/libjava.lang/emptystring.out b/libjava/testsuite/libjava.lang/emptystring.out new file mode 100644 index 000000000..1140ff52e --- /dev/null +++ b/libjava/testsuite/libjava.lang/emptystring.out @@ -0,0 +1,4 @@ +true +true +true +true diff --git a/libjava/testsuite/libjava.lang/err1.jar b/libjava/testsuite/libjava.lang/err1.jar Binary files differnew file mode 100644 index 000000000..11917d98b --- /dev/null +++ b/libjava/testsuite/libjava.lang/err1.jar diff --git a/libjava/testsuite/libjava.lang/err1.java b/libjava/testsuite/libjava.lang/err1.java new file mode 100644 index 000000000..7530252c8 --- /dev/null +++ b/libjava/testsuite/libjava.lang/err1.java @@ -0,0 +1,25 @@ +/*-------------------------------------------------------------------------*/ +/* File name : err1.java */ +/* : */ +/* Cause : When I make class-type Object. */ +/* : */ +/* Message : Internal compiler error: program jc1 got */ +/* : fatal signal 11 */ +/*-------------------------------------------------------------------------*/ + +class A { + int counter = 100; +} + +public class err1 { + public static void main(String[] args) { + A array[] = new A[10]; //err + array[0] = new A(); + + if ( array[0].counter == 100 ) { + System.out.println("OK"); + } else { + System.out.println("NG:[100]-->[" +array[0].counter+ "]"); + } + } +} diff --git a/libjava/testsuite/libjava.lang/err1.out b/libjava/testsuite/libjava.lang/err1.out new file mode 100644 index 000000000..d86bac9de --- /dev/null +++ b/libjava/testsuite/libjava.lang/err1.out @@ -0,0 +1 @@ +OK diff --git a/libjava/testsuite/libjava.lang/err10.jar b/libjava/testsuite/libjava.lang/err10.jar Binary files differnew file mode 100644 index 000000000..05d8f96fc --- /dev/null +++ b/libjava/testsuite/libjava.lang/err10.jar diff --git a/libjava/testsuite/libjava.lang/err10.java b/libjava/testsuite/libjava.lang/err10.java new file mode 100644 index 000000000..afdb4e055 --- /dev/null +++ b/libjava/testsuite/libjava.lang/err10.java @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------*/ +/* File name : err10.java */ +/* : */ +/* Cause : Operator >>> doesn't work correctly when value is negative. */ +/* : */ +/* Message : NG : a = -2 */ +/*--------------------------------------------------------------------------*/ + +public class err10 { + public static void main(String[] args) { + int a = -3; + + a = a>>>1; + + if ( a == 2147483646 ) { + System.out.println("OK"); + } else { + System.out.println("NG:[2147483646]-->[" +a+ "]"); + } + + } +} + diff --git a/libjava/testsuite/libjava.lang/err10.out b/libjava/testsuite/libjava.lang/err10.out new file mode 100644 index 000000000..d86bac9de --- /dev/null +++ b/libjava/testsuite/libjava.lang/err10.out @@ -0,0 +1 @@ +OK diff --git a/libjava/testsuite/libjava.lang/err11.jar b/libjava/testsuite/libjava.lang/err11.jar Binary files differnew file mode 100644 index 000000000..a818007ac --- /dev/null +++ b/libjava/testsuite/libjava.lang/err11.jar diff --git a/libjava/testsuite/libjava.lang/err11.java b/libjava/testsuite/libjava.lang/err11.java new file mode 100644 index 000000000..7b1d0c7f1 --- /dev/null +++ b/libjava/testsuite/libjava.lang/err11.java @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------*/ +/* File name : err11.java */ +/* : */ +/* Cause : If I declare both array which have more than 10 element */ +/* : and switch statement, make error. */ +/* : */ +/* Message : err11.java:1: Missing class name. */ +/* : public class err11 */ +/* : ^ */ +/* : err11.java:1: Class or interface declaration expected. */ +/* : public class err11 */ +/* : ^ */ +/* : 2 errors */ +/*--------------------------------------------------------------------------*/ + +public class err11 +{ + public static void main(String args[]) + { + int i; + short ary1[] = {12,23,34,45,56,67,78,89,90,111}; + + for(i=0; i<10; i++) { + switch(ary1[i]) { + case 111 : System.out.println("OK"); + default : break; + } + } + } +} diff --git a/libjava/testsuite/libjava.lang/err11.out b/libjava/testsuite/libjava.lang/err11.out new file mode 100644 index 000000000..d86bac9de --- /dev/null +++ b/libjava/testsuite/libjava.lang/err11.out @@ -0,0 +1 @@ +OK diff --git a/libjava/testsuite/libjava.lang/err12.jar b/libjava/testsuite/libjava.lang/err12.jar Binary files differnew file mode 100644 index 000000000..ec9f19bf2 --- /dev/null +++ b/libjava/testsuite/libjava.lang/err12.jar diff --git a/libjava/testsuite/libjava.lang/err12.java b/libjava/testsuite/libjava.lang/err12.java new file mode 100644 index 000000000..9631b3de6 --- /dev/null +++ b/libjava/testsuite/libjava.lang/err12.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------*/ +/* File name : err12.java */ +/* : */ +/* Cause : Cast negative floating point to char makes error */ +/* : */ +/* Message : Internal compiler error in functi on convert_move */ +/*--------------------------------------------------------------------------*/ + +public class err12 { + public static void main(String[] args){ + char x1, x2; + + float y = -10000f; + + x1 = (char)y; // err + x2 = (char)-10000f; // ok + + if ( x1 == x2 ) { + System.out.println("OK"); + } else { + System.out.println("NG"); + System.out.println("x1:[65520]-->[" +(x1-0)+"]"); + System.out.println("x2:[65520]-->[" +(x2-0)+"]"); + } + } +} + diff --git a/libjava/testsuite/libjava.lang/err12.out b/libjava/testsuite/libjava.lang/err12.out new file mode 100644 index 000000000..d86bac9de --- /dev/null +++ b/libjava/testsuite/libjava.lang/err12.out @@ -0,0 +1 @@ +OK diff --git a/libjava/testsuite/libjava.lang/err13.jar b/libjava/testsuite/libjava.lang/err13.jar Binary files differnew file mode 100644 index 000000000..dde18306c --- /dev/null +++ b/libjava/testsuite/libjava.lang/err13.jar diff --git a/libjava/testsuite/libjava.lang/err13.java b/libjava/testsuite/libjava.lang/err13.java new file mode 100644 index 000000000..d946d6104 --- /dev/null +++ b/libjava/testsuite/libjava.lang/err13.java @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------*/ +/* File name : err13.java */ +/* : */ +/* Cause : Conversion from zero to String type is not correct. */ +/* : */ +/* Message : NG : test */ +/*--------------------------------------------------------------------------*/ + +public class err13 { + public static void main(String[] args) { + String s = "test"; + s += 0; + + if ( s.equals("test0") ) { + System.out.println("OK"); + } else { + System.out.println("NG : " +s); + } + } +} + diff --git a/libjava/testsuite/libjava.lang/err13.out b/libjava/testsuite/libjava.lang/err13.out new file mode 100644 index 000000000..d86bac9de --- /dev/null +++ b/libjava/testsuite/libjava.lang/err13.out @@ -0,0 +1 @@ +OK diff --git a/libjava/testsuite/libjava.lang/err14.jar b/libjava/testsuite/libjava.lang/err14.jar Binary files differnew file mode 100644 index 000000000..f1b6785f2 --- /dev/null +++ b/libjava/testsuite/libjava.lang/err14.jar diff --git a/libjava/testsuite/libjava.lang/err14.java b/libjava/testsuite/libjava.lang/err14.java new file mode 100644 index 000000000..a8ee40c20 --- /dev/null +++ b/libjava/testsuite/libjava.lang/err14.java @@ -0,0 +1,20 @@ +/* Check for incorrectly aligned byte args. */ + +public class err14 +{ + protected final String getClearToolCommand(Object a, Object b, + Object c, Object d, + int e, int f, boolean x) + { + return x ? "hi" : "byte"; + } + + + public static void main(String[] args) + { + System.out.println(new err14().getClearToolCommand(null, null, + null, null, 0, 0, false)); + System.out.println(new err14().getClearToolCommand(null, null, + null, null, 0, 0, true)); + } +} diff --git a/libjava/testsuite/libjava.lang/err14.out b/libjava/testsuite/libjava.lang/err14.out new file mode 100644 index 000000000..c361ac256 --- /dev/null +++ b/libjava/testsuite/libjava.lang/err14.out @@ -0,0 +1,2 @@ +byte +hi diff --git a/libjava/testsuite/libjava.lang/err2.jar b/libjava/testsuite/libjava.lang/err2.jar Binary files differnew file mode 100644 index 000000000..d825a602d --- /dev/null +++ b/libjava/testsuite/libjava.lang/err2.jar diff --git a/libjava/testsuite/libjava.lang/err2.java b/libjava/testsuite/libjava.lang/err2.java new file mode 100644 index 000000000..deeddf633 --- /dev/null +++ b/libjava/testsuite/libjava.lang/err2.java @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------*/ +/* File name : err2.java */ +/* : */ +/* Cause : Operator "+=" error in char,byte,short type */ +/* : */ +/* Message : err2.java: In class `err2': */ +/* : err2.java: In method `main(java.lang.String[])': */ +/* : err2.java:22: Incompatible type for `='. Explicit cast */ +/* : needed to convert `int' to `byte'. */ +/* : a %= b; */ +/* : ^ */ +/* : 1 error */ +/*--------------------------------------------------------------------------*/ + +public class err2 { + public static void main(String[] args) { + byte a = -16; + byte b = 10; + + a %= b; + + if ( a == -6 ) { + System.out.println("OK"); + } else { + System.out.println("a = " +a); + } + } +} diff --git a/libjava/testsuite/libjava.lang/err2.out b/libjava/testsuite/libjava.lang/err2.out new file mode 100644 index 000000000..d86bac9de --- /dev/null +++ b/libjava/testsuite/libjava.lang/err2.out @@ -0,0 +1 @@ +OK diff --git a/libjava/testsuite/libjava.lang/err3.jar b/libjava/testsuite/libjava.lang/err3.jar Binary files differnew file mode 100644 index 000000000..be1bd617a --- /dev/null +++ b/libjava/testsuite/libjava.lang/err3.jar diff --git a/libjava/testsuite/libjava.lang/err3.java b/libjava/testsuite/libjava.lang/err3.java new file mode 100644 index 000000000..17535b850 --- /dev/null +++ b/libjava/testsuite/libjava.lang/err3.java @@ -0,0 +1,34 @@ +/*--------------------------------------------------------------------------*/ +/* File name : err3.java */ +/* : */ +/* Cause : Evaluation sequence of the formula which used */ +/* : the substitution operator is not performed correctly. */ +/* : */ +/* Message : NG1:[27]-->[9] */ +/* : NG2:[27]-->[9] */ +/* : */ +/* Note : JLS 15.6 Evaluation Order (p305) */ +/* S15.6.1 Evaluate Left-Hand Operand First */ +/* : A formula should be evaluated to 9*3 instead of 3*3. */ +/*--------------------------------------------------------------------------*/ + +public class err3 { + public static void main(String[] args) { + int x = 9; + x *= (x = 3); + if ( x == 27 ) { + System.out.println("OK1"); + } else { + System.out.println("NG1:[27]-->["+x+"]"); + } + + int y = 9; + y = y * (y = 3); + if ( y == 27 ) { + System.out.println("OK2"); + } else { + System.out.println("NG2:[27]-->["+y+"]"); + } + } +} + diff --git a/libjava/testsuite/libjava.lang/err3.out b/libjava/testsuite/libjava.lang/err3.out new file mode 100644 index 000000000..dfa480ce6 --- /dev/null +++ b/libjava/testsuite/libjava.lang/err3.out @@ -0,0 +1,2 @@ +OK1 +OK2 diff --git a/libjava/testsuite/libjava.lang/err4.jar b/libjava/testsuite/libjava.lang/err4.jar Binary files differnew file mode 100644 index 000000000..f1e782271 --- /dev/null +++ b/libjava/testsuite/libjava.lang/err4.jar diff --git a/libjava/testsuite/libjava.lang/err4.java b/libjava/testsuite/libjava.lang/err4.java new file mode 100644 index 000000000..ad908e275 --- /dev/null +++ b/libjava/testsuite/libjava.lang/err4.java @@ -0,0 +1,34 @@ +/*--------------------------------------------------------------------------*/ +/* file_name : err4.java */ +/* : */ +/* Cause : Evaluation of the array which used the substitution */ +/* : operator is not performed correctly. */ +/* : */ +/* Message : NG1:[27}-->[9.0] */ +/* : NG1:[27}-->[9.0] */ +/*--------------------------------------------------------------------------*/ + +public class err4 { + public static void main(String[] args) { + + // TEST1 + float []a = {9f}; + a[0] *= (a[0] = 3f); + + if ( a[0] == 27 ) { + System.out.println("OK1"); + } else { + System.out.println("NG1:[27}-->["+a[0]+"]"); + } + + //TEST2 + float [] b = {9f}; + b[0] = (float)(b[0] * (b[0] = 3f)); + if ( b[0] == 27 ) { + System.out.println("OK1"); + } else { + System.out.println("NG1:[27}-->["+b[0]+"]"); + } + } +} + diff --git a/libjava/testsuite/libjava.lang/err4.out b/libjava/testsuite/libjava.lang/err4.out new file mode 100644 index 000000000..f6e108f6d --- /dev/null +++ b/libjava/testsuite/libjava.lang/err4.out @@ -0,0 +1,2 @@ +OK1 +OK1 diff --git a/libjava/testsuite/libjava.lang/err5.jar b/libjava/testsuite/libjava.lang/err5.jar Binary files differnew file mode 100644 index 000000000..9a573abcb --- /dev/null +++ b/libjava/testsuite/libjava.lang/err5.jar diff --git a/libjava/testsuite/libjava.lang/err5.java b/libjava/testsuite/libjava.lang/err5.java new file mode 100644 index 000000000..f9e95b635 --- /dev/null +++ b/libjava/testsuite/libjava.lang/err5.java @@ -0,0 +1,35 @@ +/*--------------------------------------------------------------------------*/ +/* file_name : err5.java */ +/* : */ +/* Cause : Evaluation order of method argument is not correct. */ +/* : */ +/* Message : NG */ +/* : a:[1]-->[2] */ +/* : b:[3]-->[3] */ +/* : c:[2]-->[2] */ +/* : */ +/* Note : JLS 15.6 Evaluation Order */ +/* S15.6.4 Argument Lists are Evaluated Left-to-Right(p309) */ +/* [Each argument expression appears to be fully evaluated */ +/* before any part of any argument expression to its right.] */ +/*--------------------------------------------------------------------------*/ + +public class err5 { + public static void main(String[] args) { + int x = 1; + + err5 obj = new err5(); + obj.print(x, x = 3, x = 2); + } + + void print(int a, int b, int c) { + if ( a == 1 && b == 3 && c == 2 ) { + System.out.println("OK"); + } else { + System.out.println("NG"); + System.out.println("a:[1]-->["+a+"]"); + System.out.println("b:[3]-->["+b+"]"); + System.out.println("c:[2]-->["+c+"]"); + } + } +} diff --git a/libjava/testsuite/libjava.lang/err5.out b/libjava/testsuite/libjava.lang/err5.out new file mode 100644 index 000000000..d86bac9de --- /dev/null +++ b/libjava/testsuite/libjava.lang/err5.out @@ -0,0 +1 @@ +OK diff --git a/libjava/testsuite/libjava.lang/err6.jar b/libjava/testsuite/libjava.lang/err6.jar Binary files differnew file mode 100644 index 000000000..2a12b80e4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/err6.jar diff --git a/libjava/testsuite/libjava.lang/err6.java b/libjava/testsuite/libjava.lang/err6.java new file mode 100644 index 000000000..4b06c6caa --- /dev/null +++ b/libjava/testsuite/libjava.lang/err6.java @@ -0,0 +1,26 @@ +/*--------------------------------------------------------------------------*/ +/* File name : err6.java */ +/* : */ +/* Cause : Array evaluation order */ +/* : */ +/* Message : NG:[1]-->[4] */ +/* : */ +/* Note : JLS 15.9 Array Creation Expressions (p315--) */ +/* : p318 line3 */ +/* :[Each dimension expression is fully evaluated */ +/* : before any part of any dimension expression to its right.] */ +/*--------------------------------------------------------------------------*/ + +public class err6 { + public static void main(String[] args) { + int[] x = { 10, 11, 12, 1, 14 }; + int[] y = { 1, 2, 3, 4, 5, 6 }; + + if ( x[(x=y)[2]] == 1 ) { + System.out.println("OK"); + } else { + System.out.println("NG:[1]-->[" +x[(x=y)[2]]+ "]"); + } + } +} + diff --git a/libjava/testsuite/libjava.lang/err6.out b/libjava/testsuite/libjava.lang/err6.out new file mode 100644 index 000000000..d86bac9de --- /dev/null +++ b/libjava/testsuite/libjava.lang/err6.out @@ -0,0 +1 @@ +OK diff --git a/libjava/testsuite/libjava.lang/err7.jar b/libjava/testsuite/libjava.lang/err7.jar Binary files differnew file mode 100644 index 000000000..f34984497 --- /dev/null +++ b/libjava/testsuite/libjava.lang/err7.jar diff --git a/libjava/testsuite/libjava.lang/err7.java b/libjava/testsuite/libjava.lang/err7.java new file mode 100644 index 000000000..11f4e8d0b --- /dev/null +++ b/libjava/testsuite/libjava.lang/err7.java @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------*/ +/* File name : err7.java */ +/* : */ +/* Cause : When exists both array (more than 10 elements) and */ +/* "for" or "while" or "do while" statement , error. */ +/* : */ +/* Message : /var/tmp/cc1oQM8i.s: Assembler messages: */ +/* : /var/tmp/cc1oQM8i.s:243: Fatal error: Symbol $L2 already def*/ +/* : fined. */ +/*--------------------------------------------------------------------------*/ + +public class err7 { + public static void main(String[] args) { + int[] ary = {0,1,2,3,4,5,6,7,8,9}; + + while ( true ) { + break; + } + + System.out.println("OK"); + } +} + diff --git a/libjava/testsuite/libjava.lang/err7.out b/libjava/testsuite/libjava.lang/err7.out new file mode 100644 index 000000000..d86bac9de --- /dev/null +++ b/libjava/testsuite/libjava.lang/err7.out @@ -0,0 +1 @@ +OK diff --git a/libjava/testsuite/libjava.lang/err8.jar b/libjava/testsuite/libjava.lang/err8.jar Binary files differnew file mode 100644 index 000000000..5baf89b25 --- /dev/null +++ b/libjava/testsuite/libjava.lang/err8.jar diff --git a/libjava/testsuite/libjava.lang/err8.java b/libjava/testsuite/libjava.lang/err8.java new file mode 100644 index 000000000..220b2ac4f --- /dev/null +++ b/libjava/testsuite/libjava.lang/err8.java @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------*/ +/* File name : err8.java */ +/* : */ +/* Cause : When "do while" statement has only "break", error. */ +/* : */ +/* Message : err8.java: In class `err8': xxxxxx */ +/* : err8.java: In method `main(java.lang.String[])': */ +/* : err8.java:20: Unreachable statement. */ +/* : } while (true) ; */ +/* : ^ */ +/* : 1 error */ +/*--------------------------------------------------------------------------*/ + +public class err8 { + public static void main(String[] args) { + do { + break; + } while (true) ; + + System.out.println("OK"); + } +} + diff --git a/libjava/testsuite/libjava.lang/err8.out b/libjava/testsuite/libjava.lang/err8.out new file mode 100644 index 000000000..d86bac9de --- /dev/null +++ b/libjava/testsuite/libjava.lang/err8.out @@ -0,0 +1 @@ +OK diff --git a/libjava/testsuite/libjava.lang/err9.jar b/libjava/testsuite/libjava.lang/err9.jar Binary files differnew file mode 100644 index 000000000..cb629e3f9 --- /dev/null +++ b/libjava/testsuite/libjava.lang/err9.jar diff --git a/libjava/testsuite/libjava.lang/err9.java b/libjava/testsuite/libjava.lang/err9.java new file mode 100644 index 000000000..a6edd7198 --- /dev/null +++ b/libjava/testsuite/libjava.lang/err9.java @@ -0,0 +1,32 @@ +/*--------------------------------------------------------------------------*/ +/* File name : err9.java */ +/* : */ +/* Cause : When I use "labeled continue" in "for"statement, error */ +/* : */ +/* Message : In class `err9': */ +/* : In method `main(java.lang.String[])': */ +/* : 22: `continue' must be in loop. */ +/* : continue movehere; */ +/* : ^ */ +/* : 1 error */ +/*--------------------------------------------------------------------------*/ + +public class err9 { + public static void main(String[] args) { + int y = 0; + + movehere: for ( int x = 0; x < 10; x++ ) { + if ( x > 2 ) { + continue movehere; + } + y++; + } + + if ( y == 3 ) { + System.out.println("OK"); + } else { + System.out.println("NG:[3]-->[" +y+ "]"); + } + } +} + diff --git a/libjava/testsuite/libjava.lang/err9.out b/libjava/testsuite/libjava.lang/err9.out new file mode 100644 index 000000000..d86bac9de --- /dev/null +++ b/libjava/testsuite/libjava.lang/err9.out @@ -0,0 +1 @@ +OK diff --git a/libjava/testsuite/libjava.lang/final_inner.jar b/libjava/testsuite/libjava.lang/final_inner.jar Binary files differnew file mode 100644 index 000000000..0a37fd960 --- /dev/null +++ b/libjava/testsuite/libjava.lang/final_inner.jar diff --git a/libjava/testsuite/libjava.lang/final_inner.java b/libjava/testsuite/libjava.lang/final_inner.java new file mode 100644 index 000000000..40905b1fa --- /dev/null +++ b/libjava/testsuite/libjava.lang/final_inner.java @@ -0,0 +1,19 @@ +// Class final_inner +// Generated on Tue Jan 18 13:35:19 PST 2000 +// + +class final_inner { + + void foo (final String s, final int i) { + class bar { + void printI () { System.out.println (s+i); } + } + new bar ().printI (); + } + + public static void main (String[] arg) + { + System.out.println ("Testing class `final_inner'..."); + new final_inner ().foo ("The Number ", 666); + } +} diff --git a/libjava/testsuite/libjava.lang/final_inner.out b/libjava/testsuite/libjava.lang/final_inner.out new file mode 100644 index 000000000..8ac46cfcc --- /dev/null +++ b/libjava/testsuite/libjava.lang/final_inner.out @@ -0,0 +1,2 @@ +Testing class `final_inner'... +The Number 666 diff --git a/libjava/testsuite/libjava.lang/final_int.jar b/libjava/testsuite/libjava.lang/final_int.jar Binary files differnew file mode 100644 index 000000000..43feb70e0 --- /dev/null +++ b/libjava/testsuite/libjava.lang/final_int.jar diff --git a/libjava/testsuite/libjava.lang/final_int.java b/libjava/testsuite/libjava.lang/final_int.java new file mode 100644 index 000000000..e225c7b28 --- /dev/null +++ b/libjava/testsuite/libjava.lang/final_int.java @@ -0,0 +1,22 @@ +// Class final_int +// Generated on Sat Feb 12 01:27:46 PST 2000 + +class final_int { + + final int x = 30; + + class foo { + int bar () { + return x; + } + } + void bar () { + int x = this.new foo ().bar (); + System.out.println (x); + } + public static void main (String[] arg) + { + System.out.println ("Testing class `final_int'..."); + new final_int().bar (); + } +} diff --git a/libjava/testsuite/libjava.lang/final_int.out b/libjava/testsuite/libjava.lang/final_int.out new file mode 100644 index 000000000..a7cbe2c9a --- /dev/null +++ b/libjava/testsuite/libjava.lang/final_int.out @@ -0,0 +1,2 @@ +Testing class `final_int'... +30 diff --git a/libjava/testsuite/libjava.lang/final_static_and_friend.jar b/libjava/testsuite/libjava.lang/final_static_and_friend.jar Binary files differnew file mode 100644 index 000000000..ca7b2ad0a --- /dev/null +++ b/libjava/testsuite/libjava.lang/final_static_and_friend.jar diff --git a/libjava/testsuite/libjava.lang/final_static_and_friend.java b/libjava/testsuite/libjava.lang/final_static_and_friend.java new file mode 100644 index 000000000..b5ca6100d --- /dev/null +++ b/libjava/testsuite/libjava.lang/final_static_and_friend.java @@ -0,0 +1,17 @@ +// Class final_static_and_friend +// Generated on Sat Feb 12 01:58:38 PST 2000 + +class final_static_and_friend { + final int a = 34; + static int b = 34; + int c = 34; + void foo () + { + System.out.println (a+b+c); + } + public static void main (String[] arg) + { + new final_static_and_friend ().foo (); + } + +} diff --git a/libjava/testsuite/libjava.lang/final_static_and_friend.out b/libjava/testsuite/libjava.lang/final_static_and_friend.out new file mode 100644 index 000000000..257e56326 --- /dev/null +++ b/libjava/testsuite/libjava.lang/final_static_and_friend.out @@ -0,0 +1 @@ +102 diff --git a/libjava/testsuite/libjava.lang/indirect.jar b/libjava/testsuite/libjava.lang/indirect.jar Binary files differnew file mode 100644 index 000000000..bc772864f --- /dev/null +++ b/libjava/testsuite/libjava.lang/indirect.jar diff --git a/libjava/testsuite/libjava.lang/indirect.java b/libjava/testsuite/libjava.lang/indirect.java new file mode 100644 index 000000000..22bdebc5b --- /dev/null +++ b/libjava/testsuite/libjava.lang/indirect.java @@ -0,0 +1,33 @@ +// Class indirect +// Generated on Tue Nov 16 15:53:14 UTC 1999 +// Several indirection to enclosing class + +class indirect { + + private int foo; + + class indirect_inner { + class other { + class inner { + void test () { + int x = foo; + System.out.println ("x="+foo); + foo = 671; + } + } + } + + } + void foo () + { + foo = 670; + indirect_inner inn = this.new indirect_inner (); + this.new indirect_inner().new other().new inner ().test (); + System.out.println ("foo="+foo); + } + public static void main (String[] arg) + { + System.out.println ("Testing class `indirect'..."); + new indirect().foo (); + } +} diff --git a/libjava/testsuite/libjava.lang/indirect.out b/libjava/testsuite/libjava.lang/indirect.out new file mode 100644 index 000000000..7eb96f765 --- /dev/null +++ b/libjava/testsuite/libjava.lang/indirect.out @@ -0,0 +1,3 @@ +Testing class `indirect'... +x=670 +foo=671 diff --git a/libjava/testsuite/libjava.lang/indirect_read.jar b/libjava/testsuite/libjava.lang/indirect_read.jar Binary files differnew file mode 100644 index 000000000..d0835e990 --- /dev/null +++ b/libjava/testsuite/libjava.lang/indirect_read.jar diff --git a/libjava/testsuite/libjava.lang/indirect_read.java b/libjava/testsuite/libjava.lang/indirect_read.java new file mode 100644 index 000000000..48c53a8d0 --- /dev/null +++ b/libjava/testsuite/libjava.lang/indirect_read.java @@ -0,0 +1,33 @@ +// Class indirect_read +// Generated on Mon Nov 15 17:20:40 UTC 1999 +// + +class indirect_read { + + int foo; + + class indirect_read_inner { + void test () { + } + + class other { + void testx () { + int x = foo; + System.out.println ("x="+x); + } + } + + } + void foo () + { + foo = 670; + indirect_read_inner inn = this.new indirect_read_inner (); + indirect_read_inner.other o = inn.new other (); + o.testx (); + } + public static void main (String[] arg) + { + System.out.println ("Testing class `indirect_read'..."); + new indirect_read().foo (); + } +} diff --git a/libjava/testsuite/libjava.lang/indirect_read.out b/libjava/testsuite/libjava.lang/indirect_read.out new file mode 100644 index 000000000..bf9d42ad7 --- /dev/null +++ b/libjava/testsuite/libjava.lang/indirect_read.out @@ -0,0 +1,2 @@ +Testing class `indirect_read'... +x=670 diff --git a/libjava/testsuite/libjava.lang/indirect_write.jar b/libjava/testsuite/libjava.lang/indirect_write.jar Binary files differnew file mode 100644 index 000000000..9393a27a5 --- /dev/null +++ b/libjava/testsuite/libjava.lang/indirect_write.jar diff --git a/libjava/testsuite/libjava.lang/indirect_write.java b/libjava/testsuite/libjava.lang/indirect_write.java new file mode 100644 index 000000000..2f2bb7443 --- /dev/null +++ b/libjava/testsuite/libjava.lang/indirect_write.java @@ -0,0 +1,32 @@ +// Class indirect_write +// Generated on Tue Nov 16 15:01:24 UTC 1999 +// + +class indirect_write { + + int foo; + + class indirect_write_inner { + void test () { + } + + class other { + void testx () { + foo = 670; + } + } + + } + void foo () + { + indirect_write_inner inn = this.new indirect_write_inner (); + indirect_write_inner.other x = inn.new other (); + x.testx(); + System.out.println ("foo="+foo); + } + public static void main (String[] arg) + { + System.out.println ("Testing class `indirect_write'..."); + new indirect_write().foo (); + } +} diff --git a/libjava/testsuite/libjava.lang/indirect_write.out b/libjava/testsuite/libjava.lang/indirect_write.out new file mode 100644 index 000000000..92b293337 --- /dev/null +++ b/libjava/testsuite/libjava.lang/indirect_write.out @@ -0,0 +1,2 @@ +Testing class `indirect_write'... +foo=670 diff --git a/libjava/testsuite/libjava.lang/initexc.jar b/libjava/testsuite/libjava.lang/initexc.jar Binary files differnew file mode 100644 index 000000000..d43546fcb --- /dev/null +++ b/libjava/testsuite/libjava.lang/initexc.jar diff --git a/libjava/testsuite/libjava.lang/initexc.java b/libjava/testsuite/libjava.lang/initexc.java new file mode 100644 index 000000000..eda24ab03 --- /dev/null +++ b/libjava/testsuite/libjava.lang/initexc.java @@ -0,0 +1,37 @@ +public class initexc +{ + public static class fail + { + static + { + // Static initializers must be able to complete normally. + if (true) + throw new NullPointerException("nope"); + } + + public static int val () + { + return 23; + } + } + + public static void main (String[] args) + { + try + { + System.out.println (fail.val ()); + } + catch (ExceptionInInitializerError _) + { + // Ok. + } + try + { + System.out.println (fail.val ()); + } + catch (NoClassDefFoundError _) + { + // Ok. + } + } +} diff --git a/libjava/testsuite/libjava.lang/initexc.out b/libjava/testsuite/libjava.lang/initexc.out new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/libjava/testsuite/libjava.lang/initexc.out diff --git a/libjava/testsuite/libjava.lang/initfield.jar b/libjava/testsuite/libjava.lang/initfield.jar Binary files differnew file mode 100644 index 000000000..955cb02e8 --- /dev/null +++ b/libjava/testsuite/libjava.lang/initfield.jar diff --git a/libjava/testsuite/libjava.lang/initfield.java b/libjava/testsuite/libjava.lang/initfield.java new file mode 100644 index 000000000..4ee615480 --- /dev/null +++ b/libjava/testsuite/libjava.lang/initfield.java @@ -0,0 +1,20 @@ +// gcj generated buggy code when we reference a field of a +// non-constant member that we inherit from an interface. + +interface iface +{ + final value x = new value(); +} + +final class value +{ + Object field = "maude"; +} + +public class initfield implements iface +{ + public static void main(String[] args) + { + System.out.println(x.field); + } +} diff --git a/libjava/testsuite/libjava.lang/initfield.out b/libjava/testsuite/libjava.lang/initfield.out new file mode 100644 index 000000000..b3668c4d4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/initfield.out @@ -0,0 +1 @@ +maude diff --git a/libjava/testsuite/libjava.lang/inline.jar b/libjava/testsuite/libjava.lang/inline.jar Binary files differnew file mode 100644 index 000000000..b5c9449a8 --- /dev/null +++ b/libjava/testsuite/libjava.lang/inline.jar diff --git a/libjava/testsuite/libjava.lang/inline.java b/libjava/testsuite/libjava.lang/inline.java new file mode 100644 index 000000000..665852934 --- /dev/null +++ b/libjava/testsuite/libjava.lang/inline.java @@ -0,0 +1,35 @@ +public class inline +{ + static int factorial_1 (int n) + { + if (n > 0) + return n * factorial_1(n-1); + return 1; + } + + static int factorial_2 (int n) + { + if (n > 0) + return n * factorial_3(n-1); + return 1; + } + + static int factorial_3 (int n) + { + if (n > 0) + return n * factorial_2(n-1); + return 1; + } + + public static void main(String args[]) + { + if (factorial_1 (5) != 120) + System.out.println("This should not happen"); + else + System.out.println("OK"); + if (factorial_2 (5) != 120) + System.out.println("This should not happen"); + else + System.out.println("OK"); + } +} diff --git a/libjava/testsuite/libjava.lang/inline.out b/libjava/testsuite/libjava.lang/inline.out new file mode 100644 index 000000000..2c94e4837 --- /dev/null +++ b/libjava/testsuite/libjava.lang/inline.out @@ -0,0 +1,2 @@ +OK +OK diff --git a/libjava/testsuite/libjava.lang/inner1.jar b/libjava/testsuite/libjava.lang/inner1.jar Binary files differnew file mode 100644 index 000000000..382ba64ee --- /dev/null +++ b/libjava/testsuite/libjava.lang/inner1.jar diff --git a/libjava/testsuite/libjava.lang/inner1.java b/libjava/testsuite/libjava.lang/inner1.java new file mode 100644 index 000000000..820edf802 --- /dev/null +++ b/libjava/testsuite/libjava.lang/inner1.java @@ -0,0 +1,36 @@ +// Class inner1 +// Generated on Thu Nov 4 16:35:03 PST 1999 +// + +class inner1 { + int i; + void foo () { + inner1.z x1 = new z(); + inner1.z.y x = x1.new y(); + x.bar (); + x.print(); + } + public static void main (String[] arg) + { + System.out.println ("Testing class `inner1'..."); + new inner1 ().foo(); + } + class z { + int j; + void foo () { + inner1.this.i = 3; + } + class y { + int k; + void bar () { + inner1.this.i = 3; + z.this.j = 4; + y.this.k = 34; + } + void print () { + System.out.println ("i="+i+", j="+j+", k="+k); + } + } + } +} + diff --git a/libjava/testsuite/libjava.lang/inner1.out b/libjava/testsuite/libjava.lang/inner1.out new file mode 100644 index 000000000..d1f9ac815 --- /dev/null +++ b/libjava/testsuite/libjava.lang/inner1.out @@ -0,0 +1,2 @@ +Testing class `inner1'... +i=3, j=4, k=34 diff --git a/libjava/testsuite/libjava.lang/inner2.jar b/libjava/testsuite/libjava.lang/inner2.jar Binary files differnew file mode 100644 index 000000000..48e917e71 --- /dev/null +++ b/libjava/testsuite/libjava.lang/inner2.jar diff --git a/libjava/testsuite/libjava.lang/inner2.java b/libjava/testsuite/libjava.lang/inner2.java new file mode 100644 index 000000000..8ecb6f5f7 --- /dev/null +++ b/libjava/testsuite/libjava.lang/inner2.java @@ -0,0 +1,18 @@ +// Class inner2 +// Generated on Mon Dec 6 14:32:34 PST 1999 +// + +class inner2 { + int foo = 1999; + void foo () + { + inner2.this.foo = 666; + System.out.println (inner2.this.foo); + } + void print () {System.out.println (foo);} + public static void main (String[] arg) + { + System.out.println ("Testing class `inner2'..."); + new inner2().foo (); + } +} diff --git a/libjava/testsuite/libjava.lang/inner2.out b/libjava/testsuite/libjava.lang/inner2.out new file mode 100644 index 000000000..cd24c8659 --- /dev/null +++ b/libjava/testsuite/libjava.lang/inner2.out @@ -0,0 +1,2 @@ +Testing class `inner2'... +666 diff --git a/libjava/testsuite/libjava.lang/inner3.jar b/libjava/testsuite/libjava.lang/inner3.jar Binary files differnew file mode 100644 index 000000000..a128236a4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/inner3.jar diff --git a/libjava/testsuite/libjava.lang/inner3.java b/libjava/testsuite/libjava.lang/inner3.java new file mode 100644 index 000000000..e1cf9da37 --- /dev/null +++ b/libjava/testsuite/libjava.lang/inner3.java @@ -0,0 +1,23 @@ +// Class inner3 +// Generated on Tue Dec 7 11:37:43 PST 1999 +// + +class inner3 { + int bar; + public static void main (String[] arg) + { + System.out.println ("Testing class `inner3'..."); + new inner3().bar (); + } + void bar () { + t xx = this.new t (); + xx.bar (); + } + void foo () { bar = 3; } + class t { + void bar () { + inner3.this.foo (); + System.out.println (inner3.this.bar); + } + } +} diff --git a/libjava/testsuite/libjava.lang/inner3.out b/libjava/testsuite/libjava.lang/inner3.out new file mode 100644 index 000000000..a7ce991de --- /dev/null +++ b/libjava/testsuite/libjava.lang/inner3.out @@ -0,0 +1,2 @@ +Testing class `inner3'... +3 diff --git a/libjava/testsuite/libjava.lang/inner4.jar b/libjava/testsuite/libjava.lang/inner4.jar Binary files differnew file mode 100644 index 000000000..cdfb0be4b --- /dev/null +++ b/libjava/testsuite/libjava.lang/inner4.jar diff --git a/libjava/testsuite/libjava.lang/inner4.java b/libjava/testsuite/libjava.lang/inner4.java new file mode 100644 index 000000000..983e668dc --- /dev/null +++ b/libjava/testsuite/libjava.lang/inner4.java @@ -0,0 +1,34 @@ +// Class inner4 +// Generated on Tue Dec 7 11:43:48 PST 1999 +// + +class inner4 { + static private int xyz () { return 3; } + private String f; + + String p () { + return "public String p()"; + } + + private String pp (int x, byte y, char c) { + return "private String pp("+x+", "+y+", "+c+")"; + } + + void foo () { + t xxx = this.new t(); + xxx.bar (); + pp (3, (byte)34, 'C'); + } + public static void main (String[] arg) + { + System.out.println ("Testing class `inner4'..."); + new inner4().foo(); + } + class t { + void bar () { + System.out.println (p ()); + System.out.println (pp (3, (byte)34, 'C')); + System.out.println (xyz ()); + } + } +} diff --git a/libjava/testsuite/libjava.lang/inner4.out b/libjava/testsuite/libjava.lang/inner4.out new file mode 100644 index 000000000..db879b58f --- /dev/null +++ b/libjava/testsuite/libjava.lang/inner4.out @@ -0,0 +1,4 @@ +Testing class `inner4'... +public String p() +private String pp(3, 34, C) +3 diff --git a/libjava/testsuite/libjava.lang/inner_array.jar b/libjava/testsuite/libjava.lang/inner_array.jar Binary files differnew file mode 100644 index 000000000..eddcff577 --- /dev/null +++ b/libjava/testsuite/libjava.lang/inner_array.jar diff --git a/libjava/testsuite/libjava.lang/inner_array.java b/libjava/testsuite/libjava.lang/inner_array.java new file mode 100644 index 000000000..69f31f026 --- /dev/null +++ b/libjava/testsuite/libjava.lang/inner_array.java @@ -0,0 +1,30 @@ +// Class inner_array +// Generated on Fri Nov 19 13:19:47 PST 1999 +// + +class inner_array { + + private int[] foo; + + class array_inner { + void test () { + int x = foo[2]; + System.out.println ("x="+x); + foo [1] = 34; + foo [1]++; + } + } + void foo () + { + foo = new int [3]; + foo[2]=670; + array_inner inn = this.new array_inner (); + inn.test (); + System.out.println ("foo[1]="+foo[1]); + } + public static void main (String[] arg) + { + System.out.println ("Testing class `inner_array'..."); + new inner_array().foo (); + } +} diff --git a/libjava/testsuite/libjava.lang/inner_array.out b/libjava/testsuite/libjava.lang/inner_array.out new file mode 100644 index 000000000..88b92874a --- /dev/null +++ b/libjava/testsuite/libjava.lang/inner_array.out @@ -0,0 +1,3 @@ +Testing class `inner_array'... +x=670 +foo[1]=35 diff --git a/libjava/testsuite/libjava.lang/inner_interface.jar b/libjava/testsuite/libjava.lang/inner_interface.jar Binary files differnew file mode 100644 index 000000000..b85f38ac0 --- /dev/null +++ b/libjava/testsuite/libjava.lang/inner_interface.jar diff --git a/libjava/testsuite/libjava.lang/inner_interface.java b/libjava/testsuite/libjava.lang/inner_interface.java new file mode 100644 index 000000000..b1e6789a9 --- /dev/null +++ b/libjava/testsuite/libjava.lang/inner_interface.java @@ -0,0 +1,27 @@ +// Class inner_interface +// Generated on Fri Feb 11 16:29:04 PST 2000 +// Simple inner interface example. + +class inner_interface { + interface bar { + static final int field = 14022000; + public void inner_interface (); + } + + class baz implements inner_interface.bar { + public void inner_interface () + { + System.out.println ("This is baz.inner_interface "+field); + } + } + + void x () { + this.new baz ().inner_interface (); + } + + public static void main (String[] arg) + { + System.out.println ("Testing class `inner_interface'..."); + new inner_interface ().x(); + } +} diff --git a/libjava/testsuite/libjava.lang/inner_interface.out b/libjava/testsuite/libjava.lang/inner_interface.out new file mode 100644 index 000000000..0c977d54a --- /dev/null +++ b/libjava/testsuite/libjava.lang/inner_interface.out @@ -0,0 +1,2 @@ +Testing class `inner_interface'... +This is baz.inner_interface 14022000 diff --git a/libjava/testsuite/libjava.lang/instance.jar b/libjava/testsuite/libjava.lang/instance.jar Binary files differnew file mode 100644 index 000000000..769141097 --- /dev/null +++ b/libjava/testsuite/libjava.lang/instance.jar diff --git a/libjava/testsuite/libjava.lang/instance.java b/libjava/testsuite/libjava.lang/instance.java new file mode 100644 index 000000000..a509cb385 --- /dev/null +++ b/libjava/testsuite/libjava.lang/instance.java @@ -0,0 +1,48 @@ +// instance.java -- test the `instanceof' operator. + +import java.util.EventListener; + +public class instance implements EventListener +{ + public static void main (String[] args) + { + Object x1 = new instance (); + EventListener x2 = new instance (); + IllegalArgumentException iae + = new IllegalArgumentException ("any random class"); + String x3 = "zardoz"; + Object x4 = "zardoz"; + + // Test simple object stuff + System.out.println (x1 instanceof Object); + System.out.println (x1 instanceof IllegalArgumentException); + System.out.println (x1 instanceof EventListener); + System.out.println (x1 instanceof String); + System.out.println ("="); + + // Test with value which is an interface. + System.out.println (x2 instanceof Object); + System.out.println (x2 instanceof IllegalArgumentException); + System.out.println (x2 instanceof EventListener); + System.out.println ("="); + + // Test with value which is a final class. + System.out.println (x3 instanceof Object); + System.out.println (x3 instanceof String); + System.out.println ("="); + + // Test with value which is a random class. + System.out.println (iae instanceof Object); + System.out.println (iae instanceof IllegalArgumentException); + System.out.println (iae instanceof EventListener); + System.out.println ("="); + + // Test with value which is a final class, but not known + // statically. + System.out.println (x4 instanceof Object); + System.out.println (x4 instanceof IllegalArgumentException); + System.out.println (x4 instanceof EventListener); + System.out.println (x4 instanceof String); + System.out.println (x4 instanceof int[]); + } +} diff --git a/libjava/testsuite/libjava.lang/instance.out b/libjava/testsuite/libjava.lang/instance.out new file mode 100644 index 000000000..039881560 --- /dev/null +++ b/libjava/testsuite/libjava.lang/instance.out @@ -0,0 +1,21 @@ +true +false +true +false += +true +false +true += +true +true += +true +true +false += +true +false +false +true +false diff --git a/libjava/testsuite/libjava.lang/instinit.jar b/libjava/testsuite/libjava.lang/instinit.jar Binary files differnew file mode 100644 index 000000000..93684344e --- /dev/null +++ b/libjava/testsuite/libjava.lang/instinit.jar diff --git a/libjava/testsuite/libjava.lang/instinit.java b/libjava/testsuite/libjava.lang/instinit.java new file mode 100644 index 000000000..a72dc10db --- /dev/null +++ b/libjava/testsuite/libjava.lang/instinit.java @@ -0,0 +1,22 @@ +// Class instinit +// Generated on Wed Feb 2 12:31:16 PST 2000 +// Simple instance initializer test case. + +class instinit { + + String buffer = "No Oink! Oink!"; + + /* Instance initializer */ + { + System.out.println ("Oinking..."); + } + { + buffer = "Oink! Oink!"; + } + + public static void main (String[] arg) + { + System.out.println ("Testing class `instinit'..."); + System.out.println (new instinit ().buffer); + } +} diff --git a/libjava/testsuite/libjava.lang/instinit.out b/libjava/testsuite/libjava.lang/instinit.out new file mode 100644 index 000000000..50f2f5eb0 --- /dev/null +++ b/libjava/testsuite/libjava.lang/instinit.out @@ -0,0 +1,3 @@ +Testing class `instinit'... +Oinking... +Oink! Oink! diff --git a/libjava/testsuite/libjava.lang/instinit2.jar b/libjava/testsuite/libjava.lang/instinit2.jar Binary files differnew file mode 100644 index 000000000..7573a0dd8 --- /dev/null +++ b/libjava/testsuite/libjava.lang/instinit2.jar diff --git a/libjava/testsuite/libjava.lang/instinit2.java b/libjava/testsuite/libjava.lang/instinit2.java new file mode 100644 index 000000000..dcab178ec --- /dev/null +++ b/libjava/testsuite/libjava.lang/instinit2.java @@ -0,0 +1,31 @@ +// Class instinit2 +// Generated on Wed Feb 2 17:52:49 PST 2000 +// The instance initializer throws a checked exception. This is OK +// since the constructors declares it in its `throws' clause -- at +// least that's what the specs are saying. + +class instinit2 { + + String buffer = "Oink Oink!"; + + { + System.out.println ("Checking the oink..."); + if (buffer != null) + throw new Exception ("It just oinked"); + } + + instinit2 () throws Exception + { + System.out.println ("Ctor"); + } + + public static void main (String[] arg) + { + System.out.println ("Testing class `instinit2'..."); + try { + System.out.println (new instinit2 ().buffer); + } catch (Exception e) { + System.out.println (e.toString()); + } + } +} diff --git a/libjava/testsuite/libjava.lang/instinit2.out b/libjava/testsuite/libjava.lang/instinit2.out new file mode 100644 index 000000000..b6c7351b8 --- /dev/null +++ b/libjava/testsuite/libjava.lang/instinit2.out @@ -0,0 +1,3 @@ +Testing class `instinit2'... +Checking the oink... +java.lang.Exception: It just oinked diff --git a/libjava/testsuite/libjava.lang/invoke_from_inner.jar b/libjava/testsuite/libjava.lang/invoke_from_inner.jar Binary files differnew file mode 100644 index 000000000..064e0184b --- /dev/null +++ b/libjava/testsuite/libjava.lang/invoke_from_inner.jar diff --git a/libjava/testsuite/libjava.lang/invoke_from_inner.java b/libjava/testsuite/libjava.lang/invoke_from_inner.java new file mode 100644 index 000000000..8659ac6d5 --- /dev/null +++ b/libjava/testsuite/libjava.lang/invoke_from_inner.java @@ -0,0 +1,37 @@ +// This test case once showed that `f[0].execute(x)' woudln't be +// expanded properly, attempting to retrieve this$0 to be used in +// place of `f[0]'. + +abstract class A { + abstract public void execute(C x); +} + +class C {} + +class Z extends A { + public void execute (C x) { + System.out.println ("Z.execute"); + } +} + +public class invoke_from_inner extends A { + + Z f[] = new Z[1]; + class D extends C { + D (C x) { + f[0].execute (x); + execute (x); + } + } + public void execute (C x) { + System.out.println ("invoke_from_inner.execute"); + } + + public static void main (String a[]) { + new invoke_from_inner().foo(); + } + void foo () { + f[0] = new Z(); + new D(new C()); + } +} diff --git a/libjava/testsuite/libjava.lang/invoke_from_inner.out b/libjava/testsuite/libjava.lang/invoke_from_inner.out new file mode 100644 index 000000000..1911e2f0d --- /dev/null +++ b/libjava/testsuite/libjava.lang/invoke_from_inner.out @@ -0,0 +1,2 @@ +Z.execute +invoke_from_inner.execute diff --git a/libjava/testsuite/libjava.lang/invokethrow.jar b/libjava/testsuite/libjava.lang/invokethrow.jar Binary files differnew file mode 100644 index 000000000..1344d624d --- /dev/null +++ b/libjava/testsuite/libjava.lang/invokethrow.jar diff --git a/libjava/testsuite/libjava.lang/invokethrow.java b/libjava/testsuite/libjava.lang/invokethrow.java new file mode 100644 index 000000000..8cf3ca0a5 --- /dev/null +++ b/libjava/testsuite/libjava.lang/invokethrow.java @@ -0,0 +1,35 @@ +// Test a `throw' across a libffi call. + +import java.lang.reflect.*; + +public class invokethrow +{ + public static void doit () throws Throwable + { + throw new Throwable ("hi!"); + } + + public static void main (String[] args) + { + Class k = invokethrow.class; + try + { + Class[] noargs = new Class[0]; + Method m = k.getMethod ("doit", noargs); + m.invoke (null, null); + } + catch (InvocationTargetException x1) + { + System.out.println (x1.getTargetException ().getMessage ()); + } + catch (UnsupportedOperationException _) + { + // Some systems don't support invocation, in which case we + // will fake a passing result. + System.out.println ("hi!"); + } + catch (Throwable _) + { + } + } +} diff --git a/libjava/testsuite/libjava.lang/invokethrow.out b/libjava/testsuite/libjava.lang/invokethrow.out new file mode 100644 index 000000000..32aad8c35 --- /dev/null +++ b/libjava/testsuite/libjava.lang/invokethrow.out @@ -0,0 +1 @@ +hi! diff --git a/libjava/testsuite/libjava.lang/klass.jar b/libjava/testsuite/libjava.lang/klass.jar Binary files differnew file mode 100644 index 000000000..269f96daf --- /dev/null +++ b/libjava/testsuite/libjava.lang/klass.jar diff --git a/libjava/testsuite/libjava.lang/klass.java b/libjava/testsuite/libjava.lang/klass.java new file mode 100644 index 000000000..1578e6f42 --- /dev/null +++ b/libjava/testsuite/libjava.lang/klass.java @@ -0,0 +1,10 @@ +public class klass +{ + public static void main (String[] args) + { + Class ic1 = Integer.TYPE; + int[] foo = new int[3]; + Class ic2 = foo.getClass().getComponentType(); + System.out.println(ic1.equals(ic2)); + } +} diff --git a/libjava/testsuite/libjava.lang/klass.out b/libjava/testsuite/libjava.lang/klass.out new file mode 100644 index 000000000..27ba77dda --- /dev/null +++ b/libjava/testsuite/libjava.lang/klass.out @@ -0,0 +1 @@ +true diff --git a/libjava/testsuite/libjava.lang/lang.exp b/libjava/testsuite/libjava.lang/lang.exp new file mode 100644 index 000000000..5e46770c4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/lang.exp @@ -0,0 +1,35 @@ +global srcdir subdir + +catch { lsort [glob -nocomplain ${srcdir}/${subdir}/*.out] } srcfiles +verbose "srcfiles are $srcfiles" + +set prefix "" +foreach x $srcfiles { + regsub "\\.out$" $x "" prefix + set bname [file tail $prefix] + + if [file exists $srcdir/$subdir/${bname}.xpo] { + set resfile "$srcdir/$subdir/${bname}.xpo" + set options "regexp_match" + } else { + set resfile "${prefix}.out" + set options "" + } + + if [file exists ${prefix}.inp] { + set inpfile ${prefix}.inp + } else { + set inpfile "" + } + + set args [libjava_read_xfail $srcdir/$subdir/$bname.xfail] + + verbose "inpfile is $inpfile" + + test_libjava $options "${prefix}.jar" "" $inpfile $resfile $args + test_libjava $options "${prefix}.jar" "-O3" $inpfile $resfile $args +} + +# Local Variables: +# tcl-indent-level:4 +# End: diff --git a/libjava/testsuite/libjava.lang/md5test.jar b/libjava/testsuite/libjava.lang/md5test.jar Binary files differnew file mode 100644 index 000000000..d38891b79 --- /dev/null +++ b/libjava/testsuite/libjava.lang/md5test.jar diff --git a/libjava/testsuite/libjava.lang/md5test.java b/libjava/testsuite/libjava.lang/md5test.java new file mode 100644 index 000000000..ffd0a93cf --- /dev/null +++ b/libjava/testsuite/libjava.lang/md5test.java @@ -0,0 +1,63 @@ +import java.security.*; + +class md5test { + + + // gnu-crypto/source/gnu/testlet/gnu/crypto/hash/TestOfMD5.java + + public static void main(String[] argv) { + String[] strings = { + "a", + "abc", + "message digest", + "abcdefghijklmnopqrstuvwxyz", + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", + "12345678901234567890123456789012345678901234567890123456789012345678901234567890" + }; + + String[] expected = { + "0CC175B9C0F1B6A831C399E269772661", + "900150983CD24FB0D6963F7D28E17F72", + "F96B697D7CB7938D525A2F31AAF161D0", + "C3FCD3D76192E4007DFB496CCA67E13B", + "D174AB98D277D9F5A5611C2C9F419D9F", + "57EDF4A22BE3C955AC49DA2E2107B67A" + }; + + for (int i = 0; i < strings.length; i++) + testString(strings[i], expected[i]); + + } + + public static void testString(String string, String expected) { + + MessageDigest md=null; + try { + md = MessageDigest.getInstance("MD5"); + md.update(string.getBytes(), 0, string.length()); + String result = toString(md.digest()); + System.out.println(expected); + System.out.println(result); + if (!expected.equals(result)) + System.out.println("NOT EQUAL!"); + } catch (Exception x) { + x.printStackTrace(); + } + } + + public static String toString(byte[] ba) { + return toString(ba, 0, ba.length); + } + public static final String toString(byte[] ba, int offset, int length) { + char[] buf = new char[length * 2]; + for (int i = 0, j = 0, k; i < length; ) { + k = ba[offset + i++]; + buf[j++] = HEX_DIGITS[(k >>> 4) & 0x0F]; + buf[j++] = HEX_DIGITS[ k & 0x0F]; + } + return new String(buf); + } + + private static final char[] HEX_DIGITS = "0123456789ABCDEF".toCharArray(); + +} diff --git a/libjava/testsuite/libjava.lang/md5test.out b/libjava/testsuite/libjava.lang/md5test.out new file mode 100644 index 000000000..0dd90c39d --- /dev/null +++ b/libjava/testsuite/libjava.lang/md5test.out @@ -0,0 +1,12 @@ +0CC175B9C0F1B6A831C399E269772661 +0CC175B9C0F1B6A831C399E269772661 +900150983CD24FB0D6963F7D28E17F72 +900150983CD24FB0D6963F7D28E17F72 +F96B697D7CB7938D525A2F31AAF161D0 +F96B697D7CB7938D525A2F31AAF161D0 +C3FCD3D76192E4007DFB496CCA67E13B +C3FCD3D76192E4007DFB496CCA67E13B +D174AB98D277D9F5A5611C2C9F419D9F +D174AB98D277D9F5A5611C2C9F419D9F +57EDF4A22BE3C955AC49DA2E2107B67A +57EDF4A22BE3C955AC49DA2E2107B67A diff --git a/libjava/testsuite/libjava.lang/multiple_finit.jar b/libjava/testsuite/libjava.lang/multiple_finit.jar Binary files differnew file mode 100644 index 000000000..cd8152284 --- /dev/null +++ b/libjava/testsuite/libjava.lang/multiple_finit.jar diff --git a/libjava/testsuite/libjava.lang/multiple_finit.java b/libjava/testsuite/libjava.lang/multiple_finit.java new file mode 100644 index 000000000..a05ecb381 --- /dev/null +++ b/libjava/testsuite/libjava.lang/multiple_finit.java @@ -0,0 +1,28 @@ +// Class multiple_finit +// Generated on Mon Jan 3 20:07:18 PST 2000 +// + +class multiple_finit { + + int foo = 99; + + class multiple_finit_inner { + int inner = 34; + void test () { + System.out.println (inner); + System.out.println (foo); + } + } + void foo (String s) + { + multiple_finit_inner inn = this.new multiple_finit_inner (); + inn.test (); + System.out.println (foo); + } + void testx () { } + public static void main (String[] arg) + { + System.out.println ("Testing class `multiple_finit'..."); + new multiple_finit().foo (""); + } +} diff --git a/libjava/testsuite/libjava.lang/multiple_finit.out b/libjava/testsuite/libjava.lang/multiple_finit.out new file mode 100644 index 000000000..65ee05ff1 --- /dev/null +++ b/libjava/testsuite/libjava.lang/multiple_finit.out @@ -0,0 +1,4 @@ +Testing class `multiple_finit'... +34 +99 +99 diff --git a/libjava/testsuite/libjava.lang/negzero.jar b/libjava/testsuite/libjava.lang/negzero.jar Binary files differnew file mode 100644 index 000000000..1f23c61da --- /dev/null +++ b/libjava/testsuite/libjava.lang/negzero.jar diff --git a/libjava/testsuite/libjava.lang/negzero.java b/libjava/testsuite/libjava.lang/negzero.java new file mode 100644 index 000000000..53b9da2c4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/negzero.java @@ -0,0 +1,8 @@ +public class negzero +{ + public static void main(String[] args) + { + System.out.println(-0.0); + System.out.println(-0.0f); + } +} diff --git a/libjava/testsuite/libjava.lang/negzero.out b/libjava/testsuite/libjava.lang/negzero.out new file mode 100644 index 000000000..e6ffe0d43 --- /dev/null +++ b/libjava/testsuite/libjava.lang/negzero.out @@ -0,0 +1,2 @@ +-0.0 +-0.0 diff --git a/libjava/testsuite/libjava.lang/nested_with_ctor.jar b/libjava/testsuite/libjava.lang/nested_with_ctor.jar Binary files differnew file mode 100644 index 000000000..31c5d456b --- /dev/null +++ b/libjava/testsuite/libjava.lang/nested_with_ctor.jar diff --git a/libjava/testsuite/libjava.lang/nested_with_ctor.java b/libjava/testsuite/libjava.lang/nested_with_ctor.java new file mode 100644 index 000000000..4560dc399 --- /dev/null +++ b/libjava/testsuite/libjava.lang/nested_with_ctor.java @@ -0,0 +1,27 @@ +// Class nested_with_ctor +// Generated on Mon Jan 31 18:31:47 PST 2000 +// The nested class contains explicit constructors. Their argument +// lists should be augmented with the alias initializer values when +// the ctors are seen declared (as opposed to generated.) + +class nested_with_ctor { + + void fct(final String s, final int i) + { + class nested { + String buffer = s+i; + String getString () { return buffer; } + nested (int i) { buffer = "(int)"+i; } + nested () {} + } + nested x = new nested (); + System.out.println (x.getString ()); + nested y = new nested (123); + System.out.println (y.getString ()); + } + public static void main (String[] arg) + { + System.out.println ("Testing class `nested_with_ctor'..."); + new nested_with_ctor ().fct ("Yikes!", 321); + } +} diff --git a/libjava/testsuite/libjava.lang/nested_with_ctor.out b/libjava/testsuite/libjava.lang/nested_with_ctor.out new file mode 100644 index 000000000..d130f1f88 --- /dev/null +++ b/libjava/testsuite/libjava.lang/nested_with_ctor.out @@ -0,0 +1,3 @@ +Testing class `nested_with_ctor'... +Yikes!321 +(int)123 diff --git a/libjava/testsuite/libjava.lang/newarray_overflow.jar b/libjava/testsuite/libjava.lang/newarray_overflow.jar Binary files differnew file mode 100644 index 000000000..65413ccb0 --- /dev/null +++ b/libjava/testsuite/libjava.lang/newarray_overflow.jar diff --git a/libjava/testsuite/libjava.lang/newarray_overflow.java b/libjava/testsuite/libjava.lang/newarray_overflow.java new file mode 100644 index 000000000..17370b537 --- /dev/null +++ b/libjava/testsuite/libjava.lang/newarray_overflow.java @@ -0,0 +1,88 @@ +/* This test checks for two slightly different overflow scenarios in + * array allocation. + * + * The first is that the number of bytes needed for an array size + * overflows on a 32 bit machine. + * + * The second is that on a 64 machine, the number of bytes silently + * gets truncated, resulting in too small an object being + * allocated. */ + +class newarray_overflow +{ + static boolean failed = false; + + static void int_check() + { + int[] x; + try + { + x = new int [1 << 30]; + } + catch (OutOfMemoryError e) + { + return; + } + /* If we really get away with it (64 bit machine), that's cool. */ + if (x == null) { + System.err.println ("int check: new returned null."); + failed = true; + return; + } + try + { + // Only check a few places so we don't thrash too badly. + for (int i = 0; i < x.length; i += (1 << 24)) + if (x[i] != 0) + failed = true; + } + catch (Throwable e) + { + System.err.print ("int check: "); + System.err.println (e); + failed = true; + } + } + + static void object_check() + { + Object[] x; + try + { + x = new Object [1 << 30]; + System.err.println ("Alloc succeeded."); + System.err.println (x); + } + catch (OutOfMemoryError e) + { + return; + } + /* If we really get away with it (64 bit machine), that's cool. */ + if (x == null) { + System.err.println ("Object check: new returned null."); + failed = true; + return; + } + try + { + for (int i = 0; i < x.length; i += (1 << 24)) + if (x[i] != null) + failed = true; + } + catch (Throwable e) + { + System.err.print ("Object check: "); + System.err.println (e); + failed = true; + } + } + + public static void main (String[] ignore) + { + int_check(); + object_check(); + + if (!failed) + System.out.println ("ok"); + } +} diff --git a/libjava/testsuite/libjava.lang/newarray_overflow.out b/libjava/testsuite/libjava.lang/newarray_overflow.out new file mode 100644 index 000000000..9766475a4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/newarray_overflow.out @@ -0,0 +1 @@ +ok diff --git a/libjava/testsuite/libjava.lang/override.jar b/libjava/testsuite/libjava.lang/override.jar Binary files differnew file mode 100644 index 000000000..ab734b88c --- /dev/null +++ b/libjava/testsuite/libjava.lang/override.jar diff --git a/libjava/testsuite/libjava.lang/override.java b/libjava/testsuite/libjava.lang/override.java new file mode 100644 index 000000000..94bb09cfc --- /dev/null +++ b/libjava/testsuite/libjava.lang/override.java @@ -0,0 +1,19 @@ +// Regression test that overrides a virtual method with a final one. + +class override1 +{ + public int x1 () { return 3; } +} + +public class override extends override1 +{ + public final int x1() { return 5; } + public final int x2() { return 7; } + + public static void main(String[] args) + { + override z = new override(); + System.out.println(z.x1()); + System.out.println(z.x2()); + } +} diff --git a/libjava/testsuite/libjava.lang/override.out b/libjava/testsuite/libjava.lang/override.out new file mode 100644 index 000000000..b3172d124 --- /dev/null +++ b/libjava/testsuite/libjava.lang/override.out @@ -0,0 +1,2 @@ +5 +7 diff --git a/libjava/testsuite/libjava.lang/pr100.jar b/libjava/testsuite/libjava.lang/pr100.jar Binary files differnew file mode 100644 index 000000000..a7f49216f --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr100.jar diff --git a/libjava/testsuite/libjava.lang/pr100.java b/libjava/testsuite/libjava.lang/pr100.java new file mode 100644 index 000000000..a9f3685cf --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr100.java @@ -0,0 +1,13 @@ +// PR 100 + +// Second call to hashcode causes SEGV when dynamically linking. + +public class pr100 +{ + public static void main(String[] args) { + pr100 ht = new pr100(); + + System.err.println(ht.hashCode()); + System.err.println(ht.getClass().hashCode()); + } +} diff --git a/libjava/testsuite/libjava.lang/pr100.xpo b/libjava/testsuite/libjava.lang/pr100.xpo new file mode 100644 index 000000000..d87ea2e88 --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr100.xpo @@ -0,0 +1,2 @@ +[0-9]+ +[0-9]+ diff --git a/libjava/testsuite/libjava.lang/pr109.jar b/libjava/testsuite/libjava.lang/pr109.jar Binary files differnew file mode 100644 index 000000000..fbcdf264d --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr109.jar diff --git a/libjava/testsuite/libjava.lang/pr109.java b/libjava/testsuite/libjava.lang/pr109.java new file mode 100644 index 000000000..17c4b2301 --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr109.java @@ -0,0 +1,29 @@ +// PR 109 + +// Running the test code produces the output "0" instead of the +// expected "01234". + +// The break statement exits both for-loops (not just the innermost +// one) if the (single statement) body of the outer for-loop is not +// enclosed in braces. Affects more deeply nested loops in the same +// way. + +public class pr109 +{ + public static void main (String argv[]) + { + int i, j; + + for (i = 0; i < 5; i++) + for (j = 0; j < 2; j++) + { + if (j == 1) + break; + System.out.print (i); + } + + // We print a newline here because otherwise the DejaGNU log + // file is screwed up. + System.out.println (); + } +} diff --git a/libjava/testsuite/libjava.lang/pr109.out b/libjava/testsuite/libjava.lang/pr109.out new file mode 100644 index 000000000..3521a84d0 --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr109.out @@ -0,0 +1 @@ +01234 diff --git a/libjava/testsuite/libjava.lang/pr13107.jar b/libjava/testsuite/libjava.lang/pr13107.jar Binary files differnew file mode 100644 index 000000000..89f4779d4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr13107.jar diff --git a/libjava/testsuite/libjava.lang/pr13107.java b/libjava/testsuite/libjava.lang/pr13107.java new file mode 100644 index 000000000..06d4c54bb --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr13107.java @@ -0,0 +1,25 @@ +class pr13107 +{ + public static void main(String[] args) + { + for (int i = 0; i < 1; i++) { + String s = "A"; + + if (s == "A") + continue; + + try{ + try{ + System.out.println(s); + } + finally{ + if (s != "A") + throw new Error(); + } + } + catch(Exception e){ + s = "B"; + } + } + } +} diff --git a/libjava/testsuite/libjava.lang/pr13107.out b/libjava/testsuite/libjava.lang/pr13107.out new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr13107.out diff --git a/libjava/testsuite/libjava.lang/pr13107_2.jar b/libjava/testsuite/libjava.lang/pr13107_2.jar Binary files differnew file mode 100644 index 000000000..5dad7ade9 --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr13107_2.jar diff --git a/libjava/testsuite/libjava.lang/pr13107_2.java b/libjava/testsuite/libjava.lang/pr13107_2.java new file mode 100644 index 000000000..dba3b249e --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr13107_2.java @@ -0,0 +1,19 @@ +public class pr13107_2 +{ + public static int foo (boolean b) + { + int i; + try { + if (b) return 1; + i= 2; + } + finally { + if (b) i = 3; + } + return i; + } + + public static void main(String[] args) + { + } +} diff --git a/libjava/testsuite/libjava.lang/pr13107_2.out b/libjava/testsuite/libjava.lang/pr13107_2.out new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr13107_2.out diff --git a/libjava/testsuite/libjava.lang/pr13107_3.jar b/libjava/testsuite/libjava.lang/pr13107_3.jar Binary files differnew file mode 100644 index 000000000..8fe327513 --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr13107_3.jar diff --git a/libjava/testsuite/libjava.lang/pr13107_3.java b/libjava/testsuite/libjava.lang/pr13107_3.java new file mode 100644 index 000000000..5ec914605 --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr13107_3.java @@ -0,0 +1,16 @@ +public class pr13107_3 +{ + public static void main(String[] args) + { + for (int i = 0; i < 1; i++) + { + try { + System.out.println(i); + } + finally { + if (i == 3) + continue; + } + } + } +} diff --git a/libjava/testsuite/libjava.lang/pr13107_3.out b/libjava/testsuite/libjava.lang/pr13107_3.out new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr13107_3.out @@ -0,0 +1 @@ +0 diff --git a/libjava/testsuite/libjava.lang/pr133.jar b/libjava/testsuite/libjava.lang/pr133.jar Binary files differnew file mode 100644 index 000000000..f9e36ef9b --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr133.jar diff --git a/libjava/testsuite/libjava.lang/pr133.java b/libjava/testsuite/libjava.lang/pr133.java new file mode 100644 index 000000000..42009f4c8 --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr133.java @@ -0,0 +1,34 @@ +// PR 133 + +// System.exit(0) appears to hang the program. + +public class pr133 { + public static void main(String argv[]) + { + String name; + + if (argv.length == 0) { + name = "Rocket J. Squirrel"; + } else { + name = argv[0]; + } + + new pr133(name).identifySelf(); + System.out.println("goodbye"); + + System.exit(0); + } + + public pr133 (String name) + { + v_name = name; + } + + public void identifySelf() + { + System.out.println("This is a pr133 instance named " + v_name); + System.out.println("Leaving identifySelf()..."); + } + + private String v_name; +} diff --git a/libjava/testsuite/libjava.lang/pr133.out b/libjava/testsuite/libjava.lang/pr133.out new file mode 100644 index 000000000..52098d807 --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr133.out @@ -0,0 +1,3 @@ +This is a pr133 instance named Rocket J. Squirrel +Leaving identifySelf()... +goodbye diff --git a/libjava/testsuite/libjava.lang/pr16789.jar b/libjava/testsuite/libjava.lang/pr16789.jar Binary files differnew file mode 100644 index 000000000..4c95e0417 --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr16789.jar diff --git a/libjava/testsuite/libjava.lang/pr16789.java b/libjava/testsuite/libjava.lang/pr16789.java new file mode 100644 index 000000000..64c43f304 --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr16789.java @@ -0,0 +1,15 @@ +// gcj used to generate incorrect bytecode for +// staticMethod().staticMethod() +public class pr16789 +{ + public void foo() + { + System.out.println(Thread.currentThread().holdsLock(this)); + } + + public static void main(String[] args) + { + new pr16789().foo(); + } +} + diff --git a/libjava/testsuite/libjava.lang/pr16789.out b/libjava/testsuite/libjava.lang/pr16789.out new file mode 100644 index 000000000..c508d5366 --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr16789.out @@ -0,0 +1 @@ +false diff --git a/libjava/testsuite/libjava.lang/pr17536.jar b/libjava/testsuite/libjava.lang/pr17536.jar Binary files differnew file mode 100644 index 000000000..513e4d92c --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr17536.jar diff --git a/libjava/testsuite/libjava.lang/pr17536.java b/libjava/testsuite/libjava.lang/pr17536.java new file mode 100644 index 000000000..7d94fd9b1 --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr17536.java @@ -0,0 +1,5 @@ +public class pr17536 { + public static void main(String[] args) { + System.out.println(int[].class.getClassLoader()); + } +} diff --git a/libjava/testsuite/libjava.lang/pr17536.out b/libjava/testsuite/libjava.lang/pr17536.out new file mode 100644 index 000000000..19765bd50 --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr17536.out @@ -0,0 +1 @@ +null diff --git a/libjava/testsuite/libjava.lang/pr179.jar b/libjava/testsuite/libjava.lang/pr179.jar Binary files differnew file mode 100644 index 000000000..2eaee64e9 --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr179.jar diff --git a/libjava/testsuite/libjava.lang/pr179.java b/libjava/testsuite/libjava.lang/pr179.java new file mode 100644 index 000000000..9fd4657e8 --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr179.java @@ -0,0 +1,49 @@ +// Extended regression test for the PR 179. +// +// This tests the ".class" language syntax, initialization behaviour for +// Class.isInstance() and Class.isAssignableFrom(), and isAssignableFrom() +// functionality in the event that an interface argument that is not +// implemented by any loaded class is given. +// Note that the desired output changed from 1.4 to 1.5. + +class A +{ + static + { + System.out.println("A initialized"); + } +} + +interface IA {} + +class B implements IA +{ + static + { + System.out.println("B initialized"); + } +} + +class C +{ + static + { + System.out.println("C initialized"); + } +} + +interface IB {} + +public class pr179 +{ + public static void main(String[] args) + { + System.out.println (A.class.isAssignableFrom (Object.class)); + System.out.println (IB.class.isAssignableFrom (B.class)); + System.out.println (IA.class.isAssignableFrom (B.class)); + A a = new A(); + System.out.println (C.class.isInstance (a)); + C c = new C(); + System.out.println (C.class.isInstance (c)); + } +} diff --git a/libjava/testsuite/libjava.lang/pr179.out b/libjava/testsuite/libjava.lang/pr179.out new file mode 100644 index 000000000..0a43def35 --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr179.out @@ -0,0 +1,7 @@ +false +false +true +A initialized +false +C initialized +true diff --git a/libjava/testsuite/libjava.lang/pr184.jar b/libjava/testsuite/libjava.lang/pr184.jar Binary files differnew file mode 100644 index 000000000..2770b3d11 --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr184.jar diff --git a/libjava/testsuite/libjava.lang/pr184.java b/libjava/testsuite/libjava.lang/pr184.java new file mode 100644 index 000000000..42175b38e --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr184.java @@ -0,0 +1,22 @@ +public class pr184 +{ + public static void main(String[] args) + { + pr184 n = null; + try + { + n.foo(); + } + catch (NullPointerException x) + { + System.out.println(x); + } + } + + int x = 2; + + final int foo() + { + return x; + }; +} diff --git a/libjava/testsuite/libjava.lang/pr184.out b/libjava/testsuite/libjava.lang/pr184.out new file mode 100644 index 000000000..7a72d865c --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr184.out @@ -0,0 +1 @@ +java.lang.NullPointerException diff --git a/libjava/testsuite/libjava.lang/pr21785.jar b/libjava/testsuite/libjava.lang/pr21785.jar Binary files differnew file mode 100644 index 000000000..e2edfd48a --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr21785.jar diff --git a/libjava/testsuite/libjava.lang/pr21785.java b/libjava/testsuite/libjava.lang/pr21785.java new file mode 100644 index 000000000..786975497 --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr21785.java @@ -0,0 +1,21 @@ +import java.io.*; + +public class pr21785 implements Serializable +{ + public static void main(String[] args) + { + try { + ByteArrayOutputStream outb = new ByteArrayOutputStream(); + ObjectOutputStream outs = new ObjectOutputStream(outb); + outs.writeObject(new pr21785()); + byte[] store = outb.toByteArray(); + + ByteArrayInputStream inb = new ByteArrayInputStream(store); + ObjectInputStream ins = new ObjectInputStream(inb); + ins.readObject(); + } + catch (Throwable e) { + throw new Error(e); + } + } +} diff --git a/libjava/testsuite/libjava.lang/pr21785.out b/libjava/testsuite/libjava.lang/pr21785.out new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr21785.out diff --git a/libjava/testsuite/libjava.lang/pr21844.jar b/libjava/testsuite/libjava.lang/pr21844.jar Binary files differnew file mode 100644 index 000000000..92c7be511 --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr21844.jar diff --git a/libjava/testsuite/libjava.lang/pr21844.java b/libjava/testsuite/libjava.lang/pr21844.java new file mode 100644 index 000000000..24ed01fce --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr21844.java @@ -0,0 +1,33 @@ +class pr21844base +{ + int modCount; + + public pr21844base(int x) + { + modCount = x; + } +} + +public class pr21844 extends pr21844base +{ + class inner + { + public int doit () + { + ++modCount; + return modCount; + } + } + + public pr21844(int x) + { + super(x); + } + + public static void main(String[] args) + { + pr21844 val = new pr21844(7); + inner i = val.new inner(); + System.out.println(i.doit()); + } +} diff --git a/libjava/testsuite/libjava.lang/pr21844.out b/libjava/testsuite/libjava.lang/pr21844.out new file mode 100644 index 000000000..45a4fb75d --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr21844.out @@ -0,0 +1 @@ +8 diff --git a/libjava/testsuite/libjava.lang/pr22211.jar b/libjava/testsuite/libjava.lang/pr22211.jar Binary files differnew file mode 100644 index 000000000..a743c4411 --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr22211.jar diff --git a/libjava/testsuite/libjava.lang/pr22211.java b/libjava/testsuite/libjava.lang/pr22211.java new file mode 100644 index 000000000..87a8e555c --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr22211.java @@ -0,0 +1,8 @@ +public class pr22211 +{ + public static void main(String[] args) + { + Thread x = new Thread(); + x.interrupt(); + } +} diff --git a/libjava/testsuite/libjava.lang/pr24321.jar b/libjava/testsuite/libjava.lang/pr24321.jar Binary files differnew file mode 100644 index 000000000..335298a4d --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr24321.jar diff --git a/libjava/testsuite/libjava.lang/pr24321.java b/libjava/testsuite/libjava.lang/pr24321.java new file mode 100644 index 000000000..513304b50 --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr24321.java @@ -0,0 +1,21 @@ +public class pr24321 { + static class Z { + static { + System.out.println("init"); + } + } + + static class Y extends Z { } + + public static Object x () { return new Object(); } + + public static void main(String[] args) throws Throwable + { + System.out.println(x() instanceof Z); + + ClassLoader cl = pr24321.class.getClassLoader(); + Class zk = Class.forName("pr24321$Z", false, cl); + Class yk = Class.forName("pr24321$Y", false, cl); + System.out.println(zk.isAssignableFrom(yk)); + } +} diff --git a/libjava/testsuite/libjava.lang/pr24321.out b/libjava/testsuite/libjava.lang/pr24321.out new file mode 100644 index 000000000..1d474d525 --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr24321.out @@ -0,0 +1,2 @@ +false +true diff --git a/libjava/testsuite/libjava.lang/pr25676.jar b/libjava/testsuite/libjava.lang/pr25676.jar Binary files differnew file mode 100644 index 000000000..c0e0d4c72 --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr25676.jar diff --git a/libjava/testsuite/libjava.lang/pr25676.java b/libjava/testsuite/libjava.lang/pr25676.java new file mode 100644 index 000000000..e79a2c23d --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr25676.java @@ -0,0 +1,12 @@ +public class pr25676 +{ + public static double g(double a, double b) + { + return Math.min(a, b); + } + public static void main(String a[]) + { + System.out.println (g(0.0, -0.0)); + System.out.println (g(-0.0, 0.0)); + } +} diff --git a/libjava/testsuite/libjava.lang/pr25676.out b/libjava/testsuite/libjava.lang/pr25676.out new file mode 100644 index 000000000..e6ffe0d43 --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr25676.out @@ -0,0 +1,2 @@ +-0.0 +-0.0 diff --git a/libjava/testsuite/libjava.lang/pr26390.jar b/libjava/testsuite/libjava.lang/pr26390.jar Binary files differnew file mode 100644 index 000000000..2320e406d --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr26390.jar diff --git a/libjava/testsuite/libjava.lang/pr26390.java b/libjava/testsuite/libjava.lang/pr26390.java new file mode 100644 index 000000000..09cca7ef9 --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr26390.java @@ -0,0 +1,45 @@ +public class pr26390 +{ + public interface ComponentPeer { + public void setBounds(); + } + + public interface ContainerPeer extends ComponentPeer { + } + + public interface WindowPeer extends ContainerPeer { + } + + public interface FramePeer extends WindowPeer { + } + + public static class SwingComponentPeer implements ComponentPeer { + public void setBounds() { + } + } + + public static class SwingContainerPeer + extends SwingComponentPeer implements ContainerPeer + { + } + + public static class SwingWindowPeer + extends SwingContainerPeer implements WindowPeer + { + } + + public static class SwingFramePeer + extends SwingWindowPeer implements FramePeer + { + public void setBounds() { + super.setBounds(); + } + } + + public static void main(String[] args) + { + SwingFramePeer s = new SwingFramePeer(); + s.setBounds(); + } +} + diff --git a/libjava/testsuite/libjava.lang/pr26390.out b/libjava/testsuite/libjava.lang/pr26390.out new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr26390.out diff --git a/libjava/testsuite/libjava.lang/pr26990.jar b/libjava/testsuite/libjava.lang/pr26990.jar Binary files differnew file mode 100644 index 000000000..32ec05673 --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr26990.jar diff --git a/libjava/testsuite/libjava.lang/pr26990.java b/libjava/testsuite/libjava.lang/pr26990.java new file mode 100644 index 000000000..88db93e3e --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr26990.java @@ -0,0 +1,13 @@ +public class pr26990 +{ + public static void main (String args[]) throws Exception + { + System.setSecurityManager(new SecurityManager() + { + public void checkExit(int status) + { + throw new SecurityException("This is a bug"); + } + }); + } +} diff --git a/libjava/testsuite/libjava.lang/pr26990.out b/libjava/testsuite/libjava.lang/pr26990.out new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr26990.out diff --git a/libjava/testsuite/libjava.lang/pr27171.jar b/libjava/testsuite/libjava.lang/pr27171.jar Binary files differnew file mode 100644 index 000000000..20422fb7e --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr27171.jar diff --git a/libjava/testsuite/libjava.lang/pr27171.java b/libjava/testsuite/libjava.lang/pr27171.java new file mode 100644 index 000000000..a07fea736 --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr27171.java @@ -0,0 +1,19 @@ +public class pr27171 { + + public static void main(String[] args) throws Throwable { + // Isolated low surrogate. + char x = 56478; // 0xdc9e + String xs = new String(new char[] { x }); + // Note that we fix a result for our implementation; but + // the JDK does something else. + System.out.println(xs.getBytes("UTF-8").length); + + // isolated high surrogate -- at end of input stream + char y = 0xdaee; + String ys = new String(new char[] { y }); + // Note that we fix a result for our implementation; but + // the JDK does something else. + System.out.println(ys.getBytes("UTF-8").length); + } +} + diff --git a/libjava/testsuite/libjava.lang/pr27171.out b/libjava/testsuite/libjava.lang/pr27171.out new file mode 100644 index 000000000..a5c880627 --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr27171.out @@ -0,0 +1,2 @@ +3 +3 diff --git a/libjava/testsuite/libjava.lang/pr6388.jar b/libjava/testsuite/libjava.lang/pr6388.jar Binary files differnew file mode 100644 index 000000000..5f4e4c0ed --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr6388.jar diff --git a/libjava/testsuite/libjava.lang/pr6388.java b/libjava/testsuite/libjava.lang/pr6388.java new file mode 100644 index 000000000..175e1d213 --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr6388.java @@ -0,0 +1,10 @@ +public class pr6388 +{ + public static void main (String[] args) + { + System.out.println (Integer.MIN_VALUE); + System.out.println (0x80000000); + System.out.println (Integer.MIN_VALUE == 0x80000000); + System.out.println (0x80000000 == 0x80000000); + } +} diff --git a/libjava/testsuite/libjava.lang/pr6388.out b/libjava/testsuite/libjava.lang/pr6388.out new file mode 100644 index 000000000..1a551d97f --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr6388.out @@ -0,0 +1,4 @@ +-2147483648 +-2147483648 +true +true diff --git a/libjava/testsuite/libjava.lang/pr83.jar b/libjava/testsuite/libjava.lang/pr83.jar Binary files differnew file mode 100644 index 000000000..68e29f8f8 --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr83.jar diff --git a/libjava/testsuite/libjava.lang/pr83.java b/libjava/testsuite/libjava.lang/pr83.java new file mode 100644 index 000000000..b209aff28 --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr83.java @@ -0,0 +1,39 @@ +// PR 83 + +/* + * test that caught null pointers exceptions in finalizers work correctly + * and that local variables are accessible in null pointer exception handlers. + */ +import java.io.*; + +public class pr83 { + + static String s; + + public static void main(String[] args) { + System.out.println(tryfinally() + s); + } + + public static String tryfinally() { + String yuck = null; + String local_s = null; + + try { + return "This is "; + } finally { + try { + local_s = "Perfect"; + /* trigger null pointer exception */ + String x = yuck.toLowerCase(); + } catch (Exception _) { + /* + * when the null pointer exception is caught, we must still + * be able to access local_s. + * Our return address for the finally clause must also still + * be intact. + */ + s = local_s; + } + } + } +} diff --git a/libjava/testsuite/libjava.lang/pr83.out b/libjava/testsuite/libjava.lang/pr83.out new file mode 100644 index 000000000..6a87582a8 --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr83.out @@ -0,0 +1 @@ +This is Perfect diff --git a/libjava/testsuite/libjava.lang/pr8415.jar b/libjava/testsuite/libjava.lang/pr8415.jar Binary files differnew file mode 100644 index 000000000..0701225fb --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr8415.jar diff --git a/libjava/testsuite/libjava.lang/pr8415.java b/libjava/testsuite/libjava.lang/pr8415.java new file mode 100644 index 000000000..d23fa1396 --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr8415.java @@ -0,0 +1,15 @@ +import java.lang.reflect.*; +public class pr8415 +{ + public static void meth () throws NullPointerException + { + throw new NullPointerException(); + } + + public static void main(String[] args) throws Throwable + { + Class k = pr8415.class; + Method m = k.getMethod ("meth", new Class[0]); + System.out.println(m); + } +} diff --git a/libjava/testsuite/libjava.lang/pr8415.out b/libjava/testsuite/libjava.lang/pr8415.out new file mode 100644 index 000000000..7589404f0 --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr8415.out @@ -0,0 +1 @@ +public static void pr8415.meth() throws java.lang.NullPointerException diff --git a/libjava/testsuite/libjava.lang/pr8676.jar b/libjava/testsuite/libjava.lang/pr8676.jar Binary files differnew file mode 100644 index 000000000..a59730153 --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr8676.jar diff --git a/libjava/testsuite/libjava.lang/pr8676.java b/libjava/testsuite/libjava.lang/pr8676.java new file mode 100644 index 000000000..e28b15b1a --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr8676.java @@ -0,0 +1,11 @@ +public class pr8676 { + // The problem here was that this function couldn't be compiled to + // bytecode. + private void f(long j) { + boolean x = (1 << j) != 0; + } + + public static void main(String[] args) + { + } +} diff --git a/libjava/testsuite/libjava.lang/pr8676.out b/libjava/testsuite/libjava.lang/pr8676.out new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr8676.out diff --git a/libjava/testsuite/libjava.lang/pr8823.jar b/libjava/testsuite/libjava.lang/pr8823.jar Binary files differnew file mode 100644 index 000000000..bb2328433 --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr8823.jar diff --git a/libjava/testsuite/libjava.lang/pr8823.java b/libjava/testsuite/libjava.lang/pr8823.java new file mode 100644 index 000000000..3327ddf7a --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr8823.java @@ -0,0 +1,24 @@ +interface I +{ + public void m(); +} + +abstract class A implements I +{ + // But doesn't define m() +} + +public class pr8823 extends A // which means it implements I +{ + public static void main(String[] args) + { + // Defining c as either I or C will work. + A c = new pr8823(); + c.m(); + } + + public void m() + { + System.out.println("Hello World!"); + } +} diff --git a/libjava/testsuite/libjava.lang/pr8823.out b/libjava/testsuite/libjava.lang/pr8823.out new file mode 100644 index 000000000..980a0d5f1 --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr8823.out @@ -0,0 +1 @@ +Hello World! diff --git a/libjava/testsuite/libjava.lang/pr8945.jar b/libjava/testsuite/libjava.lang/pr8945.jar Binary files differnew file mode 100644 index 000000000..dd244b5b0 --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr8945.jar diff --git a/libjava/testsuite/libjava.lang/pr8945.java b/libjava/testsuite/libjava.lang/pr8945.java new file mode 100644 index 000000000..9c5dce89a --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr8945.java @@ -0,0 +1,9 @@ +public class pr8945 +{ + public static void main(String[] args) + { + String foo = "hello"; + int pos = 3; + System.out.println(foo.substring(pos,++pos)); + } +} diff --git a/libjava/testsuite/libjava.lang/pr8945.out b/libjava/testsuite/libjava.lang/pr8945.out new file mode 100644 index 000000000..1f9d725a9 --- /dev/null +++ b/libjava/testsuite/libjava.lang/pr8945.out @@ -0,0 +1 @@ +l diff --git a/libjava/testsuite/libjava.lang/private_direct_read.jar b/libjava/testsuite/libjava.lang/private_direct_read.jar Binary files differnew file mode 100644 index 000000000..e44c0686e --- /dev/null +++ b/libjava/testsuite/libjava.lang/private_direct_read.jar diff --git a/libjava/testsuite/libjava.lang/private_direct_read.java b/libjava/testsuite/libjava.lang/private_direct_read.java new file mode 100644 index 000000000..46d8fc300 --- /dev/null +++ b/libjava/testsuite/libjava.lang/private_direct_read.java @@ -0,0 +1,26 @@ +// Class private_direct_read +// Generated on Tue Nov 16 15:04:13 UTC 1999 +// + +class private_direct_read { + + private int foo; + + class private_direct_read_inner { + void test () { + int x = foo; + System.out.println ("x="+x); + } + } + void foo () + { + foo = 670; + private_direct_read_inner inn = this.new private_direct_read_inner (); + inn.test (); + } + public static void main (String[] arg) + { + System.out.println ("Testing class `private_direct_read'..."); + new private_direct_read().foo (); + } +} diff --git a/libjava/testsuite/libjava.lang/private_direct_read.out b/libjava/testsuite/libjava.lang/private_direct_read.out new file mode 100644 index 000000000..11d665d61 --- /dev/null +++ b/libjava/testsuite/libjava.lang/private_direct_read.out @@ -0,0 +1,2 @@ +Testing class `private_direct_read'... +x=670 diff --git a/libjava/testsuite/libjava.lang/private_direct_write.jar b/libjava/testsuite/libjava.lang/private_direct_write.jar Binary files differnew file mode 100644 index 000000000..06ef8bf6a --- /dev/null +++ b/libjava/testsuite/libjava.lang/private_direct_write.jar diff --git a/libjava/testsuite/libjava.lang/private_direct_write.java b/libjava/testsuite/libjava.lang/private_direct_write.java new file mode 100644 index 000000000..3c7a887f4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/private_direct_write.java @@ -0,0 +1,25 @@ +// Class private_direct_write +// Generated on Tue Nov 16 15:05:54 UTC 1999 +// + +class private_direct_write { + + private int foo; + + class private_direct_write_inner { + void test () { + foo = 670; + } + } + void foo () + { + private_direct_write_inner inn = this.new private_direct_write_inner (); + inn.test (); + System.out.println ("foo="+foo); + } + public static void main (String[] arg) + { + System.out.println ("Testing class `private_direct_write'..."); + new private_direct_write().foo (); + } +} diff --git a/libjava/testsuite/libjava.lang/private_indirect_read.jar b/libjava/testsuite/libjava.lang/private_indirect_read.jar Binary files differnew file mode 100644 index 000000000..1683111ac --- /dev/null +++ b/libjava/testsuite/libjava.lang/private_indirect_read.jar diff --git a/libjava/testsuite/libjava.lang/private_indirect_read.java b/libjava/testsuite/libjava.lang/private_indirect_read.java new file mode 100644 index 000000000..9a37bfdac --- /dev/null +++ b/libjava/testsuite/libjava.lang/private_indirect_read.java @@ -0,0 +1,32 @@ +// Class private_indirect_read +// Generated on Tue Nov 16 15:34:56 UTC 1999 +// + +class private_indirect_read { + + private int foo; + + class private_indirect_read_inner { + void test () { + } + class other { + void testx () { + int x = foo; + System.out.println ("x="+x); + } + } + + } + void foo () + { + foo=670; + private_indirect_read_inner inn = this.new private_indirect_read_inner (); + private_indirect_read_inner.other o = inn.new other (); + o.testx(); + } + public static void main (String[] arg) + { + System.out.println ("Testing class `private_indirect_read'..."); + new private_indirect_read().foo (); + } +} diff --git a/libjava/testsuite/libjava.lang/private_indirect_write.jar b/libjava/testsuite/libjava.lang/private_indirect_write.jar Binary files differnew file mode 100644 index 000000000..ace4c5a01 --- /dev/null +++ b/libjava/testsuite/libjava.lang/private_indirect_write.jar diff --git a/libjava/testsuite/libjava.lang/private_indirect_write.java b/libjava/testsuite/libjava.lang/private_indirect_write.java new file mode 100644 index 000000000..f706b20c9 --- /dev/null +++ b/libjava/testsuite/libjava.lang/private_indirect_write.java @@ -0,0 +1,32 @@ +// Class private_indirect_write +// Generated on Tue Nov 16 15:44:49 UTC 1999 +// + +class private_indirect_write { + + private int foo; + + class private_indirect_write_inner { + void test () { + } + + class other { + void test () { + foo = 670; + } + } + + } + void foo () + { + private_indirect_write_inner inn = this.new private_indirect_write_inner (); + private_indirect_write_inner.other x = inn.new other (); + x.test (); + System.out.println ("foo="+foo); + } + public static void main (String[] arg) + { + System.out.println ("Testing class `private_indirect_write'..."); + new private_indirect_write().foo (); + } +} diff --git a/libjava/testsuite/libjava.lang/search_outer.jar b/libjava/testsuite/libjava.lang/search_outer.jar Binary files differnew file mode 100644 index 000000000..136dbb353 --- /dev/null +++ b/libjava/testsuite/libjava.lang/search_outer.jar diff --git a/libjava/testsuite/libjava.lang/search_outer.java b/libjava/testsuite/libjava.lang/search_outer.java new file mode 100644 index 000000000..66567df8b --- /dev/null +++ b/libjava/testsuite/libjava.lang/search_outer.java @@ -0,0 +1,28 @@ +// Class search_outer.java +// Generated on Thu Nov 18 18:40:43 UTC 1999 +// + +class search_outer { + + private int foo; + + class search_outer_inner { + void test () { + foo++; + System.out.println ("foo="+foo); + foo += 3; + System.out.println ("foo="+foo); + } + } + void foo () + { + foo = 3; + search_outer_inner inn = this.new search_outer_inner (); + inn.test (); + } + public static void main (String[] arg) + { + System.out.println ("Testing class `search_outer'..."); + new search_outer().foo (); + } +} diff --git a/libjava/testsuite/libjava.lang/search_outer.out b/libjava/testsuite/libjava.lang/search_outer.out new file mode 100644 index 000000000..df2862d68 --- /dev/null +++ b/libjava/testsuite/libjava.lang/search_outer.out @@ -0,0 +1,3 @@ +Testing class `search_outer'... +foo=4 +foo=7 diff --git a/libjava/testsuite/libjava.lang/shatest.jar b/libjava/testsuite/libjava.lang/shatest.jar Binary files differnew file mode 100644 index 000000000..58c3d4f47 --- /dev/null +++ b/libjava/testsuite/libjava.lang/shatest.jar diff --git a/libjava/testsuite/libjava.lang/shatest.java b/libjava/testsuite/libjava.lang/shatest.java new file mode 100644 index 000000000..4cc6d4f41 --- /dev/null +++ b/libjava/testsuite/libjava.lang/shatest.java @@ -0,0 +1,39 @@ +import java.security.*; + +class shatest { + + // gnu-crypto/source/gnu/testlet/gnu/crypto/hash/TestOfSha160.java + + public static void main(String[] argv) { + MessageDigest md=null; + try { + md = MessageDigest.getInstance("SHA-1"); + } catch (Exception e) { + e.printStackTrace(); + } + md.update("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq".getBytes(), 0, 56); + String exp = "84983E441C3BD26EBAAE4AA1F95129E5E54670F1"; + String result = toString(md.digest()); + System.out.println(exp); + System.out.println(result); + if (!exp.equals(result)) + System.out.println("NOT EQUAL!"); + + } + + public static String toString(byte[] ba) { + return toString(ba, 0, ba.length); + } + public static final String toString(byte[] ba, int offset, int length) { + char[] buf = new char[length * 2]; + for (int i = 0, j = 0, k; i < length; ) { + k = ba[offset + i++]; + buf[j++] = HEX_DIGITS[(k >>> 4) & 0x0F]; + buf[j++] = HEX_DIGITS[ k & 0x0F]; + } + return new String(buf); + } + + private static final char[] HEX_DIGITS = "0123456789ABCDEF".toCharArray(); + +} diff --git a/libjava/testsuite/libjava.lang/shatest.out b/libjava/testsuite/libjava.lang/shatest.out new file mode 100644 index 000000000..3c19286fa --- /dev/null +++ b/libjava/testsuite/libjava.lang/shatest.out @@ -0,0 +1,2 @@ +84983E441C3BD26EBAAE4AA1F95129E5E54670F1 +84983E441C3BD26EBAAE4AA1F95129E5E54670F1 diff --git a/libjava/testsuite/libjava.lang/stacktrace.jar b/libjava/testsuite/libjava.lang/stacktrace.jar Binary files differnew file mode 100644 index 000000000..9ae27ab77 --- /dev/null +++ b/libjava/testsuite/libjava.lang/stacktrace.jar diff --git a/libjava/testsuite/libjava.lang/stacktrace.java b/libjava/testsuite/libjava.lang/stacktrace.java new file mode 100644 index 000000000..f8823a15f --- /dev/null +++ b/libjava/testsuite/libjava.lang/stacktrace.java @@ -0,0 +1,67 @@ +/* This test should test the stacktrace functionality. + We only print ClassName and MethName since the other information + like FileName and LineNumber are not consistent while building + native or interpreted and we want to test the output inside the dejagnu + test environment. + Also, we have to make the methods public since they might be optimized away + with inline's and then the -O3/-O2 execution might fail. +*/ +public class stacktrace { + public static void main(String args[]) { + try { + new stacktrace().a(); + } catch (TopException e) { + } + } + + public void a() throws TopException { + try { + b(); + } catch (MiddleException e) { + throw new TopException(e); + } + } + + public void b() throws MiddleException { + c(); + } + + public void c() throws MiddleException { + try { + d(); + } catch (BottomException e) { + throw new MiddleException(e); + } + } + + public void d() throws BottomException { + e(); + } + + public void e() throws BottomException { + throw new BottomException(); + } +} + +class TopException extends Exception { + TopException(Throwable cause) { + super(cause); + } +} + +class MiddleException extends Exception { + MiddleException(Throwable cause) { + super(cause); + } +} + +class BottomException extends Exception { + BottomException() { + StackTraceElement stack[] = this.getStackTrace(); + for (int i = 0; i < stack.length; i++) { + String className = stack[i].getClassName(); + String methodName = stack[i].getMethodName(); + System.out.println(className + "." + methodName); + } + } +} diff --git a/libjava/testsuite/libjava.lang/stacktrace.out b/libjava/testsuite/libjava.lang/stacktrace.out new file mode 100644 index 000000000..974f95130 --- /dev/null +++ b/libjava/testsuite/libjava.lang/stacktrace.out @@ -0,0 +1,6 @@ +stacktrace.e +stacktrace.d +stacktrace.c +stacktrace.b +stacktrace.a +stacktrace.main diff --git a/libjava/testsuite/libjava.lang/stringconst.jar b/libjava/testsuite/libjava.lang/stringconst.jar Binary files differnew file mode 100644 index 000000000..aab9f9391 --- /dev/null +++ b/libjava/testsuite/libjava.lang/stringconst.jar diff --git a/libjava/testsuite/libjava.lang/stringconst.java b/libjava/testsuite/libjava.lang/stringconst.java new file mode 100644 index 000000000..628574943 --- /dev/null +++ b/libjava/testsuite/libjava.lang/stringconst.java @@ -0,0 +1,22 @@ +// A reference to a String shouldn't cause an interface to be +// initialized. + +interface I +{ + String z = "zardoz"; + int q = stringconst.out ("q", 0); +} + +public class stringconst +{ + public static int out (String s, int i) + { + System.out.println (s + "=" + i); + return i; + } + + public static void main (String[] args) + { + System.out.println (I.z); + } +} diff --git a/libjava/testsuite/libjava.lang/stringconst.out b/libjava/testsuite/libjava.lang/stringconst.out new file mode 100644 index 000000000..1f0ac89bf --- /dev/null +++ b/libjava/testsuite/libjava.lang/stringconst.out @@ -0,0 +1 @@ +zardoz diff --git a/libjava/testsuite/libjava.lang/stringconst2.jar b/libjava/testsuite/libjava.lang/stringconst2.jar Binary files differnew file mode 100644 index 000000000..5a6bee37c --- /dev/null +++ b/libjava/testsuite/libjava.lang/stringconst2.jar diff --git a/libjava/testsuite/libjava.lang/stringconst2.java b/libjava/testsuite/libjava.lang/stringconst2.java new file mode 100644 index 000000000..c64bba4dd --- /dev/null +++ b/libjava/testsuite/libjava.lang/stringconst2.java @@ -0,0 +1,22 @@ +// Test to make sure a string constant is correctly initialized. + +import java.lang.reflect.*; + +public class stringconst2 +{ + public static final String q = "zardoz"; + + public static void main (String[] args) + { + try + { + Class k = Class.forName ("stringconst2"); + Field f = k.getField ("q"); + System.out.println (f.get (null)); + } + catch (Throwable t) + { + t.printStackTrace(); + } + } +} diff --git a/libjava/testsuite/libjava.lang/stringconst2.out b/libjava/testsuite/libjava.lang/stringconst2.out new file mode 100644 index 000000000..1f0ac89bf --- /dev/null +++ b/libjava/testsuite/libjava.lang/stringconst2.out @@ -0,0 +1 @@ +zardoz diff --git a/libjava/testsuite/libjava.lang/stub.jar b/libjava/testsuite/libjava.lang/stub.jar Binary files differnew file mode 100644 index 000000000..1c2fca17b --- /dev/null +++ b/libjava/testsuite/libjava.lang/stub.jar diff --git a/libjava/testsuite/libjava.lang/stub.java b/libjava/testsuite/libjava.lang/stub.java new file mode 100644 index 000000000..dfda004b3 --- /dev/null +++ b/libjava/testsuite/libjava.lang/stub.java @@ -0,0 +1,101 @@ +// Class stub +// Generated on Fri Feb 4 20:23:47 PST 2000 +// A somewhat thorough test of function invocator generated stubs. + +class stub { + + String ok; + + void OK () {System.out.println (ok);} + void OK (int i) {System.out.println (ok+" "+i);} + static void testOK () {System.out.println ("OK");} + static void testOK (int i) {System.out.println ("OK "+i); } + + // STATIC PRIVATE R_VALUE ARGS + // No No No No + void t1 () {OK();} + // Yes No No No + static void t2 () {testOK();} + // No Yes No No + private void t3 () {OK();} + // Yes Yes No No + static private void t4 () {testOK();} + // No No Yes No + int t5 () {return 5;} + // Yes No Yes No + static int t6 () {return 6;} + // No Yes Yes No + private int t7 () {return 7;} + // Yes Yes Yes No + static private int t8 () {return 8;} + + // No No No Yes + void t9 (int i) {OK(i);} + // Yes No No Yes + static void t10 (int i) {testOK(i);} + // No Yes No Yes + private void t11 (int i) {OK(i);} + // Yes Yes No Yes + static private void t12 (int i) {testOK(i);} + // No No Yes Yes + int t13 (int i) {return i*2;} + // Yes No Yes Yes + static int t14 (int i) {return i*3;} + // No Yes Yes Yes + private int t15 (int i) {return i*4;} + // Yes Yes Yes Yes + static private int t16 (int i) {return i*5;} + + void foo () + { + this.new bar ().test (); + } + class bar { + void test () { + ok = "OK"; + t1 (); + t2 (); + t3 (); + t4 (); + System.out.println (t5()); + System.out.println (t6()); + System.out.println (t7()); + System.out.println (t8()); + t9 (9); + t10 (10); + t11 (11); + t12 (12); + System.out.println (t13(13)); + System.out.println (t14(14)); + System.out.println (t15(15)); + System.out.println (t16(16)); + this.new baz ().test (); + } + class baz { + void test () { + ok = "OKOK"; + t1 (); + t2 (); + t3 (); + t4 (); + System.out.println (t5()); + System.out.println (t6()); + System.out.println (t7()); + System.out.println (t8()); + t9 (9); + t10 (10); + t11 (11); + t12 (12); + System.out.println (t13(13)); + System.out.println (t14(14)); + System.out.println (t15(15)); + System.out.println (t16(16)); + } + } + } + public static void main (String[] arg) + { + System.out.println ("Testing class `stub'..."); + new stub ().foo (); + } +} diff --git a/libjava/testsuite/libjava.lang/stub.out b/libjava/testsuite/libjava.lang/stub.out new file mode 100644 index 000000000..90937c6da --- /dev/null +++ b/libjava/testsuite/libjava.lang/stub.out @@ -0,0 +1,33 @@ +Testing class `stub'... +OK +OK +OK +OK +5 +6 +7 +8 +OK 9 +OK 10 +OK 11 +OK 12 +26 +42 +60 +80 +OKOK +OK +OKOK +OK +5 +6 +7 +8 +OKOK 9 +OK 10 +OKOK 11 +OK 12 +26 +42 +60 +80 diff --git a/libjava/testsuite/libjava.lang/test_long.jar b/libjava/testsuite/libjava.lang/test_long.jar Binary files differnew file mode 100644 index 000000000..f6b3ee0c3 --- /dev/null +++ b/libjava/testsuite/libjava.lang/test_long.jar diff --git a/libjava/testsuite/libjava.lang/test_long.java b/libjava/testsuite/libjava.lang/test_long.java new file mode 100644 index 000000000..3e876ac34 --- /dev/null +++ b/libjava/testsuite/libjava.lang/test_long.java @@ -0,0 +1,13 @@ +class test_long { + + public static void main (String[] arg) + { + long a, b, c, d, e; + e = 234L; + d = 0x8888888888888888L; + a = 0x0123456789ABCDEFL; + b = 0xFEDCBA9876543210L; + c = 0xF096A5B4C3B2E187L; + System.out.println (a+" "+b+" "+c+" "+d+" "+e); + } +} diff --git a/libjava/testsuite/libjava.lang/test_long.out b/libjava/testsuite/libjava.lang/test_long.out new file mode 100644 index 000000000..1f10f0cf8 --- /dev/null +++ b/libjava/testsuite/libjava.lang/test_long.out @@ -0,0 +1 @@ +81985529216486895 -81985529216486896 -1110518062304271993 -8608480567731124088 234 diff --git a/libjava/testsuite/libjava.lang/tmi.jar b/libjava/testsuite/libjava.lang/tmi.jar Binary files differnew file mode 100644 index 000000000..3e77d8641 --- /dev/null +++ b/libjava/testsuite/libjava.lang/tmi.jar diff --git a/libjava/testsuite/libjava.lang/tmi.java b/libjava/testsuite/libjava.lang/tmi.java new file mode 100644 index 000000000..be2395a96 --- /dev/null +++ b/libjava/testsuite/libjava.lang/tmi.java @@ -0,0 +1,43 @@ +// Class t +// Generated on Thu Nov 4 16:35:03 PST 1999 +// + +class tmi { + int i; + void foo () { + tmi.z x1 = new z(); + tmi.z.y x = x1.new y(); + x.bar (); + x.print(); + tmi.this.i = 666; + x.print(); + tmi.this.print(); + } + void print () { + System.out.println ("tmi.print()"); + } + public static void main (String[] arg) + { + System.out.println ("Testing class `tmi'..."); + new tmi ().foo(); + } + class z { + int j; + void foo () { + tmi.this.i = 3; + } + class y { + int k; + void bar () { + tmi.this.i = 3; + tmi.this.print (); + z.this.j = 4; + y.this.k = 34; + } + void print () { + System.out.println ("i="+i+", j="+j+", k="+k); + } + } + } +} + diff --git a/libjava/testsuite/libjava.lang/tmi.out b/libjava/testsuite/libjava.lang/tmi.out new file mode 100644 index 000000000..7c87756fd --- /dev/null +++ b/libjava/testsuite/libjava.lang/tmi.out @@ -0,0 +1,5 @@ +Testing class `tmi'... +tmi.print() +i=3, j=4, k=34 +i=666, j=4, k=34 +tmi.print() diff --git a/libjava/testsuite/libjava.lang/tp.jar b/libjava/testsuite/libjava.lang/tp.jar Binary files differnew file mode 100644 index 000000000..9cf6cb8cb --- /dev/null +++ b/libjava/testsuite/libjava.lang/tp.jar diff --git a/libjava/testsuite/libjava.lang/tp.java b/libjava/testsuite/libjava.lang/tp.java new file mode 100644 index 000000000..b6d9fbec4 --- /dev/null +++ b/libjava/testsuite/libjava.lang/tp.java @@ -0,0 +1,36 @@ +// Class tp +// Generated on Thu Nov 4 16:35:03 PST 1999 +// + +class tp { + private int i; + void foo () { + tp.z x1 = new z(); + tp.z.y x = x1.new y(); + x.bar (); + x.print(); + } + public static void main (String[] arg) + { + System.out.println ("Testing class `tp'..."); + new tp ().foo(); + } + class z { + private int j; + void foo () { + tp.this.i = 3; + } + class y { + private int k; + void bar () { + tp.this.i = 3; + z.this.j = 4; + y.this.k = 34; + } + void print () { + System.out.println ("i="+i+", j="+j+", k="+k); + } + } + } +} + diff --git a/libjava/testsuite/libjava.lang/tp.out b/libjava/testsuite/libjava.lang/tp.out new file mode 100644 index 000000000..f89aac653 --- /dev/null +++ b/libjava/testsuite/libjava.lang/tp.out @@ -0,0 +1,2 @@ +Testing class `tp'... +i=3, j=4, k=34 diff --git a/libjava/testsuite/libjava.lang/update_outer.jar b/libjava/testsuite/libjava.lang/update_outer.jar Binary files differnew file mode 100644 index 000000000..f6489d07e --- /dev/null +++ b/libjava/testsuite/libjava.lang/update_outer.jar diff --git a/libjava/testsuite/libjava.lang/update_outer.java b/libjava/testsuite/libjava.lang/update_outer.java new file mode 100644 index 000000000..b2e843703 --- /dev/null +++ b/libjava/testsuite/libjava.lang/update_outer.java @@ -0,0 +1,28 @@ +// Class update_outer +// Generated on Thu Nov 18 21:37:21 UTC 1999 +// + +class update_outer { + + private String foo; + + class update_outer_inner { + void test () { + foo += " M$"; + System.out.println ("foo=`"+foo+"'"); + } + + + } + void foo () + { + foo = "780"; + update_outer_inner inn = this.new update_outer_inner (); + inn.test (); + } + public static void main (String[] arg) + { + System.out.println ("Testing class `update_outer'..."); + new update_outer().foo (); + } +} diff --git a/libjava/testsuite/libjava.lang/update_outer.out b/libjava/testsuite/libjava.lang/update_outer.out new file mode 100644 index 000000000..cff7c5d5b --- /dev/null +++ b/libjava/testsuite/libjava.lang/update_outer.out @@ -0,0 +1,2 @@ +Testing class `update_outer'... +foo=`780 M$' diff --git a/libjava/testsuite/libjava.lang/utf8concat.jar b/libjava/testsuite/libjava.lang/utf8concat.jar Binary files differnew file mode 100644 index 000000000..55ba02a6a --- /dev/null +++ b/libjava/testsuite/libjava.lang/utf8concat.jar diff --git a/libjava/testsuite/libjava.lang/utf8concat.java b/libjava/testsuite/libjava.lang/utf8concat.java new file mode 100644 index 000000000..8b8f47ee1 --- /dev/null +++ b/libjava/testsuite/libjava.lang/utf8concat.java @@ -0,0 +1,11 @@ +public class utf8concat +{ + private static String s; + + public static void main (String[] args) + { + // This causes a crash at runtime because the compiler is + // producing an invalid UTF-8 string literal. + s = "abc" + (char)183; + } +} diff --git a/libjava/testsuite/libjava.lang/utf8concat.out b/libjava/testsuite/libjava.lang/utf8concat.out new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/libjava/testsuite/libjava.lang/utf8concat.out diff --git a/libjava/testsuite/libjava.lang/utilTest.jar b/libjava/testsuite/libjava.lang/utilTest.jar Binary files differnew file mode 100644 index 000000000..f3a4169ad --- /dev/null +++ b/libjava/testsuite/libjava.lang/utilTest.jar diff --git a/libjava/testsuite/libjava.lang/utilTest.java b/libjava/testsuite/libjava.lang/utilTest.java new file mode 100644 index 000000000..221bbf827 --- /dev/null +++ b/libjava/testsuite/libjava.lang/utilTest.java @@ -0,0 +1,58 @@ +class utilTest { + + public static void main(String[] argv) throws Throwable { + byte[] b = new byte[] { + 0x01, 0x23, 0x45, 0x67, (byte) 0x89, (byte) 0xab, + (byte) 0xcd, (byte) 0xef + }; + String s = "0123456789ABCDEF"; + System.out.println(toString(b)); + System.out.println(s); + System.out.println(toString(toBytesFromString(s))); + } + + // The following comes from the GNU Crypto project gnu.crypto.util.Util + + private static final char[] HEX_DIGITS = { + '0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F' + }; + + public static byte[] toBytesFromString(String s) { + int limit = s.length(); + byte[] result = new byte[((limit + 1) / 2)]; + int i = 0, j = 0; + if ((limit % 2) == 1) { + result[j++] = (byte) fromDigit(s.charAt(i++)); + } + while (i < limit) { + result[j++] = + (byte)((fromDigit(s.charAt(i++)) << 4) | fromDigit(s.charAt(i++))); + } + return result; + } + + public static int fromDigit(char c) { + if (c >= '0' && c <= '9') { + return c - '0'; + } else if (c >= 'A' && c <= 'F') { + return c - 'A' + 10; + } else if (c >= 'a' && c <= 'f') { + return c - 'a' + 10; + } else + throw new IllegalArgumentException("Invalid hexadecimal digit: " + c); + } + + public static String toString(byte[] ba) { + return toString(ba, 0, ba.length); + } + + public static final String toString(byte[] ba, int offset, int length) { + char[] buf = new char[length * 2]; + for (int i = 0, j = 0, k; i < length; ) { + k = ba[offset + i++]; + buf[j++] = HEX_DIGITS[(k >>> 4) & 0x0F]; + buf[j++] = HEX_DIGITS[ k & 0x0F]; + } + return new String(buf); + } +} diff --git a/libjava/testsuite/libjava.lang/utilTest.out b/libjava/testsuite/libjava.lang/utilTest.out new file mode 100644 index 000000000..036c36ebf --- /dev/null +++ b/libjava/testsuite/libjava.lang/utilTest.out @@ -0,0 +1,3 @@ +0123456789ABCDEF +0123456789ABCDEF +0123456789ABCDEF diff --git a/libjava/testsuite/libjava.lang/verify.jar b/libjava/testsuite/libjava.lang/verify.jar Binary files differnew file mode 100644 index 000000000..7946994b7 --- /dev/null +++ b/libjava/testsuite/libjava.lang/verify.jar diff --git a/libjava/testsuite/libjava.lang/verify.java b/libjava/testsuite/libjava.lang/verify.java new file mode 100644 index 000000000..71b4b5c43 --- /dev/null +++ b/libjava/testsuite/libjava.lang/verify.java @@ -0,0 +1,20 @@ +// Test for a verification regression. + +interface I { } +class D implements I { } +class E extends D { } + +public class verify +{ + static void call(I v) { } + + static void doit (Object x) + { + call ((x instanceof I) ? (I) x : new E ()); + } + + public static void main(String[] args) + { + doit(null); + } +} diff --git a/libjava/testsuite/libjava.lang/verify.out b/libjava/testsuite/libjava.lang/verify.out new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/libjava/testsuite/libjava.lang/verify.out |