harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhouke...@apache.org
Subject svn commit: r799505 - /harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/SocketTest.java
Date Fri, 31 Jul 2009 03:29:48 GMT
Author: zhoukevin
Date: Fri Jul 31 03:29:46 2009
New Revision: 799505

URL: http://svn.apache.org/viewvc?rev=799505&view=rev
Log:
Fix test failure of SocketTest.test_sendUrgentDataI method for z/OS.

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/SocketTest.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/SocketTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/SocketTest.java?rev=799505&r1=799504&r2=799505&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/SocketTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/SocketTest.java
Fri Jul 31 03:29:46 2009
@@ -1582,8 +1582,10 @@
         server.close();
 
         receivedString = new String(myBytes, 0, totalBytesRead);
-        assertEquals("Urgent data was not received with one urgent byte",
-                sendString + (char) urgentByte + sendString, receivedString);
+        assertEquals(
+                "Urgent data was not received with one urgent byte",
+                sendString + new String(new byte[] { urgentByte }) + sendString,
+                receivedString);
 
         /*
          * Test 3: Now validate that urgent data is received as expected. Expect
@@ -1634,7 +1636,8 @@
 
         receivedString = new String(myBytes, 0, totalBytesRead);
         assertEquals("Urgent data was not received with two urgent bytes",
-                sendString + (char) urgentByte1 + (char) urgentByte2
+                sendString
+                        + new String(new byte[] { urgentByte1, urgentByte2 })
                         + sendString, receivedString);
 
         /*
@@ -1663,8 +1666,8 @@
         client.close();
         server.close();
 
-        assertEquals("Sole urgent data was not received", (int) urgentByte,
-                byteRead);
+        assertEquals("Sole urgent data was not received",
+                (int) (urgentByte & 0xff), byteRead);
     }
 
     /**



Mime
View raw message