aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAndy Clement <aclement@gopivotal.com>2013-10-23 12:44:23 -0700
committerAndy Clement <aclement@gopivotal.com>2013-10-23 12:44:23 -0700
commitb2cd5fa175facc39bd0d1af5a4646b9b39c8bcda (patch)
tree1e05a3e93fffb9a38c207bb53256cc4bac34c5b8 /tests
parent07735499f752e0aa8988a8953f11ac72d576afdc (diff)
downloadaspectj-b2cd5fa175facc39bd0d1af5a4646b9b39c8bcda.tar.gz
aspectj-b2cd5fa175facc39bd0d1af5a4646b9b39c8bcda.zip
419279: more configurable lint options
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs174/pr419279/Code.java10
-rw-r--r--tests/src/org/aspectj/systemtest/ajc174/Ajc174Tests.java4
-rw-r--r--tests/src/org/aspectj/systemtest/ajc174/ajc174.xml24
3 files changed, 38 insertions, 0 deletions
diff --git a/tests/bugs174/pr419279/Code.java b/tests/bugs174/pr419279/Code.java
new file mode 100644
index 000000000..672d720ef
--- /dev/null
+++ b/tests/bugs174/pr419279/Code.java
@@ -0,0 +1,10 @@
+public aspect Code {
+ before(): execution(* *(String)) { }
+ before(): call(* someMethod(..)) {
+ System.out.println(thisJoinPoint);
+ }
+ public void foo() {
+ someMethod();
+ }
+ public void someMethod(){}
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc174/Ajc174Tests.java b/tests/src/org/aspectj/systemtest/ajc174/Ajc174Tests.java
index 1e300dd0a..bf7a49825 100644
--- a/tests/src/org/aspectj/systemtest/ajc174/Ajc174Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc174/Ajc174Tests.java
@@ -21,6 +21,10 @@ import org.aspectj.testing.XMLBasedAjcTestCase;
*/
public class Ajc174Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
+ public void testMoreConfigurableLint_419279() throws Exception {
+ runTest("more configurable lint");
+ }
+
public void testAnnotatedItd_418129() throws Exception {
runTest("annotated itd");
}
diff --git a/tests/src/org/aspectj/systemtest/ajc174/ajc174.xml b/tests/src/org/aspectj/systemtest/ajc174/ajc174.xml
index 5b47cf4d3..09a6c2957 100644
--- a/tests/src/org/aspectj/systemtest/ajc174/ajc174.xml
+++ b/tests/src/org/aspectj/systemtest/ajc174/ajc174.xml
@@ -2,6 +2,30 @@
<suite>
+ <ajc-test dir="bugs174/pr419279" title="more configurable lint">
+ <compile files="Code.java" options="-1.5">
+ <message kind="warning" text="advice defined in Code has not been applied [Xlint:adviceDidNotMatch]"/>
+ </compile>
+ <compile files="Code.java" options="-1.5 -Xlint:adviceDidNotMatch=ignore">
+ </compile>
+ <compile files="Code.java" options="-1.5 -Xlint:adviceDidNotMatch=error">
+ <message kind="error" text="advice defined in Code has not been applied [Xlint:adviceDidNotMatch]"/>
+ </compile>
+ <compile files="Code.java" options="-1.5 -Xlint:foo=bar">
+ <message kind="error" text="invalid Xlint key: foo"/>
+ </compile>
+ <compile files="Code.java" options="-1.5 -Xlint:adviceDidNotMatch=wibble">
+ <message kind="error" text="invalid Xlint message kind (must be one of ignore, warning, error): wibble"/>
+ </compile>
+ <compile files="Code.java" options="-1.5 -Xlint:adviceDidNotMatch=ignore{adviceDidNotMatch=error">
+ <message kind="error" text="advice defined in Code has not been applied [Xlint:adviceDidNotMatch]"/>
+ </compile>
+ <compile files="Code.java" options="-1.5 -Xlint:adviceDidNotMatch=error{noGuardForLazyTjp=error">
+ <message kind="error" text="advice defined in Code has not been applied [Xlint:adviceDidNotMatch]"/>
+ <message kind="error" text="can not build thisJoinPoint lazily for this advice since it has no suitable guard [Xlint:noGuardForLazyTjp]"/>
+ </compile>
+ </ajc-test>
+
<ajc-test dir="bugs174/pr418129" title="annotated itd">
<compile files="Target.java" options="-1.5 -showWeaveInfo">
<message kind="weave" text="Type 'Behavior' (Target.java) has intertyped method from 'Trait' (Target.java:'java.lang.String Behavior.hello()')"/>