You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by tc...@apache.org on 2011/05/13 10:34:47 UTC
svn commit: r1102608 -
/commons/proper/jci/trunk/core/src/test/java/org/apache/commons/jci/compilers/AbstractCompilerTestCase.java
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 ) {