Browse Source

test for Bug 29693

   Use of within with declare soft yeilds VerifyError 1.1b4
tags/V_1_1_b5
jhugunin 21 years ago
parent
commit
7e0c6a74f0
2 changed files with 39 additions and 0 deletions
  1. 6
    0
      tests/ajcTests.xml
  2. 33
    0
      tests/bugs/SoftWithin.java

+ 6
- 0
tests/ajcTests.xml View File

@@ -5533,4 +5533,10 @@
<compile files="PcdLookup.java" />
<run class="PcdLookup"/>
</ajc-test>
<ajc-test dir="bugs" pr="29691"
title="Static inner aspects cannot reference user defined pointcuts">
<compile files="SoftWithin.java" />
<run class="SoftWithin"/>
</ajc-test>
</suite>

+ 33
- 0
tests/bugs/SoftWithin.java View File

@@ -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);
}




Loading…
Cancel
Save