commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tcu...@apache.org
Subject svn commit: r578529 - in /commons/proper/jci/trunk: compilers/javac/src/test/java/org/apache/commons/jci/compilers/JavacJavaCompilerTestCase.java core/src/test/java/org/apache/commons/jci/compilers/AbstractCompilerTestCase.java
Date Sun, 23 Sep 2007 00:00:05 GMT
Author: tcurdt
Date: Sat Sep 22 17:00:04 2007
New Revision: 578529

URL: http://svn.apache.org/viewvc?rev=578529&view=rev
Log:
test cross references only on 1.5


Modified:
    commons/proper/jci/trunk/compilers/javac/src/test/java/org/apache/commons/jci/compilers/JavacJavaCompilerTestCase.java
    commons/proper/jci/trunk/core/src/test/java/org/apache/commons/jci/compilers/AbstractCompilerTestCase.java

Modified: commons/proper/jci/trunk/compilers/javac/src/test/java/org/apache/commons/jci/compilers/JavacJavaCompilerTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/jci/trunk/compilers/javac/src/test/java/org/apache/commons/jci/compilers/JavacJavaCompilerTestCase.java?rev=578529&r1=578528&r2=578529&view=diff
==============================================================================
--- commons/proper/jci/trunk/compilers/javac/src/test/java/org/apache/commons/jci/compilers/JavacJavaCompilerTestCase.java
(original)
+++ commons/proper/jci/trunk/compilers/javac/src/test/java/org/apache/commons/jci/compilers/JavacJavaCompilerTestCase.java
Sat Sep 22 17:00:04 2007
@@ -27,11 +27,4 @@
         return "javac";
     }
     
-    public void testJavaVersion() {
-    	System.out.println("java.version: " + System.getProperty("java.version"));
-    	System.out.println("os.name: " + System.getProperty("os.name"));
-    	System.out.println("os.version: " + System.getProperty("os.version"));
-    	System.out.println("os.arch: " + System.getProperty("os.arch"));
-    }
-
 }

Modified: commons/proper/jci/trunk/core/src/test/java/org/apache/commons/jci/compilers/AbstractCompilerTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/jci/trunk/core/src/test/java/org/apache/commons/jci/compilers/AbstractCompilerTestCase.java?rev=578529&r1=578528&r2=578529&view=diff
==============================================================================
--- commons/proper/jci/trunk/core/src/test/java/org/apache/commons/jci/compilers/AbstractCompilerTestCase.java
(original)
+++ commons/proper/jci/trunk/core/src/test/java/org/apache/commons/jci/compilers/AbstractCompilerTestCase.java
Sat Sep 22 17:00:04 2007
@@ -229,7 +229,13 @@
      * https://issues.apache.org/jira/browse/JCI-53
      */
     public void testCrossReferenceCompilation() throws Exception {
-        final JavaCompiler compiler = createJavaCompiler(); 
+    	final String javaVersion = System.getProperty("java.version");
+    	if (!(javaVersion.startsWith("1.5") || javaVersion.startsWith("1.6"))) {
+    		System.err.println("WARNING! Skipping testCrossReferenceCompilation() because your
runtime does not support java 1.5+ yet");
+    		return;
+    	}
+    	
+    	final JavaCompiler compiler = createJavaCompiler(); 
 
         final ResourceReader reader = new ResourceReader() {
             final private Map sources = new HashMap() {
@@ -264,8 +270,8 @@
         };
 
         final JavaCompilerSettings settings = compiler.createDefaultSettings();
-        settings.setTargetVersion("1.4");
-        settings.setSourceVersion("1.4");
+        settings.setTargetVersion("1.5");
+        settings.setSourceVersion("1.5");
         
         final MemoryResourceStore store = new MemoryResourceStore();
         final CompilationResult result = compiler.compile(



Mime
View raw message