From 57561d1fef451dfdf395d9983718918268687640 Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 2 Dec 2008 22:29:49 +0000 Subject: [PATCH] 171042: test and fix --- tests/bugs163/pr171042/Executable.java | 6 ++++++ tests/bugs163/pr171042/RunnableAspect.java | 7 +++++++ tests/bugs163/pr171042/TestClass.java | 13 ++++++++++++ .../systemtest/ajc163/Ajc163Tests.java | 20 ++++++++++--------- .../org/aspectj/systemtest/ajc163/ajc163.xml | 4 ++++ 5 files changed, 41 insertions(+), 9 deletions(-) create mode 100644 tests/bugs163/pr171042/Executable.java create mode 100644 tests/bugs163/pr171042/RunnableAspect.java create mode 100644 tests/bugs163/pr171042/TestClass.java diff --git a/tests/bugs163/pr171042/Executable.java b/tests/bugs163/pr171042/Executable.java new file mode 100644 index 000000000..79fa99147 --- /dev/null +++ b/tests/bugs163/pr171042/Executable.java @@ -0,0 +1,6 @@ +package test; + +public interface Executable { + + void execute(); +} diff --git a/tests/bugs163/pr171042/RunnableAspect.java b/tests/bugs163/pr171042/RunnableAspect.java new file mode 100644 index 000000000..ad172b08c --- /dev/null +++ b/tests/bugs163/pr171042/RunnableAspect.java @@ -0,0 +1,7 @@ +package test; + +public aspect RunnableAspect { + public void Executable.run() { execute(); } + declare parents: Executable implements Runnable; +} + diff --git a/tests/bugs163/pr171042/TestClass.java b/tests/bugs163/pr171042/TestClass.java new file mode 100644 index 000000000..645af793f --- /dev/null +++ b/tests/bugs163/pr171042/TestClass.java @@ -0,0 +1,13 @@ +package test; + +public class TestClass { + + public static void main(String[] args) { + Executable executable = new Executable() { + public void execute() { + + } + }; + } +} + diff --git a/tests/src/org/aspectj/systemtest/ajc163/Ajc163Tests.java b/tests/src/org/aspectj/systemtest/ajc163/Ajc163Tests.java index ade3cc854..87ac9b321 100644 --- a/tests/src/org/aspectj/systemtest/ajc163/Ajc163Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc163/Ajc163Tests.java @@ -32,18 +32,20 @@ public class Ajc163Tests extends org.aspectj.testing.XMLBasedAjcTestCase { runTest("getMethod returning null"); } + public void testItdOnAnonInner_pr171042() { + runTest("itd on anonymous inner"); + } + public void testMixedStyles_pr213751() { runTest("mixed styles"); } -/* - public void testHandles_pr249216c24() { - runTest("handles - escaped square brackets"); - IHierarchy top = AsmManager.lastActiveStructureModel.getHierarchy(); - IProgramElement itd = findElementAtLine(top.getRoot(), 4); - // System.out.println(itd.getHandleIdentifier()); - assertEquals("<{Handles.java}Handles)Ship.i)\\[\\[String;>;", itd.getHandleIdentifier()); - } -*/ + + /* + * public void testHandles_pr249216c24() { runTest("handles - escaped square brackets"); IHierarchy top = + * AsmManager.lastActiveStructureModel.getHierarchy(); IProgramElement itd = findElementAtLine(top.getRoot(), 4); // + * System.out.println(itd.getHandleIdentifier()); assertEquals("<{Handles.java}Handles)Ship.i)\\[\\[String;>;", + * itd.getHandleIdentifier()); } + */ public void testFQType_pr256937() { runTest("fully qualified return type"); IHierarchy top = AsmManager.lastActiveStructureModel.getHierarchy(); diff --git a/tests/src/org/aspectj/systemtest/ajc163/ajc163.xml b/tests/src/org/aspectj/systemtest/ajc163/ajc163.xml index 59cff5430..b5eb12932 100644 --- a/tests/src/org/aspectj/systemtest/ajc163/ajc163.xml +++ b/tests/src/org/aspectj/systemtest/ajc163/ajc163.xml @@ -31,6 +31,10 @@ + + + + -- 2.39.5