commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tcu...@apache.org
Subject svn commit: r1102608 - /commons/proper/jci/trunk/core/src/test/java/org/apache/commons/jci/compilers/AbstractCompilerTestCase.java
Date Fri, 13 May 2011 08:34:47 GMT
Author: tcurdt
Date: Fri May 13 08:34:46 2011
New Revision: 1102608

URL: http://svn.apache.org/viewvc?rev=1102608&view=rev
Log:
applied test case from https://issues.apache.org/jira/browse/JCI-59
..unfortunately that means eclipse tests are no longer passing


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

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=1102608&r1=1102607&r2=1102608&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
Fri May 13 08:34:46 2011
@@ -297,9 +297,9 @@ public abstract class AbstractCompilerTe
      * https://issues.apache.org/jira/browse/JCI-59
      */
     public void testAdditionalTopLevelClassCompile() throws Exception {
-       final JavaCompiler compiler = createJavaCompiler(); 
-
-       final ResourceReader reader = new ResourceReader() {
+        final JavaCompiler compiler = createJavaCompiler(); 
+    
+        final ResourceReader reader = new ResourceReader() {
            final private Map sources = new HashMap() {
                private static final long serialVersionUID = 1L;
                {
@@ -316,29 +316,28 @@ public abstract class AbstractCompilerTe
                        "  }\n" +
                        "}").getBytes());
                }};
-
+    
            public byte[] getBytes( final String pResourceName ) {
                return (byte[]) sources.get(pResourceName);
            }
-
+    
            public boolean isAvailable( final String pResourceName ) {
                return sources.containsKey(pResourceName);
            }
-
-       };
-
-       final MemoryResourceStore store = new MemoryResourceStore();
-       final CompilationResult result = compiler.compile(
+        };
+    
+        final MemoryResourceStore store = new MemoryResourceStore();
+        final CompilationResult result = compiler.compile(
                new String[] {
                        "jci/Simple.java"
                }, reader, store);
-
-       assertEquals(toString(result.getErrors()), 0, result.getErrors().length);
-       assertEquals(toString(result.getWarnings()), 0, result.getWarnings().length);
-
-       final byte[] clazzBytes = store.read("jci/Simple.class");
-       assertNotNull(clazzBytes);
-       assertTrue(clazzBytes.length > 0);
+    
+        assertEquals(toString(result.getErrors()), 0, result.getErrors().length);
+        assertEquals(toString(result.getWarnings()), 0, result.getWarnings().length);
+    
+        final byte[] clazzBytes = store.read("jci/Simple.class");
+        assertNotNull(clazzBytes);
+        assertTrue(clazzBytes.length > 0);
     }
 
     public final String toString( final CompilationProblem[] pProblems ) {



Mime
View raw message