01: package com.google.gwt.dev.util;
02:
03: import junit.framework.TestCase;
04:
05: import java.net.URL;
06:
07: /** Pure junit test of Utility functionality*/
08: public class UtilityTest extends TestCase {
09:
10: /** Tests that URLAsChars correctly processes unicode*/
11: public void testUnicode() {
12: URL r = this .getClass().getResource("unicodeTest.txt");
13: assertNotNull(r);
14:
15: char[] x = Util.readURLAsChars(r);
16: assertEquals(2, x.length);
17: char a = '\u4F60';
18: assertEquals(x[0], a);
19: assertEquals(x[1], '\u597D');
20: }
21:
22: }
|