/cts/suite/audio_quality/lib/src/ |
D | StringUtil.cpp | 24 std::vector<android::String8>* StringUtil::split(const android::String8& str, char delimiter) in split() argument 28 for (unsigned int i = 0; i < str.length(); i++) { in split() 29 if (str[i] == delimiter) { in split() 31 tokens->push_back(substr(str, lastTokenEnd, i - lastTokenEnd)); in split() 36 if (lastTokenEnd < str.length()) { in split() 37 tokens->push_back(substr(str, lastTokenEnd, str.length() - lastTokenEnd)); in split() 42 android::String8 StringUtil::substr(const android::String8& str, size_t pos, size_t n) in substr() argument 44 size_t l = str.length(); in substr() 53 android::String8 result(str.string() + pos, n); in substr() 57 int StringUtil::compare(const android::String8& str, const char* other) in compare() argument [all …]
|
D | RWBuffer.h | 81 void writeStr(const android::String8& str) { in writeStr() argument 82 size_t len = str.length(); in writeStr() 84 memcpy(mBuffer + mWrPoint, str.string(), len); in writeStr()
|
/cts/suite/audio_quality/test/ |
D | StringUtilTest.cpp | 26 android::String8 str("hello"); in TEST_F() local 27 ASSERT_TRUE(StringUtil::compare(str, "hello") == 0); in TEST_F() 28 ASSERT_TRUE(StringUtil::compare(str, "hi") != 0); in TEST_F() 32 android::String8 str("hello there"); in TEST_F() local 34 android::String8 sub1 = StringUtil::substr(str, 0, 5); in TEST_F() 37 android::String8 sub2 = StringUtil::substr(str, 10, 5); in TEST_F() 40 android::String8 sub3 = StringUtil::substr(str, 6, 5); in TEST_F() 43 android::String8 sub4 = StringUtil::substr(str, 100, 5); in TEST_F() 48 android::String8 str("hello there"); in TEST_F() local 49 ASSERT_TRUE(StringUtil::endsWith(str, "there")); in TEST_F() [all …]
|
/cts/tests/tests/text/src/android/text/method/cts/ |
D | MetaKeyKeyListenerTest.java | 53 final CharSequence str = "123456"; in testPressKey() local 56 final Editable content = Editable.Factory.getInstance().newEditable(str); in testPressKey() 79 final CharSequence str = "123456"; in testReleaseKey() local 82 final Editable content = Editable.Factory.getInstance().newEditable(str); in testReleaseKey() 88 assertEquals(str.charAt(0), content.charAt(0)); in testReleaseKey() 94 assertEquals(str.charAt(1), content.charAt(1)); in testReleaseKey() 100 assertEquals(str.charAt(3), content.charAt(3)); in testReleaseKey() 105 CharSequence str = "123456"; in testAdjustMetaAfterKeypress() local 106 Spannable content = Editable.Factory.getInstance().newEditable(str); in testAdjustMetaAfterKeypress() 108 int len = str.length(); // for one line less than 100 in testAdjustMetaAfterKeypress() [all …]
|
D | CharacterPickerDialogTest.java | 56 final CharSequence str = "123456"; in testConstructor() local 57 final Editable content = Editable.Factory.getInstance().newEditable(str); in testConstructor() 65 final CharSequence str = "123456"; in testConstructorNullContext() local 66 final Editable content = Editable.Factory.getInstance().newEditable(str); in testConstructorNullContext() 75 final CharSequence str = "123456"; in testOnItemClick() local 76 Editable text = Editable.Factory.getInstance().newEditable(str); in testOnItemClick() 84 assertEquals(str, text.toString()); in testOnItemClick() 101 text = Editable.Factory.getInstance().newEditable(str); in testOnItemClick() 105 assertEquals(str, text.toString()); in testOnItemClick() 117 final CharSequence str = "123456"; in testOnClick() local [all …]
|
D | TextKeyListenerTest.java | 71 String str = "hello world! man"; in testShouldCap() local 75 assertFalse(TextKeyListener.shouldCap(Capitalize.NONE, str, 0)); in testShouldCap() 76 assertTrue(TextKeyListener.shouldCap(Capitalize.SENTENCES, str, 0)); in testShouldCap() 77 assertTrue(TextKeyListener.shouldCap(Capitalize.WORDS, str, 0)); in testShouldCap() 78 assertTrue(TextKeyListener.shouldCap(Capitalize.CHARACTERS, str, 0)); in testShouldCap() 80 assertFalse(TextKeyListener.shouldCap(Capitalize.NONE, str, 6)); in testShouldCap() 81 assertFalse(TextKeyListener.shouldCap(Capitalize.SENTENCES, str, 6)); in testShouldCap() 82 assertTrue(TextKeyListener.shouldCap(Capitalize.WORDS, str, 6)); in testShouldCap() 83 assertTrue(TextKeyListener.shouldCap(Capitalize.CHARACTERS, str, 6)); in testShouldCap() 85 assertFalse(TextKeyListener.shouldCap(Capitalize.NONE, str, 13)); in testShouldCap() [all …]
|
D | NumberKeyListenerTest.java | 103 SpannableString str = new SpannableString("012345"); in testLookup() local 104 assertEquals('0', mMockNumberKeyListener.lookup(event1, str)); in testLookup() 108 str = new SpannableString("ABCD"); in testLookup() 109 assertEquals('\0', mMockNumberKeyListener.lookup(event2, str)); in testLookup() 112 mMockNumberKeyListener.lookup(null, str); in testLookup()
|
/cts/tests/tests/util/src/android/util/cts/ |
D | StringBuilderPrinterTest.java | 40 String str = strBuilder.toString(); in testStringBuilderPrinter() local 41 assertTrue(str.startsWith("Hello")); in testStringBuilderPrinter() 42 assertEquals(' ', str.charAt(5)); in testStringBuilderPrinter() 43 assertEquals('A', str.charAt(6)); in testStringBuilderPrinter() 44 assertEquals('n', str.charAt(7)); in testStringBuilderPrinter() 45 assertEquals('d', str.charAt(8)); in testStringBuilderPrinter() 46 assertEquals('r', str.charAt(9)); in testStringBuilderPrinter() 47 assertEquals('o', str.charAt(10)); in testStringBuilderPrinter() 48 assertEquals('i', str.charAt(11)); in testStringBuilderPrinter() 49 assertEquals('d', str.charAt(12)); in testStringBuilderPrinter()
|
/cts/tools/dasm/src/dasm/ |
D | Utils.java | 47 public static Number stringToNumber(String str) in stringToNumber() argument 49 if (str.startsWith("+")) { in stringToNumber() 50 return new Integer(str.substring(1)); in stringToNumber() 52 if (str.startsWith("0x")) { in stringToNumber() 53 return (Utils.stringToSmallestInteger(str.substring(2), 16)); in stringToNumber() 54 } else if (str.indexOf('.') != -1) { in stringToNumber() 56 double x = Double.parseDouble(str); in stringToNumber() 63 return (Utils.stringToSmallestInteger(str, 10)); in stringToNumber() 70 private static Number stringToSmallestInteger(String str, int radix) in stringToSmallestInteger() argument 72 long x = Long.parseLong(str, radix); in stringToSmallestInteger()
|
D | Scanner.java | 280 String str = charBuf.toString(); in next_token() local 286 if ((tok = ReservedWords.get(str)) != null) return tok; in next_token() 289 if (DopInfo.contains(str)) in next_token() 290 return new str_token(sym.Insn, str); in next_token() 292 if (str.charAt(0) == '$') { in next_token() 293 String s = str.substring(1); in next_token() 323 return new str_token(sym.Word, str); in next_token() 458 String str = charBuf.toString(); in readNumber() local 462 if ((tok = ReservedWords.get(str)) != null) return tok; in readNumber() 466 num = Utils.stringToNumber(str); in readNumber()
|
/cts/hostsidetests/sustainedperf/shadertoy_android/jni/ |
D | utils.cpp | 68 std::string str; in GLCheckErrorStr() local 72 str = "GL_INVALID_ENUM"; in GLCheckErrorStr() 75 str = "GL_INVALID_OPERATION"; in GLCheckErrorStr() 78 str = "GL_INVALID_VALUE"; in GLCheckErrorStr() 81 str = "GL_OUT_OF_MEMORY"; in GLCheckErrorStr() 84 str = "GL_INVALID_FRAMEBUFFER_OPERATION"; in GLCheckErrorStr() 87 LOGE("OpenGL error : %s : %s (%#08x)\n", msg.c_str(), str.c_str(), e); in GLCheckErrorStr()
|
/cts/suite/audio_quality/lib/include/ |
D | StringUtil.h | 32 static std::vector<android::String8>* split(const android::String8& str, char delimiter); 34 static android::String8 substr(const android::String8& str, size_t pos, size_t n); 35 static int compare(const android::String8& str, const char* other); 36 static bool endsWith(const android::String8& str, const char* other);
|
/cts/tools/release-parser/src/com/android/cts/releaseparser/ |
D | SoParser.java | 239 for (String str : roStrings) { in getDynamicLoadingDependencies() 241 if (str.length() < 4) { in getDynamicLoadingDependencies() 245 if (str.endsWith(".so")) { in getDynamicLoadingDependencies() 247 if (str.contains(getFileName())) { in getDynamicLoadingDependencies() 250 if (str.contains(" ")) { in getDynamicLoadingDependencies() 253 if (str.contains("?")) { in getDynamicLoadingDependencies() 256 if (str.contains("%")) { in getDynamicLoadingDependencies() 257 System.err.println("ToDo getDynamicLoadingDependencies: " + str); in getDynamicLoadingDependencies() 260 if (str.startsWith("_")) { in getDynamicLoadingDependencies() 261 System.err.println("ToDo getDynamicLoadingDependencies: " + str); in getDynamicLoadingDependencies() [all …]
|
/cts/tools/vm-tests-tf/src/dot/junit/opcodes/if_nez/ |
D | Test_if_nez.java | 26 String str = null; in testN2() local 27 assertEquals(1234, t.run(str)); in testN2() 35 String str = "abc"; in testN3() local 36 assertEquals(1, t.run(str)); in testN3()
|
/cts/tests/signature/tests/src/android/signature/cts/tests/ |
D | LineSpliteratorTestBase.java | 39 protected static final Function<String, Integer> CONVERTER = str -> { 40 return Integer.parseInt(str.substring(4)); 42 protected static final Consumer<Integer> FAIL_CONSUMER = str -> { 72 doTestConverter(str -> createSpliterator(str, CONVERTER), i -> createVerifier(i)); in testConverter()
|
/cts/hostsidetests/systemui/src/android/host/systemui/ |
D | BaseTileServiceTest.java | 109 protected boolean waitFor(String str) throws DeviceNotAvailableException, InterruptedException { in waitFor() argument 110 final String searchStr = TEST_PREFIX + str; in waitFor() 118 protected boolean hasLog(String str) throws DeviceNotAvailableException { in hasLog() argument 121 return logs.contains(str); in hasLog()
|
/cts/tests/tests/database/src/android/database/cts/ |
D | AbstractWindowedCursorTest.java | 60 String str = "abcdefg"; in testIsNull() local 61 assertTrue(mWindow.putString(str, ROW_INDEX0, COLUMN_INDEX0)); in testIsNull() 73 String str = "abcdefg"; in testIsBlob() local 74 assertTrue(mWindow.putString(str, ROW_INDEX0, COLUMN_INDEX0)); in testIsBlob() 98 String str = "abcdefg"; in testGetString() local 99 assertTrue(mWindow.putString(str, ROW_INDEX0, COLUMN_INDEX0)); in testGetString() 100 assertEquals(str, mCursor.getString(COLUMN_INDEX0)); in testGetString()
|
/cts/tests/signature/lib/common/src/android/signature/cts/ |
D | DexApiDocumentParser.java | 51 private static final Function<String, DexMember> DEX_MEMBER_CONVERTER = str -> { 53 return parseLine(str, /* lineNum= */ -1); // No line info available. 59 str, lineNum) -> { 61 return parseLine(str, lineNum);
|
/cts/tests/tests/provider/src/libcore/util/ |
D | HexEncoding.java | 122 private static int toDigit(char[] str, int offset) throws IllegalArgumentException { in toDigit() argument 125 int pseudoCodePoint = str[offset]; in toDigit() 135 throw new IllegalArgumentException("Illegal char: " + str[offset] + in toDigit()
|
/cts/tests/tests/os/src/android/os/cts/ |
D | PatternMatcherTest.java | 79 String str = "test"; in testToString() local 84 mPatternMatcher = new PatternMatcher(str, PatternMatcher.PATTERN_LITERAL); in testToString() 87 mPatternMatcher = new PatternMatcher(str, PatternMatcher.PATTERN_PREFIX); in testToString() 90 mPatternMatcher = new PatternMatcher(str, PatternMatcher.PATTERN_SIMPLE_GLOB); in testToString()
|
/cts/hostsidetests/appsecurity/test-apps/V3SigningSchemeRotation/src/android/appsecurity/cts/v3rotationtests/ |
D | V3RotationTest.java | 196 private static byte[] fromHexToByteArray(String str) { in fromHexToByteArray() argument 197 if (str == null || str.length() == 0 || str.length() % 2 != 0) { in fromHexToByteArray() 201 final char[] chars = str.toCharArray(); in fromHexToByteArray()
|
/cts/tests/tests/text/src/android/text/cts/ |
D | AndroidCharacterTest.java | 165 String str = new String("if(a>b)"); in testMirror() local 166 char[] strChar = str.toCharArray(); in testMirror() 167 assertTrue(AndroidCharacter.mirror(strChar, 0, str.length())); in testMirror() 169 assertFalse(AndroidCharacter.mirror(str.toCharArray(), 0, 2)); in testMirror()
|
/cts/hostsidetests/appsecurity/src/android/appsecurity/cts/ |
D | AdoptableHostTest.java | 380 private static void assertSuccess(String str) { in assertSuccess() argument 381 if (str == null || !str.startsWith("Success")) { in assertSuccess() 382 throw new AssertionError("Expected success string but found " + str); in assertSuccess() 386 private static void assertEmpty(String str) { in assertEmpty() argument 387 if (str != null && str.trim().length() > 0) { in assertEmpty() 388 throw new AssertionError("Expected empty string but found " + str); in assertEmpty()
|
/cts/apps/CameraITS/tests/scene0/ |
D | test_tonemap_curve.py | 85 str(raw_means), str(np.round(yuv_means, 3)), RGB_MEAN_TOL)) 88 str(raw_vars), str(yuv_vars), RGB_VAR_TOL))
|
/cts/apps/CameraITS/tools/ |
D | run_sensor_fusion_box.py | 63 fps = str(FPS) 67 test_length = str(TEST_LENGTH) 121 os.mkdir(os.path.join(tmpdir, camera_id, SCENE_NAME+'_'+str(i))) 127 outdir = os.path.join(tmpdir, camera_id, SCENE_NAME+'_'+str(i))
|