This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[PATCH] Testsuite: two new test cases.
- To: java-patches at gcc dot gnu dot org
- Subject: [PATCH] Testsuite: two new test cases.
- From: Alexandre Petit-Bianco <apbianco at cygnus dot com>
- Date: Fri, 31 Aug 2001 20:41:34 -0700
- Reply-to: apbianco at cygnus dot com
I'm about to check in some compiler fixes, here are some test cases to
make sure these changes keep on working.
./A
2001-08-28 Alexandre Petit-Bianco <apbianco@redhat.com>
* libjava.compile/final_assignment_check.java: New file.
* libjava.compile/final_assignment_check.xfail: Likewise.
* libjava.compile/final_local_switch.java: Likewise.
Index: libjava.compile/final_assignment_check.java
===================================================================
RCS file: final_assignment_check.java
diff -N final_assignment_check.java
--- /dev/null Tue May 5 13:32:27 1998
+++ final_assignment_check.java Fri Aug 31 16:29:45 2001
@@ -0,0 +1,12 @@
+class f {
+ final static char c = 3;
+ final static byte b = 0.1;
+ final static short s = 3.5f;
+ final static int i = 4L;
+ final static long x = 2.5;
+ final static float y = 2.6;
+ final static String S = new Object ();
+ void foo () {
+ final int i = 2.1;
+ }
+}
Index: libjava.compile/final_assignment_check.xfail
===================================================================
RCS file: final_assignment_check.xfail
diff -N final_assignment_check.xfail
--- /dev/null Tue May 5 13:32:27 1998
+++ final_assignment_check.xfail Fri Aug 31 16:29:45 2001
@@ -0,0 +1 @@
+shouldfail
Index: libjava.compile/final_local_switch.java
===================================================================
RCS file: final_local_switch.java
diff -N final_local_switch.java
--- /dev/null Tue May 5 13:32:27 1998
+++ final_local_switch.java Fri Aug 31 16:29:45 2001
@@ -0,0 +1,16 @@
+// This bug was discovered while working on java/1413 (compiling freetds.)
+// http://gcc.gnu.org/ml/java-prs/2000-q4/msg00156.html
+// The following code should build.
+
+class final_local_switch {
+ void foo (int type) {
+ final byte CHARSET_CHANGE = (byte)3;
+ final byte CHARSET_CHANGES = (byte)4;
+ switch (type) {
+ case CHARSET_CHANGE:
+ break;
+ case CHARSET_CHANGES:
+ break;
+ }
+ }
+}