db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krist...@apache.org
Subject svn commit: r616788 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/UTF8UtilTest.java
Date Wed, 30 Jan 2008 15:30:40 GMT
Author: kristwaa
Date: Wed Jan 30 07:30:39 2008
New Revision: 616788

URL: http://svn.apache.org/viewvc?rev=616788&view=rev
Log:
DERBY-2760: Clean-up issues for UTF8Util.java. Added 4 lines of comments, adding binary representations
for the hexadecimal numbers.
Patch file: n/a

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/UTF8UtilTest.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/UTF8UtilTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/UTF8UtilTest.java?rev=616788&r1=616787&r2=616788&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/UTF8UtilTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/UTF8UtilTest.java
Wed Jan 30 07:30:39 2008
@@ -210,6 +210,7 @@
      */
     public void testMissingSecondByteOfTwo()
             throws IOException {
+        // 0xdf = 11011111
         byte[] data = {'a', (byte)0xdf};
         InputStream is = new ByteArrayInputStream(data);
         try {
@@ -228,6 +229,7 @@
      */
     public void testMissingSecondByteOfThree()
             throws IOException {
+        // 0xef = 11101111
         byte[] data = {'a', (byte)0xef};
         InputStream is = new ByteArrayInputStream(data);
         try {
@@ -246,6 +248,7 @@
      */
     public void testMissingThirdByteOfThree()
             throws IOException {
+        // 0xef = 11101111, 0xb8 = 10111000
         byte[] data = {'a', (byte)0xef, (byte)0xb8};
         InputStream is = new ByteArrayInputStream(data);
         try {
@@ -283,6 +286,7 @@
         // representation that only has two bytes present.
         // When skipping, this sequence is (incorrectly) taken as a sequence of
         // three characters ('a' - some three byte character - 'a').
+        // 0xef = 11101111, 0xb8 = 10111000
         byte[] data = {'a', (byte)0xef, (byte)0xb8, 'a', 'a'};
         byte[] dataWithLength =
             {0x0, 0x5, 'a', (byte)0xef, (byte)0xb8, 'a', 'a'};



Mime
View raw message