]> source.dussan.org Git - aspectj.git/commitdiff
Tests for declare parents where enums are involved.
authoraclement <aclement>
Fri, 10 Dec 2004 13:30:30 +0000 (13:30 +0000)
committeraclement <aclement>
Fri, 10 Dec 2004 13:30:30 +0000 (13:30 +0000)
tests/java5/enums/EnumAspect03.aj
tests/java5/enums/EnumAspect04.aj [new file with mode: 0644]
tests/java5/enums/SimpleEnum2.java [new file with mode: 0644]
tests/java5/enums/build.xml
tests/java5/enums/testcode.jar

index df5cc375b914da72f266877c3bd8bad027e366e5..ecaa2e20eaeb00d6c1e175943a79c2f3f1fed2c9 100644 (file)
@@ -1,7 +1,11 @@
+import java.lang.Enum;\r
+\r
 public aspect EnumAspect03 {\r
   declare parents: SimpleEnum implements java.io.Serializable;\r
 \r
-  class C extends Enum {\r
-  }\r
+  class C extends Enum { }\r
   declare parents: SimpleEnum extends C;\r
+\r
+  class D {}\r
+  declare parents: D extends Enum;\r
 }\r
diff --git a/tests/java5/enums/EnumAspect04.aj b/tests/java5/enums/EnumAspect04.aj
new file mode 100644 (file)
index 0000000..834d488
--- /dev/null
@@ -0,0 +1,6 @@
+import java.lang.Enum;\r
+\r
+public aspect EnumAspect04 {\r
+  declare parents: SimpleE* implements java.io.Serializable;\r
+\r
+}\r
diff --git a/tests/java5/enums/SimpleEnum2.java b/tests/java5/enums/SimpleEnum2.java
new file mode 100644 (file)
index 0000000..b591a5f
--- /dev/null
@@ -0,0 +1 @@
+public enum SimpleEnum2 { Black, White };
index 3f95a0b25d3074939b8953d0baa16b83b4ce8bd9..ee95072289e75153ac1ac6298d8b5d6a03c63fa3 100644 (file)
@@ -3,7 +3,7 @@
     <target name="default" >
        <delete dir="output" failonerror="false"/>
        <mkdir dir="output"/>
-       <javac destdir="output" debug="on" srcdir="." includes="SimpleEnum.java"/>
+       <javac destdir="output" debug="on" srcdir="." includes="SimpleEnum*.java"/>
        <javac destdir="output" debug="on" srcdir="." includes="Enum.java"/>
        <zip file="testcode.jar" basedir="output" includes="**/*"/>
        <delete dir="output"/>
index 2322769d5ea91c92df5d25ea183243848839cfdf..c9dd32ef7a448dbdacb49c5fe9646c7aff27ec27 100644 (file)
Binary files a/tests/java5/enums/testcode.jar and b/tests/java5/enums/testcode.jar differ