summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwisberg <wisberg>2004-03-08 19:13:55 +0000
committerwisberg <wisberg>2004-03-08 19:13:55 +0000
commit5d0a49d51e5a469ca09c61bef75b824415fe83d5 (patch)
treee031b1cbd141e92dcb2f54bba817685c166902d4
parent92d0049be5785ab552e40ffc6a07fa5568fc18b4 (diff)
downloadaspectj-5d0a49d51e5a469ca09c61bef75b824415fe83d5.tar.gz
aspectj-5d0a49d51e5a469ca09c61bef75b824415fe83d5.zip
-xlintfile option support in the harness, and tests
-rw-r--r--tests/ajcHarnessTests.xml36
-rw-r--r--tests/ajcTestSuite.dtd1
-rw-r--r--tests/harness/xlintfile/TypeNotExposed.java8
-rw-r--r--tests/harness/xlintfile/tneError.properties7
-rw-r--r--tests/harness/xlintfile/tneIgnore.properties7
-rw-r--r--tests/readme-writing-compiler-tests.html9
6 files changed, 58 insertions, 10 deletions
diff --git a/tests/ajcHarnessTests.xml b/tests/ajcHarnessTests.xml
index 98c6f0e88..f90eaabdc 100644
--- a/tests/ajcHarnessTests.xml
+++ b/tests/ajcHarnessTests.xml
@@ -233,7 +233,7 @@
<run class="packageOne.Main"
options="new-event"/>
</ajc-test>
-<!-- disabled pending resolution of same in ajcTestsFailing.xml
+
<ajc-test dir="incremental/stringliteral"
keywords="incremental-test,fixme"
title="pass incrementally change only string literal size">
@@ -249,7 +249,6 @@
options="in longer packageOne.Main.main(..),
before main packageOne.Main"/>
</ajc-test>
--->
<ajc-test dir="incremental/defaultPackage/src"
title="pass test using prior classes">
@@ -293,8 +292,8 @@
</ajc-test>
- <!-- Expect two warnings when compiling -1.3 -->
<ajc-test dir="harness"
+ comment="Expect two warnings when compiling -1.3"
title="pass 2 compound warning -1.3">
<compile files="CompoundMessage.java" options="-1.3">
<message kind="warning" line="6">
@@ -306,20 +305,41 @@
</compile>
</ajc-test>
- <!-- Expect no warnings when compiling -1.4 -->
<ajc-test dir="harness"
+ comment="Expect no warnings when compiling -1.4"
title="pass 2 compound warning -1.4">
<compile files="CompoundMessage.java" options="-1.4"/>
</ajc-test>
- <!-- Actual errors on lines 5,6 are: 'Type mismatch: cannot convert from Integer to int'-->
- <!--ajc-test dir="harness"
- title="fail 2 error, but expecting more details">
+ <ajc-test dir="harness/xlintfile"
+ title="pass default xlintfile">
+ <compile files="TypeNotExposed.java">
+ <message kind="warning" line="4" text="xpose"/>
+ </compile>
+ </ajc-test>
+
+ <ajc-test dir="harness/xlintfile"
+ title="pass xlintfile promotes to error">
+ <compile files="TypeNotExposed.java"
+ xlintfile="tneError.properties">
+ <message kind="error" line="4" text="xpose"/>
+ </compile>
+ </ajc-test>
+
+ <ajc-test dir="harness/xlintfile"
+ title="pass xlintfile demotes to ignore">
+ <compile files="TypeNotExposed.java"
+ xlintfile="tneIgnore.properties"/>
+ </ajc-test>
+
+ <ajc-test dir="harness"
+ keywords="expect-fail"
+ title="fail 2 error, but expecting more details">
<compile files="ErrorTest.java">
<message kind="error" line="5" details="expecting more"/>
<message kind="error" line="6" details="details"/>
</compile>
- </ajc-test-->
+ </ajc-test>
</suite>
diff --git a/tests/ajcTestSuite.dtd b/tests/ajcTestSuite.dtd
index b446d2d7d..19d172bc2 100644
--- a/tests/ajcTestSuite.dtd
+++ b/tests/ajcTestSuite.dtd
@@ -24,6 +24,7 @@
<!ATTLIST compile extdirs CDATA #IMPLIED >
<!ATTLIST compile options CDATA #IMPLIED >
<!ATTLIST compile sourceroots CDATA #IMPLIED >
+ <!ATTLIST compile xlintfile CDATA #IMPLIED >
<!ELEMENT inc-compile (dir-changes*,message*)>
<!ATTLIST inc-compile tag CDATA #REQUIRED >
diff --git a/tests/harness/xlintfile/TypeNotExposed.java b/tests/harness/xlintfile/TypeNotExposed.java
new file mode 100644
index 000000000..318c19281
--- /dev/null
+++ b/tests/harness/xlintfile/TypeNotExposed.java
@@ -0,0 +1,8 @@
+
+
+public aspect TypeNotExposed {
+ public void Object.doRun() { // 4 typeNotExposedToWeaver
+ }
+}
+
+
diff --git a/tests/harness/xlintfile/tneError.properties b/tests/harness/xlintfile/tneError.properties
new file mode 100644
index 000000000..682f2ade9
--- /dev/null
+++ b/tests/harness/xlintfile/tneError.properties
@@ -0,0 +1,7 @@
+invalidAbsoluteTypeName = ignore
+invalidWildcardTypeName = ignore
+unresolvableMember = ignore
+typeNotExposedToWeaver = error
+shadowNotInStructure = ignore
+unmatchedSuperTypeInCall = ignore
+canNotImplementLazyTjp = ignore \ No newline at end of file
diff --git a/tests/harness/xlintfile/tneIgnore.properties b/tests/harness/xlintfile/tneIgnore.properties
new file mode 100644
index 000000000..ebb03b016
--- /dev/null
+++ b/tests/harness/xlintfile/tneIgnore.properties
@@ -0,0 +1,7 @@
+invalidAbsoluteTypeName = ignore
+invalidWildcardTypeName = ignore
+unresolvableMember = ignore
+typeNotExposedToWeaver = ignore
+shadowNotInStructure = ignore
+unmatchedSuperTypeInCall = ignore
+canNotImplementLazyTjp = ignore \ No newline at end of file
diff --git a/tests/readme-writing-compiler-tests.html b/tests/readme-writing-compiler-tests.html
index 7266ceeba..120f9dc2b 100644
--- a/tests/readme-writing-compiler-tests.html
+++ b/tests/readme-writing-compiler-tests.html
@@ -509,10 +509,12 @@ which handle most of the other compiler arguments:
</li><li><code>aspectpath</code>: binary aspects in jar files
</li><li><code>argfiles</code>: argument list files
</li><li><code>sourceroots</code>: root directories for source files
+ </li><li><code>xlintfile</code>: override org.aspectj.weaver.XlintDefault.properties
</li>
</ul>
Paths for these are all relative to the test base directory, and
multiple entries are separated with commas.
+(Use only one entry for xlintfile.)
<p>
Here is a cooked example that uses all <code>compiler</code> attributes:
<pre>
@@ -522,6 +524,7 @@ Here is a cooked example that uses all <code>compiler</code> attributes:
options="-Xlint,-g:none"
argfiles="debug.lst,aspects/test.lst"
aspectpath="jars/requiredAspects.jar"
+ xlintfile="ignore-all-but-typenotfound.properties"
classpath="providedClassesDir,jars/required.jar"/>
&lt;inc-compile tag="20"/>
&lt;/ajc-test>
@@ -587,7 +590,9 @@ through the sandbox, adding default libraries:
The harness provides some more advance behaviors,
which you might see specified in the tests.
-For more information, see the API documentation for the harness.
+For more information, see the API documentation for the harness
+(<a href="../testing-drivers/src/org/aspectj/testing/drivers/package.html">
+ org/aspectj/testing/drivers/package.html</a>).
<ul>
<li><u>option dominance and overriding</u>:
Both in test specifications and on the command line
@@ -601,7 +606,7 @@ For more information, see the API documentation for the harness.
</li>
</ul>
<hr>
-<small>last updated January 8, 2004 </small> <!-- CVS variable -->
+<small>last updated March 8, 2004 </small> <!-- CVS variable -->
</body>
</html>