]> source.dussan.org Git - aspectj.git/commitdiff
added test that deprecation warnings are not shown unless asked for
authorjhugunin <jhugunin>
Thu, 1 May 2003 18:48:06 +0000 (18:48 +0000)
committerjhugunin <jhugunin>
Thu, 1 May 2003 18:48:06 +0000 (18:48 +0000)
modifying option setting to make that test pass

org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/BuildArgParser.java
tests/ajcTests.xml
tests/jimTests.xml

index 8d387a99db3fe6f3bdd782d6378a21f12b64cdee..6955b4744a431e13bda8dfbb6f8bca2f8ad85aa1 100644 (file)
@@ -116,7 +116,9 @@ public class BuildArgParser extends Main {
             }
                                
                        List javaArgList = parser.getUnparsedArgs();
-                       javaArgList.add("-warn:deprecation"); //!!! need to make this more flexible
+                       //      disable all special eclipse warnings by default
+                       //??? might want to instead override getDefaultOptions()
+                       javaArgList.add(0, "-warn:none"); 
                        if (javaArgList.size() != 0) {
                                super.configure((String[])javaArgList.toArray(new String[javaArgList.size()]));
                        }
index 8c4c2163951d62bf579c5e2b2fccda8907a0d03a..b7ad971d50268ac514aacb086afbd29c9d71e335 100644 (file)
             <message kind="warning" line="10"/>
         </compile>
     </ajc-test>
+    
+    <ajc-test dir="options" 
+      title="options -warn:deprecation not enabled">
+        <compile files="WarnDeprecated.java"
+               options="!eclipse">
+        </compile>
+    </ajc-test>
  
     <!-- .................................... -Xlint tests -->
     <!-- ............... positive -Xlint tests -->
index a7b32080d8ebdff70c95b3884b228f7d92dbc240..c071015d0499ace1a84d88fba622fd7ef3b96851 100644 (file)
@@ -1,32 +1,16 @@
 <!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd">
 <suite> 
-
-    <ajc-test dir="bugs/interSpecials" title="IllegalAccessError while accessing introduced variable / 1.1rc1"
-      pr="36110">
-        <compile files="p1/C.java,p2/A1.java"/>
-        <run class="p2.A1"/>
+    <ajc-test dir="options" 
+      title="options -warn:deprecation">
+        <compile files="WarnDeprecated.java"
+               options="!eclipse,-warn:deprecation">
+            <message kind="warning" line="10"/>
+        </compile>
     </ajc-test>
-    
-    <ajc-test dir="bugs/interSpecials" title="testing that assert works like .class"
-      pr="36110">
-        <compile files="p1/C.java,p2/A2.java" options="-source14"/>
-        <run class="p2.A2" vm="1.4"/>
+    <ajc-test dir="options" 
+      title="options -warn:deprecation turned off">
+        <compile files="WarnDeprecated.java"
+               options="!eclipse">
+        </compile>
     </ajc-test>
-
-    <!--
-  
-    <ajc-test dir="options/injars/simple" 
-      title="options -injars">
-        <compile files="Simple.java,main.jar"
-               options="!eclipse"/>
-        <run class="Main"/>
-    </ajc-test>
-
-    
-    <ajc-test dir="new" pr="885"
-      title="source locations within expressions">
-        <compile files="SourceLocationWithinExpr.java" options="-1.4"/>
-        <run class="SourceLocationWithinExpr"/>
-    </ajc-test>
-       -->
 </suite>
\ No newline at end of file