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 2006/06/22 12:41:13 UTC
svn commit: r416326 - in
/incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test:
java/org/apache/harmony/tests/java/nio/ resources/serialization/java/nio/
Author: tellison
Date: Thu Jun 22 03:41:12 2006
New Revision: 416326
URL: http://svn.apache.org/viewvc?rev=416326&view=rev
Log:
Apply patch HARMONY-640 (Tests for java.nio.BufferUnderflowException are missing)
Added:
incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/BufferUnderflowExceptionTest.java (with props)
incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/java/nio/BufferUnderflowExceptionTest.golden.ser (with props)
Modified:
incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/AllTests.java
Modified: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/AllTests.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/AllTests.java?rev=416326&r1=416325&r2=416326&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/AllTests.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/AllTests.java Thu Jun 22 03:41:12 2006
@@ -54,6 +54,7 @@
suite.addTestSuite(SliceHeapByteBufferTest.class);
suite.addTestSuite(DuplicateDirectByteBufferTest.class);
suite.addTestSuite(BufferOverflowExceptionTest.class);
+ suite.addTestSuite(BufferUnderflowExceptionTest.class);
//$JUnit-END$
return suite;
}
Added: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/BufferUnderflowExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/BufferUnderflowExceptionTest.java?rev=416326&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/BufferUnderflowExceptionTest.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/BufferUnderflowExceptionTest.java Thu Jun 22 03:41:12 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;
+
+import java.io.IOException;
+import java.nio.BufferUnderflowException;
+
+import junit.framework.TestCase;
+import tests.util.SerializationTester;
+
+/**
+ * Tests for BufferUnderflowException
+ */
+public class BufferUnderflowExceptionTest extends TestCase {
+
+ /**
+ * @tests serialization/deserialization compatibility.
+ */
+ public void test_serialization() throws IOException, ClassNotFoundException {
+ BufferUnderflowException object = new BufferUnderflowException();
+ BufferUnderflowException deObject = (BufferUnderflowException) SerializationTester
+ .getDeserilizedObject(object);
+ assertNotNull(deObject);
+ }
+
+ /**
+ * @tests serialization/deserialization compatibility with RI.
+ */
+ public void test_compatibilitySerialization() throws Exception {
+ BufferUnderflowException object = new BufferUnderflowException();
+ BufferUnderflowException deObject = (BufferUnderflowException)SerializationTester.readObject(object,
+ "serialization/java/nio/BufferUnderflowExceptionTest.golden.ser");
+ assertNotNull(deObject);
+ }
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/BufferUnderflowExceptionTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/java/nio/BufferUnderflowExceptionTest.golden.ser
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/java/nio/BufferUnderflowExceptionTest.golden.ser?rev=416326&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/java/nio/BufferUnderflowExceptionTest.golden.ser
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream