aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/bugs154/pr166647/aop1.xml2
-rw-r--r--tests/src/org/aspectj/systemtest/ajc154/Ajc154Tests.java15
2 files changed, 15 insertions, 2 deletions
diff --git a/tests/bugs154/pr166647/aop1.xml b/tests/bugs154/pr166647/aop1.xml
index d4b88e7ef..fa5795a71 100644
--- a/tests/bugs154/pr166647/aop1.xml
+++ b/tests/bugs154/pr166647/aop1.xml
@@ -5,7 +5,7 @@
</concrete-aspect>
</aspects>
<!-- weaver options="-verbose -showWeaveInfo -debug"-->
- <weaver>
+ <weaver options="-verbose -debug">
<include within="a..*"/>
</weaver>
</aspectj> \ No newline at end of file
diff --git a/tests/src/org/aspectj/systemtest/ajc154/Ajc154Tests.java b/tests/src/org/aspectj/systemtest/ajc154/Ajc154Tests.java
index f381cda80..c2abd1bab 100644
--- a/tests/src/org/aspectj/systemtest/ajc154/Ajc154Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc154/Ajc154Tests.java
@@ -26,6 +26,7 @@ import org.aspectj.weaver.tools.FuzzyBoolean;
import org.aspectj.weaver.tools.MatchingContext;
import org.aspectj.weaver.tools.PointcutDesignatorHandler;
+import junit.framework.AssertionFailedError;
import junit.framework.Test;
/**
@@ -45,7 +46,19 @@ public class Ajc154Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
//public void testAfterThrowingAnnotationStyle_pr211674_2() { runTest("after throwing annotation style problem - 2");}
// crappy solution - see the bug
-// public void testCflowLtwProblem_pr166647_1() { runTest("ltw and cflow problem"); }
+ public void testCflowLtwProblem_pr166647_1() {
+ try {
+ runTest("ltw and cflow problem");
+ } catch (AssertionFailedError afe) {
+ // this is OK.... sadly
+ // at least lets check we warned the user it was going to happen:
+ String stderr = (getLastRunResult()==null?"":getLastRunResult().getStdErr());
+ // Expected line:
+ // [WeavingURLClassLoader] warning XML Defined aspects must be woven in cases where cflow pointcuts are involved. Currently the include/exclude patterns exclude 'x.Aspect2' [Xlint:mustWeaveXmlDefinedAspects]
+ assertTrue("Did not see warning about needing to weave xml defined aspects",stderr.indexOf("warning XML Defined aspects must be woven in cases where cflow pointcuts are involved.")!=-1);
+ assertTrue("Xlint warning was expected '[Xlint:mustWeaveXmlDefinedAspects]'",stderr.indexOf("[Xlint:mustWeaveXmlDefinedAspects]")!=-1);
+ }
+ }
// Testing some issues with declare at type
public void testDeclareAtTypeProblems_pr211052_1() { runTest("declare atType problems - 1"); }