Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 82118 invoked from network); 21 Jan 2011 01:13:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Jan 2011 01:13:56 -0000 Received: (qmail 70265 invoked by uid 500); 21 Jan 2011 01:13:56 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 70157 invoked by uid 500); 21 Jan 2011 01:13:56 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 70150 invoked by uid 99); 21 Jan 2011 01:13:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Jan 2011 01:13:56 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.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, 21 Jan 2011 01:13:55 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 541412388A02; Fri, 21 Jan 2011 01:13:35 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1061590 - /harmony/enhanced/java/branches/java6/classlib/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedReaderTest.java Date: Fri, 21 Jan 2011 01:13:35 -0000 To: commits@harmony.apache.org From: jessewilson@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110121011335.541412388A02@eris.apache.org> Author: jessewilson Date: Fri Jan 21 01:13:34 2011 New Revision: 1061590 URL: http://svn.apache.org/viewvc?rev=1061590&view=rev Log: Split up tests so behavioral test failures aren't masked when exception priority tests fail Modified: harmony/enhanced/java/branches/java6/classlib/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedReaderTest.java Modified: harmony/enhanced/java/branches/java6/classlib/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedReaderTest.java URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedReaderTest.java?rev=1061590&r1=1061589&r2=1061590&view=diff ============================================================================== --- harmony/enhanced/java/branches/java6/classlib/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedReaderTest.java (original) +++ harmony/enhanced/java/branches/java6/classlib/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedReaderTest.java Fri Jan 21 01:13:34 2011 @@ -72,7 +72,7 @@ public class PipedReaderTest extends Tes public void test_ConstructorLjava_io_PipedWriter() throws IOException { preader = new PipedReader(new PipedWriter()); } - + /** * @tests java.io.PipedReader#PipedReader(java.io.PipedWriter, * int) @@ -87,7 +87,7 @@ public class PipedReaderTest extends Tes } catch (IllegalArgumentException e) { // expected } - + try { preader = new PipedReader(null, 0); fail("Should throw IllegalArgumentException"); //$NON-NLS-1$ @@ -108,7 +108,7 @@ public class PipedReaderTest extends Tes } catch (IllegalArgumentException e) { // expected } - + try { preader = new PipedReader(0); fail("Should throw IllegalArgumentException"); //$NON-NLS-1$ @@ -200,7 +200,7 @@ public class PipedReaderTest extends Tes /** * @tests java.io.PipedReader#read(char[], int, int) */ - public void test_read$CII_2() throws IOException { + public void test_read$CII_ExceptionPriority() throws IOException { // Regression for HARMONY-387 PipedWriter pw = new PipedWriter(); PipedReader obj = null; @@ -218,7 +218,7 @@ public class PipedReaderTest extends Tes /** * @tests java.io.PipedReader#read(char[], int, int) */ - public void test_read$CII_3() throws IOException { + public void test_read$CII_ExceptionPriority2() throws IOException { PipedWriter pw = new PipedWriter(); PipedReader obj = null; try { @@ -235,7 +235,7 @@ public class PipedReaderTest extends Tes /** * @tests java.io.PipedReader#read(char[], int, int) */ - public void test_read$CII_4() throws IOException { + public void test_read$CII_ExceptionPriority3() throws IOException { PipedWriter pw = new PipedWriter(); PipedReader obj = null; try { @@ -249,9 +249,16 @@ public class PipedReaderTest extends Tes } } - /** - * @tests java.io.PipedReader#read(char[], int, int) - */ + public void test_read$CII_ExceptionPriority4() throws IOException { + PipedWriter pw = new PipedWriter(); + PipedReader pr = new PipedReader(pw); + try { + pr.read(null, -1, 1); + fail(); + } catch (IndexOutOfBoundsException expected) { + } + } + public void test_read_$CII_IOException() throws IOException { PipedWriter pw = new PipedWriter(); PipedReader pr = new PipedReader(pw); @@ -350,18 +357,6 @@ public class PipedReaderTest extends Tes pw = new PipedWriter(); pr = new PipedReader(pw); try { - pr.read(null, -1, 1); - fail("should throw IndexOutOfBoundsException"); //$NON-NLS-1$ - } catch (IndexOutOfBoundsException e) { - // expected - } finally { - pw = null; - pr = null; - } - - pw = new PipedWriter(); - pr = new PipedReader(pw); - try { pr.read(null, 0, -1); fail("should throw NullPointerException"); //$NON-NLS-1$ } catch (NullPointerException e) {