From 873e84edecc5609bafd3b3ab82d7c37f4585149d Mon Sep 17 00:00:00 2001 From: aclement Date: Fri, 10 Dec 2004 13:30:30 +0000 Subject: Tests for declare parents where enums are involved. --- tests/java5/enums/EnumAspect03.aj | 8 ++++++-- tests/java5/enums/EnumAspect04.aj | 6 ++++++ tests/java5/enums/SimpleEnum2.java | 1 + tests/java5/enums/build.xml | 2 +- tests/java5/enums/testcode.jar | Bin 1385 -> 2174 bytes 5 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 tests/java5/enums/EnumAspect04.aj create mode 100644 tests/java5/enums/SimpleEnum2.java (limited to 'tests/java5') diff --git a/tests/java5/enums/EnumAspect03.aj b/tests/java5/enums/EnumAspect03.aj index df5cc375b..ecaa2e20e 100644 --- a/tests/java5/enums/EnumAspect03.aj +++ b/tests/java5/enums/EnumAspect03.aj @@ -1,7 +1,11 @@ +import java.lang.Enum; + public aspect EnumAspect03 { declare parents: SimpleEnum implements java.io.Serializable; - class C extends Enum { - } + class C extends Enum { } declare parents: SimpleEnum extends C; + + class D {} + declare parents: D extends Enum; } diff --git a/tests/java5/enums/EnumAspect04.aj b/tests/java5/enums/EnumAspect04.aj new file mode 100644 index 000000000..834d48807 --- /dev/null +++ b/tests/java5/enums/EnumAspect04.aj @@ -0,0 +1,6 @@ +import java.lang.Enum; + +public aspect EnumAspect04 { + declare parents: SimpleE* implements java.io.Serializable; + +} diff --git a/tests/java5/enums/SimpleEnum2.java b/tests/java5/enums/SimpleEnum2.java new file mode 100644 index 000000000..b591a5f3f --- /dev/null +++ b/tests/java5/enums/SimpleEnum2.java @@ -0,0 +1 @@ +public enum SimpleEnum2 { Black, White }; diff --git a/tests/java5/enums/build.xml b/tests/java5/enums/build.xml index 3f95a0b25..ee9507228 100644 --- a/tests/java5/enums/build.xml +++ b/tests/java5/enums/build.xml @@ -3,7 +3,7 @@ - + diff --git a/tests/java5/enums/testcode.jar b/tests/java5/enums/testcode.jar index 2322769d5..c9dd32ef7 100644 Binary files a/tests/java5/enums/testcode.jar and b/tests/java5/enums/testcode.jar differ -- cgit v1.2.3