You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by gh...@apache.org on 2006/07/14 12:22:16 UTC
svn commit: r421859 - in
/incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test:
java/common/org/apache/harmony/tests/java/nio/channels/
resources/serialization/java/nio/channels/
Author: gharley
Date: Fri Jul 14 03:22:14 2006
New Revision: 421859
URL: http://svn.apache.org/viewvc?rev=421859&view=rev
Log:
HARMONY 868 : [nio] Tests for java.nio.channels.IllegalBlockingModeException, IllegalSelectorException are missing
Added:
incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/tests/java/nio/channels/IllegalBlockingModeExceptionTest.java (with props)
incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/tests/java/nio/channels/IllegalSelectorExceptionTest.java (with props)
incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/java/nio/channels/IllegalBlockingModeExceptionTest.golden.ser (with props)
incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/java/nio/channels/IllegalSelectorExceptionTest.golden.ser (with props)
Modified:
incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/tests/java/nio/channels/AllTests.java
Modified: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/tests/java/nio/channels/AllTests.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/tests/java/nio/channels/AllTests.java?rev=421859&r1=421858&r2=421859&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/tests/java/nio/channels/AllTests.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/tests/java/nio/channels/AllTests.java Fri Jul 14 03:22:14 2006
@@ -45,8 +45,10 @@
suite.addTestSuite(ClosedSelectorExceptionTest.class);
suite.addTestSuite(ConnectionPendingExceptionTest.class);
suite.addTestSuite(FileLockInterruptionExceptionTest.class);
+ suite.addTestSuite(IllegalBlockingModeExceptionTest.class);
+ suite.addTestSuite(IllegalSelectorExceptionTest.class);
suite.addTestSuite(MapModeTest.class);
- //$JUnit-END$
+ // $JUnit-END$
return suite;
}
Added: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/tests/java/nio/channels/IllegalBlockingModeExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/tests/java/nio/channels/IllegalBlockingModeExceptionTest.java?rev=421859&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/tests/java/nio/channels/IllegalBlockingModeExceptionTest.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/tests/java/nio/channels/IllegalBlockingModeExceptionTest.java Fri Jul 14 03:22:14 2006
@@ -0,0 +1,48 @@
+/* Copyright 2006 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.harmony.tests.java.nio.channels;
+
+import java.io.IOException;
+import java.nio.channels.IllegalBlockingModeException;
+
+import junit.framework.TestCase;
+import tests.util.SerializationTester;
+
+/**
+ * Tests for IllegalBlockingModeException
+ */
+public class IllegalBlockingModeExceptionTest extends TestCase {
+
+ /**
+ * @tests serialization/deserialization compatibility.
+ */
+ public void test_serialization() throws IOException, ClassNotFoundException {
+ IllegalBlockingModeException object = new IllegalBlockingModeException();
+ IllegalBlockingModeException deObject = (IllegalBlockingModeException) SerializationTester
+ .getDeserilizedObject(object);
+ assertNotNull(deObject);
+ }
+
+ /**
+ * @tests serialization/deserialization compatibility with RI.
+ */
+ public void test_compatibilitySerialization() throws Exception {
+ IllegalBlockingModeException object = new IllegalBlockingModeException();
+ IllegalBlockingModeException deObject = (IllegalBlockingModeException) SerializationTester
+ .readObject(object,
+ "serialization/java/nio/channels/IllegalBlockingModeExceptionTest.golden.ser");
+ assertNotNull(deObject);
+ }
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/tests/java/nio/channels/IllegalBlockingModeExceptionTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/tests/java/nio/channels/IllegalSelectorExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/tests/java/nio/channels/IllegalSelectorExceptionTest.java?rev=421859&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/tests/java/nio/channels/IllegalSelectorExceptionTest.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/tests/java/nio/channels/IllegalSelectorExceptionTest.java Fri Jul 14 03:22:14 2006
@@ -0,0 +1,48 @@
+/* Copyright 2006 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.harmony.tests.java.nio.channels;
+
+import java.io.IOException;
+import java.nio.channels.IllegalSelectorException;
+
+import junit.framework.TestCase;
+import tests.util.SerializationTester;
+
+/**
+ * Tests for IllegalSelectorException
+ */
+public class IllegalSelectorExceptionTest extends TestCase {
+
+ /**
+ * @tests serialization/deserialization compatibility.
+ */
+ public void test_serialization() throws IOException, ClassNotFoundException {
+ IllegalSelectorException object = new IllegalSelectorException();
+ IllegalSelectorException deObject = (IllegalSelectorException) SerializationTester
+ .getDeserilizedObject(object);
+ assertNotNull(deObject);
+ }
+
+ /**
+ * @tests serialization/deserialization compatibility with RI.
+ */
+ public void test_compatibilitySerialization() throws Exception {
+ IllegalSelectorException object = new IllegalSelectorException();
+ IllegalSelectorException deObject = (IllegalSelectorException) SerializationTester
+ .readObject(object,
+ "serialization/java/nio/channels/IllegalSelectorExceptionTest.golden.ser");
+ assertNotNull(deObject);
+ }
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/tests/java/nio/channels/IllegalSelectorExceptionTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/java/nio/channels/IllegalBlockingModeExceptionTest.golden.ser
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/java/nio/channels/IllegalBlockingModeExceptionTest.golden.ser?rev=421859&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/java/nio/channels/IllegalBlockingModeExceptionTest.golden.ser
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/java/nio/channels/IllegalSelectorExceptionTest.golden.ser
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/java/nio/channels/IllegalSelectorExceptionTest.golden.ser?rev=421859&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/java/nio/channels/IllegalSelectorExceptionTest.golden.ser
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream