FileDocCategorySizeDatePackage
CharacterImplTest.javaAPI DocAndroid 1.5 API1955Wed May 06 22:41:04 BST 2009org.apache.harmony.luni.tests.java.lang

CharacterImplTest

public class CharacterImplTest extends TestCase

Fields Summary
Constructors Summary
Methods Summary
public voidtest_valueOfC()

        // test the cache range
        for (char c = '\u0000"; c < 512; c++) {
            Character e = new Character(c);
            Character a = Character.valueOf(c);
            assertEquals(e, a);

            // WARN: this assertion may not be valid on other JREs
            assertSame(Character.valueOf(c), Character.valueOf(c));
        }
        // test the rest of the chars
        for (int c = '\u0512"; c <= Character.MAX_VALUE; c++) {
            assertEquals(new Character((char) c), Character.valueOf((char) c));
        }