harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mloe...@apache.org
Subject svn commit: r420799 - in /incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/tests/java/nio/channels: AllTests.java MapModeTest.java
Date Tue, 11 Jul 2006 11:06:43 GMT
Author: mloenko
Date: Tue Jul 11 04:06:42 2006
New Revision: 420799

URL: http://svn.apache.org/viewvc?rev=420799&view=rev
Log:
applied patch from HARMONY-811
Tests for java.nio.channels.FileChannel.MapMode are missing

Added:
    incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/tests/java/nio/channels/MapModeTest.java
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=420799&r1=420798&r2=420799&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
Tue Jul 11 04:06:42 2006
@@ -44,6 +44,7 @@
         suite.addTestSuite(ClosedChannelExceptionTest.class);
         suite.addTestSuite(ClosedSelectorExceptionTest.class);
         suite.addTestSuite(ConnectionPendingExceptionTest.class);
+        suite.addTestSuite(MapModeTest.class);
         //$JUnit-END$
         return suite;
     }

Added: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/tests/java/nio/channels/MapModeTest.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/MapModeTest.java?rev=420799&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/tests/java/nio/channels/MapModeTest.java
(added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/tests/java/nio/channels/MapModeTest.java
Tue Jul 11 04:06:42 2006
@@ -0,0 +1,51 @@
+/* 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.nio.channels.FileChannel;
+
+import junit.framework.TestCase;
+
+/**
+ * Tests for FileChannel.MapMode
+ */
+public class MapModeTest extends TestCase {
+
+    /**
+     * java.nio.channels.FileChannel.MapMode#PRIVATE,READONLY,READWRITE
+     */
+    public void test_PRIVATE_READONLY_READWRITE() {
+        assertNotNull(FileChannel.MapMode.PRIVATE);
+        assertNotNull(FileChannel.MapMode.READ_ONLY);
+        assertNotNull(FileChannel.MapMode.READ_WRITE);
+
+        assertFalse(FileChannel.MapMode.PRIVATE
+                .equals(FileChannel.MapMode.READ_ONLY));
+        assertFalse(FileChannel.MapMode.PRIVATE
+                .equals(FileChannel.MapMode.READ_WRITE));
+        assertFalse(FileChannel.MapMode.READ_ONLY
+                .equals(FileChannel.MapMode.READ_WRITE));
+    }
+
+    /**
+     * java.nio.channels.FileChannel.MapMode#toString()
+     */
+    public void test_toString() {
+        assertNotNull(FileChannel.MapMode.PRIVATE.toString());
+        assertNotNull(FileChannel.MapMode.READ_ONLY.toString());
+        assertNotNull(FileChannel.MapMode.READ_WRITE.toString());
+    }
+}



Mime
View raw message