Home
last modified time | relevance | path

Searched refs:indexOf (Results 1 – 25 of 272) sorted by relevance

1234567891011

/libcore/ojluni/src/test/java/lang/StringBuilder/
DCompactStringBuilder.java64 assertEquals(new StringBuilder(ORIGIN).indexOf("A", 0), 0); in testCompactStringBuilderForLatinA()
65 assertEquals(new StringBuilder(ORIGIN).indexOf("\uFF21", 0), -1); in testCompactStringBuilderForLatinA()
66 assertEquals(new StringBuilder(ORIGIN).indexOf("", 0), 0); in testCompactStringBuilderForLatinA()
68 .indexOf("A", 0), 0); in testCompactStringBuilderForLatinA()
70 .indexOf("A", 0), 2); in testCompactStringBuilderForLatinA()
108 assertEquals(new StringBuilder(ORIGIN).indexOf("A", 0), -1); in testCompactStringBuilderForNonLatinA()
109 assertEquals(new StringBuilder(ORIGIN).indexOf("\uFF21", 0), 0); in testCompactStringBuilderForNonLatinA()
110 assertEquals(new StringBuilder(ORIGIN).indexOf("", 0), 0); in testCompactStringBuilderForNonLatinA()
143 assertEquals(new StringBuilder(ORIGIN).indexOf("A", 0), 1); in testCompactStringBuilderForMixedA1()
144 assertEquals(new StringBuilder(ORIGIN).indexOf("\uFF21", 0), 0); in testCompactStringBuilderForMixedA1()
[all …]
DBuilderForwarding.java93 sb.indexOf(null); in indexOfString()
104 assertEquals( sb.indexOf("y"), 1 ); in indexOfString()
105 assertEquals( sb.indexOf("not found"), -1 ); in indexOfString()
113 sb.indexOf(null,1); in indexOfStringint()
121 assertEquals( sb.indexOf("y",0), 1 ); in indexOfStringint()
122 assertEquals( sb.indexOf("y",1), 1 ); in indexOfStringint()
123 assertEquals( sb.indexOf("y",2), 2 ); in indexOfStringint()
124 assertEquals( sb.indexOf("not found"), -1 ); in indexOfStringint()
132 sb.indexOf(null,1); in indexOfStringIntNull()
148 sb.indexOf(null); in indexOfStringNull()
/libcore/ojluni/src/test/java/lang/StringBuffer/
DIndexOf.java87 } while (sourceString.indexOf(targetString) != -1); in simpleTest()
92 if (sourceBuffer.indexOf(targetString) != index1) in simpleTest()
94 if (sourceBuffer.indexOf(targetString, 5) != index1) in simpleTest()
96 if (sourceBuffer.indexOf(targetString, 99) == index1) in simpleTest()
116 } while (sourceString.indexOf(targetString) != -1); in compareIndexOfLastIndexOf()
124 while((index2 = sourceBuffer.indexOf(targetString,index2+1)) != -1) in compareIndexOfLastIndexOf()
129 if (sourceBuffer.indexOf(targetString) != in compareIndexOfLastIndexOf()
133 if (sourceString.indexOf(targetString) != in compareIndexOfLastIndexOf()
162 int sAnswer = testString.indexOf(fragment); in compareStringStringBuffer()
163 int sbAnswer = testBuffer.indexOf(fragment); in compareStringStringBuffer()
[all …]
DCompactStringBuffer.java64 assertEquals(new StringBuffer(ORIGIN).indexOf("A", 0), 0); in testCompactStringBufferForLatinA()
65 assertEquals(new StringBuffer(ORIGIN).indexOf("\uFF21", 0), -1); in testCompactStringBufferForLatinA()
66 assertEquals(new StringBuffer(ORIGIN).indexOf("", 0), 0); in testCompactStringBufferForLatinA()
68 .indexOf("A", 0), 0); in testCompactStringBufferForLatinA()
70 .indexOf("A", 0), 2); in testCompactStringBufferForLatinA()
108 assertEquals(new StringBuffer(ORIGIN).indexOf("A", 0), -1); in testCompactStringBufferForNonLatinA()
109 assertEquals(new StringBuffer(ORIGIN).indexOf("\uFF21", 0), 0); in testCompactStringBufferForNonLatinA()
110 assertEquals(new StringBuffer(ORIGIN).indexOf("", 0), 0); in testCompactStringBufferForNonLatinA()
143 assertEquals(new StringBuffer(ORIGIN).indexOf("A", 0), 1); in testCompactStringBufferForMixedA1()
144 assertEquals(new StringBuffer(ORIGIN).indexOf("\uFF21", 0), 0); in testCompactStringBufferForMixedA1()
[all …]
DBufferForwarding.java89 assertEquals( sb.indexOf("y"), 1 ); in indexOfString()
90 assertEquals( sb.indexOf("not found"), -1 ); in indexOfString()
96 assertEquals( sb.indexOf("y",0), 1 ); in indexOfStringint()
97 assertEquals( sb.indexOf("y",1), 1 ); in indexOfStringint()
98 assertEquals( sb.indexOf("y",2), 2 ); in indexOfStringint()
99 assertEquals( sb.indexOf("not found"), -1 ); in indexOfStringint()
107 sb.indexOf(null,1); in indexOfStringIntNull()
123 sb.indexOf(null); in indexOfStringNull()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/prefs/
DInvalidPreferencesFormatExceptionTest.java47 assertTrue(e.getMessage().indexOf("root") < 0); in testInvalidPreferencesFormatExceptionStringThrowable()
48 assertTrue(e.getMessage().indexOf(t.getClass().getName()) < 0); in testInvalidPreferencesFormatExceptionStringThrowable()
49 assertTrue(e.getMessage().indexOf("msg") >= 0); in testInvalidPreferencesFormatExceptionStringThrowable()
60 assertTrue(e.getMessage().indexOf("root") >= 0);
61 assertTrue(e.getMessage().indexOf(t.getClass().getName()) >= 0);
/libcore/luni/src/test/java/libcore/javax/xml/xpath/
DXPathExceptionTest.java85 assertNotEquals(-1, baos.toString().indexOf("javax.xml.xpath.XPathException")); in printStackTraceWithPrintStream_nullCause()
96 assertNotEquals(-1, baos.toString().indexOf("TestCauseException")); in printStackTraceWithPrintStream_nonNullCause()
97 assertNotEquals(-1, baos.toString().indexOf("javax.xml.xpath.XPathException")); in printStackTraceWithPrintStream_nonNullCause()
108 assertNotEquals(-1, baos.toString().indexOf("javax.xml.xpath.XPathException")); in printStackTraceWithPrintWriter_nullCause()
119 assertNotEquals(-1, baos.toString().indexOf("TestCauseException")); in printStackTraceWithPrintWriter_nonNullCause()
120 assertNotEquals(-1, baos.toString().indexOf("javax.xml.xpath.XPathException")); in printStackTraceWithPrintWriter_nonNullCause()
/libcore/ojluni/src/main/java/java/util/logging/
DFormatter.java136 if (format.indexOf("{0") >= 0 || format.indexOf("{1") >=0 || in formatMessage()
137 format.indexOf("{2") >=0|| format.indexOf("{3") >=0) { in formatMessage()
/libcore/ojluni/src/main/java/sun/security/x509/
DDNSName.java77 if (name.indexOf(' ') != -1) in DNSName()
85 endIndex = name.indexOf('.', startIndex); in DNSName()
93 if (alpha.indexOf(name.charAt(startIndex)) < 0) in DNSName()
98 if ((alphaDigitsAndHyphen).indexOf(x) < 0) in DNSName()
239 for (int i = name.indexOf('.'); i >= 0; i = name.indexOf('.', i + 1)) { in subtreeDepth()
/libcore/luni/src/test/java/libcore/java/util/logging/
DOldXMLFormatterTest.java45 .indexOf("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>"); in testXMLFormatter()
46 int dtdPos = result.indexOf("<!DOCTYPE log SYSTEM \"logger.dtd\">"); in testXMLFormatter()
47 int rootPos = result.indexOf("<log>"); in testXMLFormatter()
56 .getTail(handler).indexOf("/log>") > 0); in testXMLFormatter()
/libcore/luni/src/test/java/libcore/java/util/
DOldAndroidArrayListTest.java51 assertEquals(0, array.indexOf(Integer.valueOf(1))); in testArrayList()
53 assertTrue(array.indexOf(Integer.valueOf(5)) < 0); in testArrayList()
67 assertEquals(0, array.indexOf(Integer.valueOf(1))); in testArrayList()
69 assertTrue(array.indexOf(Integer.valueOf(5)) < 0); in testArrayList()
76 assertTrue(array.indexOf(Integer.valueOf(5)) < 0); in testArrayList()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/charset/
DCodingErrorActionTest.java58 assertTrue(CodingErrorAction.IGNORE.toString().indexOf("IGNORE") != -1); in testToString()
59 assertTrue(CodingErrorAction.REPLACE.toString().indexOf("REPLACE") != -1); in testToString()
60 assertTrue(CodingErrorAction.REPORT.toString().indexOf("REPORT") != -1); in testToString()
DCoderResultTest.java58 assertTrue(CoderResult.OVERFLOW.toString().indexOf("OVERFLOW") != -1); in testConstants()
78 assertTrue(CoderResult.UNDERFLOW.toString().indexOf("UNDERFLOW") != -1); in testConstants()
258 assertTrue(CoderResult.OVERFLOW.toString().indexOf("OVERFLOW") != -1); in testToString()
259 assertTrue(CoderResult.UNDERFLOW.toString().indexOf("UNDERFLOW") != -1); in testToString()
261 .indexOf("666") != -1); in testToString()
262 assertTrue(CoderResult.unmappableForLength(666).toString().indexOf( in testToString()
DUnsupportedCharsetExceptionTest.java38 assertTrue(ex.getMessage().indexOf("impossible") != -1); in testConstructor()
43 assertTrue(ex.getMessage().indexOf("ascii") != -1); in testConstructor()
53 assertTrue(ex.getMessage().indexOf("null") != -1); in testConstructor()
DUnmappableCharacterExceptionTest.java38 assertTrue(ex.getMessage().indexOf("3") != -1); in testConstructor()
43 assertTrue(ex.getMessage().indexOf("-3") != -1); in testConstructor()
48 assertTrue(ex.getMessage().indexOf("0") != -1); in testConstructor()
DMalformedInputExceptionTest.java38 assertTrue(ex.getMessage().indexOf("3") != -1); in testConstructor()
43 assertTrue(ex.getMessage().indexOf("-3") != -1); in testConstructor()
48 assertTrue(ex.getMessage().indexOf("0") != -1); in testConstructor()
DIllegalCharsetNameExceptionTest.java38 assertTrue(ex.getMessage().indexOf("impossible") != -1); in testConstructor()
43 assertTrue(ex.getMessage().indexOf("ascii") != -1); in testConstructor()
53 assertTrue(ex.getMessage().indexOf("null") != -1); in testConstructor()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/
DStringBufferTest.java538 assertEquals(0, sb.indexOf("0")); in test_IndexOfStringInt()
539 assertEquals(0, sb.indexOf("012")); in test_IndexOfStringInt()
540 assertEquals(-1, sb.indexOf("02")); in test_IndexOfStringInt()
541 assertEquals(8, sb.indexOf("89")); in test_IndexOfStringInt()
543 assertEquals(0, sb.indexOf("0"), 0); in test_IndexOfStringInt()
544 assertEquals(0, sb.indexOf("012"), 0); in test_IndexOfStringInt()
545 assertEquals(-1, sb.indexOf("02"), 0); in test_IndexOfStringInt()
546 assertEquals(8, sb.indexOf("89"), 0); in test_IndexOfStringInt()
548 assertEquals(-1, sb.indexOf("0"), 5); in test_IndexOfStringInt()
549 assertEquals(-1, sb.indexOf("012"), 5); in test_IndexOfStringInt()
[all …]
DString2Test.java536 assertEquals("Invalid index returned", 1, hw1.indexOf('e')); in test_indexOfI()
537 assertEquals("Invalid index returned", 1, "a\ud800\udc00".indexOf(0x10000)); in test_indexOfI()
545 assertEquals("Invalid character index returned", 5, hw1.indexOf('W', 2)); in test_indexOfII()
546 assertEquals("Invalid index returned", 2, "ab\ud800\udc00".indexOf(0x10000, 1)); in test_indexOfII()
554 assertTrue("Failed to find string", hw1.indexOf("World") > 0); in test_indexOfLjava_lang_String()
555 assertTrue("Failed to find string", !(hw1.indexOf("ZZ") > 0)); in test_indexOfLjava_lang_String()
563 assertTrue("Failed to find string", hw1.indexOf("World", 0) > 0); in test_indexOfLjava_lang_StringI()
564 assertTrue("Found string outside index", !(hw1.indexOf("Hello", 6) > 0)); in test_indexOfLjava_lang_StringI()
566 hello1.indexOf("", -5)); in test_indexOfLjava_lang_StringI()
567 assertEquals("Reported wrong error code", 5, hello1.indexOf("", 5)); in test_indexOfLjava_lang_StringI()
[all …]
/libcore/luni/src/main/java/libcore/icu/
DICU.java153 final int first = string.indexOf('_'); in parseLangScriptRegionAndVariants()
154 final int second = string.indexOf('_', first + 1); in parseLangScriptRegionAndVariants()
155 final int third = string.indexOf('_', second + 1); in parseLangScriptRegionAndVariants()
236 final int extensionsIndex = localeId.indexOf('@'); in localeFromIcuLocaleId()
274 final int separatorIndex = extension.indexOf('='); in localeFromIcuLocaleId()
419 i = pattern.indexOf('\'', i + 1); in getDateFormatOrder()
480 if (pattern.indexOf('#') == -1) { in transformHashSign()
513 boolean contains_B = pattern.indexOf('B') != -1; in transformSymbolB()
515 boolean contains_b = pattern.indexOf('b') != -1; in transformSymbolB()
526 if (pattern.indexOf('H') != -1) { in transformSymbolB()
[all …]
/libcore/luni/src/test/java/tests/security/cert/
DCertificateParsingExceptionTest.java104 .indexOf(toS) != -1)); in testCertificateParsingException05()
150 .indexOf(toS) != -1)); in testCertificateParsingException08()
170 .indexOf(msgs[i]) != -1); in testCertificateParsingException09()
173 .indexOf(toS) != -1); in testCertificateParsingException09()
DCRLExceptionTest.java99 .indexOf(toS) != -1)); in testCRLException05()
143 .indexOf(toS) != -1)); in testCRLException08()
163 .indexOf(msgs[i]) != -1); in testCRLException09()
166 .indexOf(toS) != -1); in testCRLException09()
DCertStoreExceptionTest.java101 .indexOf(toS) != -1)); in testCertStoreException05()
145 .indexOf(toS) != -1)); in testCertStoreException08()
165 .indexOf(msgs[i]) != -1); in testCertStoreException09()
168 .indexOf(toS) != -1); in testCertStoreException09()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/
DSSLExceptionTest.java84 .indexOf(toS) != -1)); in testSSLException04()
127 .indexOf(toS) != -1)); in testSSLException07()
147 .indexOf(msgs[i]) != -1); in testSSLException08()
150 .indexOf(toS) != -1); in testSSLException08()
/libcore/luni/src/test/java/tests/security/spec/
DInvalidKeySpecExceptionTest.java103 .indexOf(toS) != -1)); in testInvalidKeySpecException05()
147 .indexOf(toS) != -1)); in testInvalidKeySpecException08()
167 .indexOf(msgs[i]) != -1); in testInvalidKeySpecException09()
170 .indexOf(toS) != -1); in testInvalidKeySpecException09()

1234567891011