You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by je...@apache.org on 2011/01/21 02:13:35 UTC
svn commit: r1061590 -
/harmony/enhanced/java/branches/java6/classlib/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedReaderTest.java
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) {