Author: gharley
Date: Mon Jun 19 07:04:04 2006
New Revision: 415333
URL: http://svn.apache.org/viewvc?rev=415333&view=rev
Log:
HARMONY-620 : Tests for java.nio.BufferOverflowException are missing
Added:
incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/BufferOverflowExceptionTest.java
(with props)
incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/
incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/java/
incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/java/nio/
incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/java/nio/BufferOverflowException.golden.ser
(with props)
Modified:
incubator/harmony/enhanced/classlib/trunk/modules/nio/make/common/build.xml
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/make/common/build.xml
URL:
http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/nio/make/common/build.xml?rev=415333&r1=415332&r2=415333&view=diff
==============================================================================
---
incubator/harmony/enhanced/classlib/trunk/modules/nio/make/common/build.xml
(original)
+++
incubator/harmony/enhanced/classlib/trunk/modules/nio/make/common/build.xml
Mon Jun 19 07:04:04 2006
@@ -46,7 +46,7 @@
</target>
- <target name="compile.tests">
+ <target name="compile.tests" depends="copy.test.resources" >
<echo message="Compiling NIO tests from
${hy.nio.src.test.java}" />
<mkdir dir="${hy.nio.bin.test}" />
@@ -121,5 +121,15 @@
<target name="copy.resources">
<!-- Nothing for NIO -->
</target>
+
+ <target name="copy.test.resources">
+ <mkdir dir="${hy.nio.bin.test}" />
+ <copy todir="${hy.nio.bin.test}" includeemptydirs="false">
+ <fileset dir="${hy.nio.src.test.resources}">
+ <exclude name="**/*.java" />
+ </fileset>
+ </copy>
+ </target>
+
</project>
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=415333&r1=415332&r2=415333&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
Mon Jun 19 07:04:04 2006
@@ -31,6 +31,7 @@
public static Test suite() {
TestSuite suite = new TestSuite("Tests for java.nio");
// $JUnit-BEGIN$
+ suite.addTestSuite(BufferOverflowExceptionTest.class);
suite.addTestSuite(BufferTest.class);
suite.addTestSuite(ByteBufferTest.class);
suite.addTestSuite(ByteOrderTest.class);
Added:
incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/BufferOverflowExceptionTest.java
URL:
http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/BufferOverflowExceptionTest.java?rev=415333&view=auto
==============================================================================
---
incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/BufferOverflowExceptionTest.java
(added)
+++
incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/BufferOverflowExceptionTest.java
Mon Jun 19 07:04:04 2006
@@ -0,0 +1,45 @@
+/* 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.BufferOverflowException;
+
+import junit.framework.TestCase;
+import tests.util.SerializationTester;
+
+public class BufferOverflowExceptionTest extends TestCase {
+
+ /**
+ * @tests serialization/deserilazation compatibility.
+ */
+ public void test_serialization() throws IOException,
ClassNotFoundException {
+ BufferOverflowException object = new BufferOverflowException();
+ BufferOverflowException deObject = (BufferOverflowException)
SerializationTester
+ .getDeserilizedObject(object);
+ assertEquals(deObject.getMessage(),object.getMessage());
+ }
+
+ /**
+ * @tests serialization/deserilazation compatibility with RI.
+ */
+ public void test_compatibilitySerialization() throws Exception {
+ BufferOverflowException object = new BufferOverflowException();
+ BufferOverflowException deObject =
(BufferOverflowException)SerializationTester.readObject(object,
+
"serialization/java/nio/BufferOverflowException.golden.ser");
+ assertEquals(deObject.getMessage(),object.getMessage());
+ }
+}
Propchange:
incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/BufferOverflowExceptionTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/java/nio/BufferOverflowException.golden.ser
URL:
http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/java/nio/BufferOverflowException.golden.ser?rev=415333&view=auto
==============================================================================
Binary file - no diff available.
Propchange:
incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/java/nio/BufferOverflowException.golden.ser
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream