]> source.dussan.org Git - aspectj.git/commitdiff
-xlintfile option support in the harness, and tests
authorwisberg <wisberg>
Mon, 8 Mar 2004 19:13:55 +0000 (19:13 +0000)
committerwisberg <wisberg>
Mon, 8 Mar 2004 19:13:55 +0000 (19:13 +0000)
tests/ajcHarnessTests.xml
tests/ajcTestSuite.dtd
tests/harness/xlintfile/TypeNotExposed.java [new file with mode: 0644]
tests/harness/xlintfile/tneError.properties [new file with mode: 0644]
tests/harness/xlintfile/tneIgnore.properties [new file with mode: 0644]
tests/readme-writing-compiler-tests.html

index 98c6f0e880617db5d35cb463ba596c746dfe8122..f90eaabdcf939671ac55c2581982e8e8b3b34551 100644 (file)
                <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">
                        options="in longer packageOne.Main.main(..),
                                         before main packageOne.Main"/>
     </ajc-test>
--->
 
    <ajc-test dir="incremental/defaultPackage/src"
        title="pass test using prior classes">
     </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">
         </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>
 
index b446d2d7de8b95d31eabf207bbd9ccf4b18b6c45..19d172bc2710448c11c4285b562a6e24c2ade242 100644 (file)
@@ -24,6 +24,7 @@
    <!ATTLIST compile extdirs CDATA #IMPLIED >\r
    <!ATTLIST compile options CDATA #IMPLIED >\r
    <!ATTLIST compile sourceroots CDATA #IMPLIED >\r
+   <!ATTLIST compile xlintfile CDATA #IMPLIED >\r
 \r
    <!ELEMENT inc-compile (dir-changes*,message*)>\r
    <!ATTLIST inc-compile tag CDATA #REQUIRED >\r
diff --git a/tests/harness/xlintfile/TypeNotExposed.java b/tests/harness/xlintfile/TypeNotExposed.java
new file mode 100644 (file)
index 0000000..318c192
--- /dev/null
@@ -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 (file)
index 0000000..682f2ad
--- /dev/null
@@ -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 (file)
index 0000000..ebb03b0
--- /dev/null
@@ -0,0 +1,7 @@
+invalidAbsoluteTypeName = ignore
+invalidWildcardTypeName = ignore
+unresolvableMember = ignore
+typeNotExposedToWeaver = ignore
+shadowNotInStructure = ignore
+unmatchedSuperTypeInCall = ignore
+canNotImplementLazyTjp = ignore
\ No newline at end of file
index 7266ceebafd7ed38d2248ebf8784e8dda9ad0931..120f9dc2b415067cbc875bcc5528f2bbc0a14289 100644 (file)
@@ -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>