Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 22391 invoked from network); 6 Jun 2006 11:25:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 6 Jun 2006 11:25:40 -0000 Received: (qmail 63302 invoked by uid 500); 6 Jun 2006 11:25:40 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 63271 invoked by uid 500); 6 Jun 2006 11:25:39 -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 63260 invoked by uid 99); 6 Jun 2006 11:25:39 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Jun 2006 04:25:39 -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, 06 Jun 2006 04:25:39 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id E70DC1A983A; Tue, 6 Jun 2006 04:25:18 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r412094 - /incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/ByteBufferTest.java Date: Tue, 06 Jun 2006 11:25:18 -0000 To: harmony-commits@incubator.apache.org From: gharley@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20060606112518.E70DC1A983A@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: gharley Date: Tue Jun 6 04:25:18 2006 New Revision: 412094 URL: http://svn.apache.org/viewvc?rev=412094&view=rev Log: HARMONY-550: Multiple bugs in org.apache.harmony.tests.java.nio.ByteBufferTest Modified: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/ByteBufferTest.java Modified: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/ByteBufferTest.java URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/ByteBufferTest.java?rev=412094&r1=412093&r2=412094&view=diff ============================================================================== --- incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/ByteBufferTest.java (original) +++ incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/ByteBufferTest.java Tue Jun 6 04:25:18 2006 @@ -763,7 +763,8 @@ value = (char) charBuffer.remaining(); charBuffer.put(value); buf.get(bytes); - Arrays.equals(bytes, char2bytes(value, buf.order())); + //Fix for Harmony 550 + assertTrue(Arrays.equals(bytes, char2bytes(value, buf.order()))); } // test LITTLE_ENDIAN char buffer, write @@ -775,7 +776,7 @@ value = (char) charBuffer.remaining(); charBuffer.put(value); buf.get(bytes); - Arrays.equals(bytes, char2bytes(value, buf.order())); + assertTrue(Arrays.equals(bytes, char2bytes(value, buf.order()))); } } @@ -827,7 +828,7 @@ value = (double) doubleBuffer.remaining(); doubleBuffer.put(value); buf.get(bytes); - Arrays.equals(bytes, double2bytes(value, buf.order())); + assertTrue(Arrays.equals(bytes, double2bytes(value, buf.order()))); } // test LITTLE_ENDIAN double buffer, write @@ -839,7 +840,7 @@ value = (double) doubleBuffer.remaining(); doubleBuffer.put(value); buf.get(bytes); - Arrays.equals(bytes, double2bytes(value, buf.order())); + assertTrue(Arrays.equals(bytes, double2bytes(value, buf.order()))); } } @@ -891,7 +892,7 @@ value = (float) floatBuffer.remaining(); floatBuffer.put(value); buf.get(bytes); - Arrays.equals(bytes, float2bytes(value, buf.order())); + assertTrue(Arrays.equals(bytes, float2bytes(value, buf.order()))); } // test LITTLE_ENDIAN float buffer, write @@ -903,7 +904,7 @@ value = (float) floatBuffer.remaining(); floatBuffer.put(value); buf.get(bytes); - Arrays.equals(bytes, float2bytes(value, buf.order())); + assertTrue(Arrays.equals(bytes, float2bytes(value, buf.order()))); } } @@ -949,7 +950,7 @@ value = (int) intBuffer.remaining(); intBuffer.put(value); buf.get(bytes); - Arrays.equals(bytes, int2bytes(value, buf.order())); + assertTrue(Arrays.equals(bytes, int2bytes(value, buf.order()))); } // test LITTLE_ENDIAN int buffer, write @@ -961,7 +962,7 @@ value = (int) intBuffer.remaining(); intBuffer.put(value); buf.get(bytes); - Arrays.equals(bytes, int2bytes(value, buf.order())); + assertTrue(Arrays.equals(bytes, int2bytes(value, buf.order()))); } } @@ -1007,7 +1008,7 @@ value = (long) longBuffer.remaining(); longBuffer.put(value); buf.get(bytes); - Arrays.equals(bytes, long2bytes(value, buf.order())); + assertTrue(Arrays.equals(bytes, long2bytes(value, buf.order()))); } // test LITTLE_ENDIAN long buffer, write @@ -1019,7 +1020,7 @@ value = (long) longBuffer.remaining(); longBuffer.put(value); buf.get(bytes); - Arrays.equals(bytes, long2bytes(value, buf.order())); + assertTrue(Arrays.equals(bytes, long2bytes(value, buf.order()))); } } @@ -1065,7 +1066,7 @@ value = (short) shortBuffer.remaining(); shortBuffer.put(value); buf.get(bytes); - Arrays.equals(bytes, short2bytes(value, buf.order())); + assertTrue(Arrays.equals(bytes, short2bytes(value, buf.order()))); } // test LITTLE_ENDIAN short buffer, write @@ -1077,7 +1078,7 @@ value = (short) shortBuffer.remaining(); shortBuffer.put(value); buf.get(bytes); - Arrays.equals(bytes, short2bytes(value, buf.order())); + assertTrue(Arrays.equals(bytes, short2bytes(value, buf.order()))); } } @@ -1168,7 +1169,7 @@ assertEquals((i + 1) * nbytes, buf.position()); buf.reset(); buf.get(bytes); - Arrays.equals(char2bytes(value, buf.order()), bytes); + assertTrue(Arrays.equals(char2bytes(value, buf.order()), bytes)); } try { @@ -1204,7 +1205,7 @@ buf.putChar(i, value); assertEquals(i, buf.position()); buf.get(bytes); - Arrays.equals(char2bytes(value, buf.order()), bytes); + assertTrue(Arrays.equals(char2bytes(value, buf.order()), bytes)); } try { @@ -1311,7 +1312,7 @@ assertEquals((i + 1) * nbytes, buf.position()); buf.reset(); buf.get(bytes); - Arrays.equals(double2bytes(value, buf.order()), bytes); + assertTrue(Arrays.equals(double2bytes(value, buf.order()), bytes)); } try { @@ -1347,7 +1348,7 @@ buf.putDouble(i, value); assertEquals(i, buf.position()); buf.get(bytes); - Arrays.equals(double2bytes(value, buf.order()), bytes); + assertTrue(Arrays.equals(double2bytes(value, buf.order()), bytes)); } try { @@ -1454,7 +1455,7 @@ assertEquals((i + 1) * nbytes, buf.position()); buf.reset(); buf.get(bytes); - Arrays.equals(float2bytes(value, buf.order()), bytes); + assertTrue(Arrays.equals(float2bytes(value, buf.order()), bytes)); } try { @@ -1490,7 +1491,7 @@ buf.putFloat(i, value); assertEquals(i, buf.position()); buf.get(bytes); - Arrays.equals(float2bytes(value, buf.order()), bytes); + assertTrue(Arrays.equals(float2bytes(value, buf.order()), bytes)); } try { @@ -1591,7 +1592,7 @@ assertEquals((i + 1) * nbytes, buf.position()); buf.reset(); buf.get(bytes); - Arrays.equals(int2bytes(value, buf.order()), bytes); + assertTrue(Arrays.equals(int2bytes(value, buf.order()), bytes)); } try { @@ -1627,7 +1628,7 @@ buf.putInt(i, value); assertEquals(i, buf.position()); buf.get(bytes); - Arrays.equals(int2bytes(value, buf.order()), bytes); + assertTrue(Arrays.equals(int2bytes(value, buf.order()), bytes)); } try { @@ -1728,7 +1729,7 @@ assertEquals((i + 1) * nbytes, buf.position()); buf.reset(); buf.get(bytes); - Arrays.equals(long2bytes(value, buf.order()), bytes); + assertTrue(Arrays.equals(long2bytes(value, buf.order()), bytes)); } try { @@ -1764,7 +1765,7 @@ buf.putLong(i, value); assertEquals(i, buf.position()); buf.get(bytes); - Arrays.equals(long2bytes(value, buf.order()), bytes); + assertTrue(Arrays.equals(long2bytes(value, buf.order()), bytes)); } try { @@ -1865,7 +1866,7 @@ assertEquals((i + 1) * nbytes, buf.position()); buf.reset(); buf.get(bytes); - Arrays.equals(short2bytes(value, buf.order()), bytes); + assertTrue(Arrays.equals(short2bytes(value, buf.order()), bytes)); } try { @@ -1901,7 +1902,7 @@ buf.putShort(i, value); assertEquals(i, buf.position()); buf.get(bytes); - Arrays.equals(short2bytes(value, buf.order()), bytes); + assertTrue(Arrays.equals(short2bytes(value, buf.order()), bytes)); } try { @@ -2053,7 +2054,8 @@ step = -1; } else { smallHead = 0; - step = 0; + //Fix for Harmony 550 + step = 1; } byte bytes[] = new byte[nbytes]; int p = smallHead; @@ -2072,7 +2074,7 @@ step = -1; } else { smallHead = 0; - step = 0; + step = 1; } byte bytes[] = new byte[nbytes]; int p = smallHead; @@ -2091,7 +2093,7 @@ step = -1; } else { smallHead = 0; - step = 0; + step = 1; } byte bytes[] = new byte[nbytes]; int p = smallHead;