Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 72452 invoked from network); 11 Jul 2006 11:07:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 11 Jul 2006 11:07:05 -0000 Received: (qmail 8725 invoked by uid 500); 11 Jul 2006 11:07:04 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 8700 invoked by uid 500); 11 Jul 2006 11:07:04 -0000 Mailing-List: contact harmony-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-commits@incubator.apache.org Received: (qmail 8689 invoked by uid 99); 11 Jul 2006 11:07:04 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Jul 2006 04:07:04 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [140.211.166.113] (HELO eris.apache.org) (140.211.166.113) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Jul 2006 04:07:03 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id D41CD1A981A; Tue, 11 Jul 2006 04:06:43 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: harmony-commits@incubator.apache.org From: mloenko@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20060711110643.D41CD1A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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()); + } +}