summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-09-19 13:14:52 (EDT)
committerEike Stepper2007-09-19 13:14:52 (EDT)
commita7419ab6a610ecdc1ff54670eb6f193c8ffec01c (patch)
tree259f1de2ffb068a61147ac941bc19214a68f0de0
parent82df016701199a4c5742a85021a8fa4353eed0ca (diff)
downloadcdo-a7419ab6a610ecdc1ff54670eb6f193c8ffec01c.zip
cdo-a7419ab6a610ecdc1ff54670eb6f193c8ffec01c.tar.gz
cdo-a7419ab6a610ecdc1ff54670eb6f193c8ffec01c.tar.bz2
[203866] Support UTF string
https://bugs.eclipse.org/bugs/show_bug.cgi?id=203866
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/UTFTest.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/UTFTest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/UTFTest.java
index a009319..d16719b 100644
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/UTFTest.java
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/UTFTest.java
@@ -20,10 +20,9 @@ public class UTFTest extends AbstractOMTest
{
private static final int UNSIGNED_SHORT_MAX = (1 << 16) - 1;
- private static final int MAX = UNSIGNED_SHORT_MAX / 10 + 1;
-
public void testUTF8_OneOctet() throws Exception
{
+ final int MAX = UNSIGNED_SHORT_MAX / 10 + 1;
String part = "0123456789";
assertEquals(10, part.length());
@@ -46,14 +45,15 @@ public class UTFTest extends AbstractOMTest
public void testUTF8_ThreeOctets() throws Exception
{
+ final int MAX = UNSIGNED_SHORT_MAX >> 1;
StringBuilder builder = new StringBuilder();
- for (int i = 0; i < UNSIGNED_SHORT_MAX; i++)
+ for (int i = 0; i < MAX; i++)
{
builder.append("\u6771");
}
String str = builder.toString();
- assertEquals(UNSIGNED_SHORT_MAX, str.length());
+ assertEquals(MAX, str.length());
ByteArrayOutputStream baos = new ByteArrayOutputStream();
DataOutputStream dos = new DataOutputStream(baos);