Return-Path: X-Original-To: apmail-commons-commits-archive@minotaur.apache.org Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A98D94AC7 for ; Fri, 13 May 2011 08:35:08 +0000 (UTC) Received: (qmail 35457 invoked by uid 500); 13 May 2011 08:35:08 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 35393 invoked by uid 500); 13 May 2011 08:35:08 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 35386 invoked by uid 99); 13 May 2011 08:35:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 May 2011 08:35:08 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 May 2011 08:35:07 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 1ACD02388A39; Fri, 13 May 2011 08:34:47 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@commons.apache.org From: tcurdt@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110513083447.1ACD02388A39@eris.apache.org> 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 ) {