You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by te...@apache.org on 2007/06/11 22:50:59 UTC
svn commit: r546272 -
/harmony/enhanced/classlib/branches/java6/modules/luni/src/test/java/tests/api/java/io/PipedReaderTest.java
Author: tellison
Date: Mon Jun 11 13:50:57 2007
New Revision: 546272
URL: http://svn.apache.org/viewvc?view=rev&rev=546272
Log:
Apply test for HARMONY-4096 ([classlib][luni][java6]new constructor in java.io.PipedReader)
Modified:
harmony/enhanced/classlib/branches/java6/modules/luni/src/test/java/tests/api/java/io/PipedReaderTest.java
Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/test/java/tests/api/java/io/PipedReaderTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/test/java/tests/api/java/io/PipedReaderTest.java?view=diff&rev=546272&r1=546271&r2=546272
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/test/java/tests/api/java/io/PipedReaderTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/test/java/tests/api/java/io/PipedReaderTest.java Mon Jun 11 13:50:57 2007
@@ -72,6 +72,50 @@
// Test for method java.io.PipedReader(java.io.PipedWriter)
preader = new PipedReader(new PipedWriter());
}
+
+ /**
+ * @tests java.io.PipedReader#PipedReader(java.io.PipedWriter,
+ * int)
+ * @since 1.6
+ */
+ public void test_Constructor_LPipedWriter_I() throws Exception {
+ // Test for method java.io.PipedReader(java.io.PipedWriter,
+ // int)
+ try {
+ preader = new PipedReader(null, -1);
+ fail("Should throw IllegalArgumentException"); //$NON-NLS-1$
+ } catch (IllegalArgumentException e) {
+ // expected
+ }
+
+ try {
+ preader = new PipedReader(null, 0);
+ fail("Should throw IllegalArgumentException"); //$NON-NLS-1$
+ } catch (IllegalArgumentException e) {
+ // expected
+ }
+ }
+
+ /**
+ * @tests java.io.PipedReader#PipedReader(int)
+ * @since 1.6
+ */
+ public void test_Constructor_I() throws Exception {
+ // Test for method java.io.PipedReader(int)
+ try {
+ preader = new PipedReader(-1);
+ fail("Should throw IllegalArgumentException"); //$NON-NLS-1$
+ } catch (IllegalArgumentException e) {
+ // expected
+ }
+
+ try {
+ preader = new PipedReader(0);
+ fail("Should throw IllegalArgumentException"); //$NON-NLS-1$
+ } catch (IllegalArgumentException e) {
+ // expected
+ }
+ }
/**
* @tests java.io.PipedReader#close()