Home
last modified time | relevance | path

Searched refs:toCharArray (Results 1 – 25 of 89) sorted by relevance

1234

/libcore/luni/src/test/java/libcore/java/lang/
DOldCharacterTest.java25 assertEquals(1, Character.codePointCount("\uD800\uDC00".toCharArray(), in test_codePointCountLjava_lang_CharArrayII()
27 assertEquals(3, Character.codePointCount("a\uD800\uDC00b".toCharArray(), in test_codePointCountLjava_lang_CharArrayII()
29 assertEquals(4, Character.codePointCount("a\uD800\uDC00b\uD800".toCharArray(), in test_codePointCountLjava_lang_CharArrayII()
31 assertEquals(4, Character.codePointCount("ab\uD800\uDC00b\uD800".toCharArray(), in test_codePointCountLjava_lang_CharArrayII()
41 Character.codePointCount("abc".toCharArray(), -1, 1); in test_codePointCountLjava_lang_CharArrayII()
47 Character.codePointCount("abc".toCharArray(), 0, 4); in test_codePointCountLjava_lang_CharArrayII()
53 Character.codePointCount("abc".toCharArray(), 1, 3); in test_codePointCountLjava_lang_CharArrayII()
/libcore/support/src/test/java/org/apache/harmony/testframework/
DCharSinkTester.java115 char[] expected = "EFGCDECBA".toCharArray(); in sinkTestWriteCharByChar()
127 char[] expected = "EFGCDECBA".toCharArray(); in sinkTestWriteArray()
131 out.write("EF".toCharArray()); in sinkTestWriteArray()
132 out.write("GCDE".toCharArray()); in sinkTestWriteArray()
133 out.write("CBA".toCharArray()); in sinkTestWriteArray()
140 char[] expected = "EFGCDECBA".toCharArray(); in sinkTestWriteOffset()
180 char[] expectedChars = "EF".toCharArray(); in sinkTestWriteAfterClose()
187 out.write("GCDE".toCharArray()); in sinkTestWriteAfterClose()
197 out.write("EF".toCharArray()); in sinkTestWriteAfterCloseSuppressed()
199 out.write("GCDE".toCharArray()); // no exception expected! in sinkTestWriteAfterCloseSuppressed()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/
DStringTest.java229 s = newString(1, 3, "_abc_".toCharArray()); in test_contentEqualsLjava_lang_CharSequence()
248 s = newString(1, 3, "_abc_".toCharArray()); in test_boolean_contentEquals_StringBuffer()
268 s = newString(1, 26, "_abcdefghijklmnopqrstuvwxyz_".toCharArray()); in test_containsLjava_lang_CharSequence()
305 result = newString(2, 4, "__a\uD800\uDC00b__".toCharArray()) in test_offsetByCodePoints_II()
309 result = newString(2, 4, "__abcd__".toCharArray()).offsetByCodePoints( in test_offsetByCodePoints_II()
313 result = newString(2, 4, "__a\uD800\uDC00b__".toCharArray()) in test_offsetByCodePoints_II()
317 result = newString(2, 4, "__a\uD800\uDC00b__".toCharArray()) in test_offsetByCodePoints_II()
321 result = newString(2, 4, "__a\uD800\uDC00b__".toCharArray()) in test_offsetByCodePoints_II()
325 result = newString(2, 4, "__\uD800\uDC00bc__".toCharArray()) in test_offsetByCodePoints_II()
329 result = newString(2, 4, "__a\uDC00bc__".toCharArray()) in test_offsetByCodePoints_II()
[all …]
DCharacterTest.java137 assertEquals('a', Character.codePointAt("abc".toCharArray(), 0)); in test_codePointAt$CI()
138 assertEquals('b', Character.codePointAt("abc".toCharArray(), 1)); in test_codePointAt$CI()
139 assertEquals('c', Character.codePointAt("abc".toCharArray(), 2)); in test_codePointAt$CI()
140 assertEquals(0x10000, Character.codePointAt("\uD800\uDC00".toCharArray(), 0)); in test_codePointAt$CI()
141 assertEquals('\uDC00', Character.codePointAt("\uD800\uDC00".toCharArray(), 1)); in test_codePointAt$CI()
150 Character.codePointAt("abc".toCharArray(), -1); in test_codePointAt$CI()
156 Character.codePointAt("abc".toCharArray(), 4); in test_codePointAt$CI()
163 assertEquals('a', Character.codePointAt("abc".toCharArray(), 0, 3)); in test_codePointAt$CII()
164 assertEquals('b', Character.codePointAt("abc".toCharArray(), 1, 3)); in test_codePointAt$CII()
165 assertEquals('c', Character.codePointAt("abc".toCharArray(), 2, 3)); in test_codePointAt$CII()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
DCharArrayWriterTest.java70 cr = new CharArrayReader(cw.toCharArray()); in test_reset()
91 cr = new CharArrayReader(cw.toCharArray()); in test_toCharArray()
103 cr = new CharArrayReader(cw.toCharArray()); in test_toString()
112 cr = new CharArrayReader(cw.toCharArray()); in test_write$CII()
137 cr = new CharArrayReader(cw.toCharArray()); in test_writeI()
146 cr = new CharArrayReader(cw.toCharArray()); in test_writeLjava_lang_StringII()
DReaderTest.java29 MockReader mockReader = new MockReader(s.toCharArray()); in test_Reader_CharBuffer_null()
43 char[] srcBuffer = s.toCharArray(); in test_Reader_CharBuffer_ZeroChar()
55 char[] srcBuffer = s.toCharArray(); in test_Reader_CharBufferChar()
96 char[] srcBuffer = string.toCharArray(); in test_read()
138 char[] srcBuffer = string.toCharArray(); in test_skip()
DWriterTesterTest.java88 return Streams.streamToString(new FileReader(file)).toCharArray(); in getChars()
103 return writer.toCharArray(); in getChars()
126 return chars.toCharArray(); in create()
151 return writer.toString().toCharArray(); in getChars()
210 return new String(out.toByteArray(), "UTF-8").toCharArray(); in getChars()
DStreamTokenizerTest.java302 Reader reader = new CharArrayReader("t // t t t".toCharArray()); in test_slashSlashComments_withSSOpen()
315 Reader reader = new CharArrayReader("// t".toCharArray()); in test_slashSlashComments_withSSOpen_NoComment()
328 Reader reader = new CharArrayReader("// t".toCharArray()); in test_slashSlashComments_withSSClosed()
354 Reader reader = new CharArrayReader("t /* t */ t".toCharArray()); in test_slashStarComments_withSTOpen()
368 Reader reader = new CharArrayReader("t /* t */ t".toCharArray()); in test_slashStarComments_withSTClosed()
/libcore/luni/src/test/java/libcore/java/io/
DOldAndroidCharArrayReaderTest.java32 CharArrayReader a = new CharArrayReader(str.toCharArray()); in testCharArrayReader()
33 CharArrayReader b = new CharArrayReader(str.toCharArray()); in testCharArrayReader()
34 CharArrayReader c = new CharArrayReader(str.toCharArray()); in testCharArrayReader()
35 CharArrayReader d = new CharArrayReader(str.toCharArray()); in testCharArrayReader()
DOldWriterTest.java102 tobj.write("01234".toCharArray()); in test_write$C()
104 tobj.write("abcde".toCharArray()); in test_write$C()
106 tobj.write("ABCDEFGHIJ".toCharArray()); in test_write$C()
108 tobj.write("z".toCharArray()); // Just fill the writer to its limit! in test_write$C()
110 tobj.write("LES JEUX SONT FAITS".toCharArray()); in test_write$C()
DOldAndroidPrintWriterTest.java52 b.print("BCD".toCharArray()); in testPrintWriter()
61 b.println("BCD".toCharArray()); in testPrintWriter()
/libcore/luni/src/test/java/tests/targets/security/
DKeyStoreTest.java61 keyStorePassword.toCharArray()); in testKeyStoreLoad()
87 keyStore.load(null, "the secret password".toCharArray()); in testKeyStoreCreate()
127 new PasswordProtection("the key password".toCharArray())); in testKeyStoreCreate()
141 .toCharArray())); in testKeyStoreCreate()
154 keyStore.store(stream, "the keystore password".toCharArray()); in testKeyStoreCreate()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
DBidiTest.java70 bd = new Bidi("a".toCharArray(), 0, null, 0, 1, in testNullPointerConstructor()
76 bd = new Bidi("1".toCharArray(), 0, new byte[] { 0 }, 0, 20, in testBadLength()
84 bd = new Bidi("1234567".toCharArray(), 0, new byte[] { 0 }, 0, 4, in testBadLength()
92 bd = new Bidi("1234567".toCharArray(), 4, new byte[] { 0, 1, 2, 3, in testBadLength()
100 bd = new Bidi("1234567".toCharArray(), 0, new byte[] { 0, 1, 2, 3, in testBadLength()
300 bd = new Bidi("".toCharArray(), 0, new byte[] {}, 0, 1, in testBadEmbeddings()
616 bd = new Bidi("a\u05D0a\"a\u05D0\"\u05D0a".toCharArray(), 0, in testComplicatedOverrideBidi()
656 assertFalse(Bidi.requiresBidi("".toCharArray(), 0, 1)); in testRequiresBidi()
662 assertFalse(Bidi.requiresBidi("aaa".toCharArray(), -1, 1)); in testRequiresBidi()
668 assertFalse(Bidi.requiresBidi("aaa".toCharArray(), 1, -1)); in testRequiresBidi()
[all …]
/libcore/benchmarks/src/benchmarks/
DStringIterationBenchmark.java49 char[] chars = s.toCharArray(); in timeStringIteration2()
58 char[] chars = s.toCharArray(); in timeStringToCharArray()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/
DKeyManagerFactorySpiTest.java51 char[] psw = "password".toCharArray(); in test_engineInit_01()
106 char[] psw = "password".toCharArray(); in test_engineInit_02()
130 char[] psw = "password".toCharArray(); in test_engineGetKeyManagers()
/libcore/luni/src/test/java/libcore/javax/crypto/
DSecretKeyFactoryTest.java30 private static final char[] PASSWORD = "google".toCharArray();
127 char[] password = "password".toCharArray(); in test_PBKDF2_rfc3211_64()
149 + "n-entities via n-1 entiteeheehees").toCharArray(); in test_PBKDF2_rfc3211_192()
173 char[] password = "\u0141\u0142".toCharArray(); in test_PBKDF2_b8312059()
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/
DKeyStore4Test.java44 keyStore.load(null, "PASSWORD".toCharArray()); in setUp()
235 keyStore.getKey("unknownalias", "PASSWORD".toCharArray()); in testGetKey()
283 char[] password = "PASSWORD".toCharArray(); in testStoreOutputStreamCharArray()
311 keyStore.store(os, "".toCharArray()); in testStoreOutputStreamCharArray()
359 return new KeyStore.PasswordProtection("PASSWORD".toCharArray()); in testStoreLoadStoreParameter()
407 return new KeyStore.PasswordProtection("".toCharArray()); in testStoreLoadStoreParameter()
451 char[] password = "PASSWORD".toCharArray(); in testLoadInputStreamCharArray()
515 return new KeyStore.PasswordProtection("PASSWORD".toCharArray()); in testLoadLoadStoreParameter()
/libcore/luni/src/test/java/libcore/java/nio/charset/
DOldCharset_MultiByte_ISO_2022_JP.java23 testChars = "東京 とうきょう トウキョウ Tokyo 123".toCharArray(); in setUp()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/org/xml/sax/
DHandlerBaseTest.java92 h.characters("The quick brown fox".toCharArray(), 4, 11); in testCharacters()
100 h.ignorableWhitespace(" ".toCharArray(), 4, 11); in testIgnorableWhitespace()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/charset/
DUTF16BECharsetTest.java50 char[] output = "ab\u5D14\u654F".toCharArray(); in testDecode_Normal()
DUTF16LECharsetTest.java50 char[] output = "ab\u5D14\u654F".toCharArray(); in testDecode_Normal()
DISOCharsetTest.java54 char[] output = "ab??".toCharArray(); in testDecode_Normal()
DASCCharsetTest.java55 char[] output = "ab??".toCharArray(); in testDecode_Normal()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/org/xml/sax/helpers/
DDefaultHandlerTest.java120 h.characters("The quick brown fox".toCharArray(), 4, 11); in testCharacters()
128 h.ignorableWhitespace(" ".toCharArray(), 4, 11); in testIgnorableWhitespace()
/libcore/luni/src/test/java/libcore/java/net/
DOldPasswordAuthenticationTest.java27 char[] password = "hunter2".toCharArray(); in test_ConstructorLjava_lang_String$C()

1234