From 7e0c6a74f0f2f35be6724650fd3a09995efea978 Mon Sep 17 00:00:00 2001 From: jhugunin Date: Tue, 21 Jan 2003 18:44:29 +0000 Subject: test for Bug 29693 Use of within with declare soft yeilds VerifyError 1.1b4 --- tests/ajcTests.xml | 6 ++++++ tests/bugs/SoftWithin.java | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 tests/bugs/SoftWithin.java (limited to 'tests') diff --git a/tests/ajcTests.xml b/tests/ajcTests.xml index 6c2c2ad5b..f63bab218 100644 --- a/tests/ajcTests.xml +++ b/tests/ajcTests.xml @@ -5533,4 +5533,10 @@ + + + + + diff --git a/tests/bugs/SoftWithin.java b/tests/bugs/SoftWithin.java new file mode 100644 index 000000000..033922deb --- /dev/null +++ b/tests/bugs/SoftWithin.java @@ -0,0 +1,33 @@ +import org.aspectj.testing.Tester; +import org.aspectj.lang.*; +import java.io.*; + + +/** @testcase Bugzilla Bug 29691 + Static inner aspects cannot reference user defined pointcuts + + */ +public class SoftWithin { + + static void foo() throws IOException { + throw new IOException(); + } + + public static void main(String[] args) throws Exception{ + try { + foo(); + } catch (SoftException se) { + return; + } + Tester.checkFailed("should have got SoftException"); + } +} + + +aspect Soften { + + declare soft : IOException : within(SoftWithin); +} + + + -- cgit v1.2.3