diff options
-rw-r--r-- | tests/ltw/aop-noxlintfile-nowarn.xml | 3 | ||||
-rw-r--r-- | tests/ltw/aop-noxlintfile-warnnone.xml | 3 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java | 8 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc160/ajc160.xml | 24 |
4 files changed, 38 insertions, 0 deletions
diff --git a/tests/ltw/aop-noxlintfile-nowarn.xml b/tests/ltw/aop-noxlintfile-nowarn.xml new file mode 100644 index 000000000..e0dfc74fb --- /dev/null +++ b/tests/ltw/aop-noxlintfile-nowarn.xml @@ -0,0 +1,3 @@ +<aspectj> + <weaver options="-Xlintfile:Xlint-empty.properties -nowarn"/> +</aspectj> diff --git a/tests/ltw/aop-noxlintfile-warnnone.xml b/tests/ltw/aop-noxlintfile-warnnone.xml new file mode 100644 index 000000000..243f75703 --- /dev/null +++ b/tests/ltw/aop-noxlintfile-warnnone.xml @@ -0,0 +1,3 @@ +<aspectj> + <weaver options="-Xlintfile:Xlint-empty.properties -warn:none"/> +</aspectj> diff --git a/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java b/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java index 660d31544..f819e3349 100644 --- a/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java @@ -24,6 +24,14 @@ public class Ajc160Tests extends org.aspectj.testing.XMLBasedAjcTestCase { public void testGenericFieldNPE_pr165885() { runTest("generic field npe");} public void testIncorrectOptimizationOfIstore_pr166084() { runTest("incorrect optimization of istore"); } public void testDualParameterizationsNotAllowed_pr165631() { runTest("dual parameterizations not allowed"); } + + public void testSuppressWarnings1_pr166238() { + runTest("Suppress warnings1"); + } + + public void testSuppressWarnings2_pr166238() { + runTest("Suppress warnings2"); + } ///////////////////////////////////////// public static Test suite() { diff --git a/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml b/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml index 1b157acaf..d0c440e41 100644 --- a/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml +++ b/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml @@ -24,6 +24,30 @@ <message kind="error" line="13" text="Cannot declare parent B"/> </compile> </ajc-test> + + <ajc-test dir="ltw" + title="Suppress warnings1" + keywords="xlint, ltw, nowarn, pr166238"> + <compile + files="Main.java" + > + </compile> + <run class="Main" ltw="aop-noxlintfile-nowarn.xml"> + <stderr/> <!-- no warnings from missing xlint file: they are suppressed --> + </run> + </ajc-test> + + <ajc-test dir="ltw" + title="Suppress warnings2" + keywords="xlint, ltw, nowarn, pr166238"> + <compile + files="Main.java" + > + </compile> + <run class="Main" ltw="aop-noxlintfile-warnnone.xml"> + <stderr/> <!-- no warnings from missing xlint file: they are suppressed --> + </run> + </ajc-test> <!-- second section - need a 1.6 vm --> |