/frameworks/base/services/tests/servicestests/src/com/android/server/notification/ |
D | ValidateNotificationPeopleTest.java | 38 String[] expected = { "foobar" }; in testSingleString() local 40 bundle.putString(Notification.EXTRA_PEOPLE, expected[0]); in testSingleString() 42 assertStringArrayEquals("string should be in result[0]", expected, result); in testSingleString() 47 String[] expected = { "foobar" }; in testSingleCharArray() local 49 bundle.putCharArray(Notification.EXTRA_PEOPLE, expected[0].toCharArray()); in testSingleCharArray() 51 assertStringArrayEquals("char[] should be in result[0]", expected, result); in testSingleCharArray() 56 String[] expected = { "foobar" }; in testSingleCharSequence() local 58 bundle.putCharSequence(Notification.EXTRA_PEOPLE, new SpannableString(expected[0])); in testSingleCharSequence() 60 assertStringArrayEquals("charSequence should be in result[0]", expected, result); in testSingleCharSequence() 66 String[] expected = { "foobar" }; in testStringArraySingle() local [all …]
|
/frameworks/base/test-runner/src/android/test/ |
D | MoreAsserts.java | 43 public static void assertAssignableFrom(Class<?> expected, Object actual) { in assertAssignableFrom() argument 44 assertAssignableFrom(expected, actual.getClass()); in assertAssignableFrom() 52 public static void assertAssignableFrom(Class<?> expected, Class<?> actual) { in assertAssignableFrom() argument 54 "Expected " + expected.getCanonicalName() + in assertAssignableFrom() 56 expected.isAssignableFrom(actual)); in assertAssignableFrom() 84 String message, byte[] expected, byte[] actual) { in assertEquals() argument 85 if (expected.length != actual.length) { in assertEquals() 86 failWrongLength(message, expected.length, actual.length); in assertEquals() 88 for (int i = 0; i < expected.length; i++) { in assertEquals() 89 if (expected[i] != actual[i]) { in assertEquals() [all …]
|
/frameworks/base/tools/split-select/ |
D | Grouper_test.cpp | 99 Vector<const char*> expected; in expectHasGroupWithSplits() local 100 expected.add(a); in expectHasGroupWithSplits() 101 expectHasGroupWithSplits(expected); in expectHasGroupWithSplits() 105 Vector<const char*> expected; in expectHasGroupWithSplits() local 106 expected.add(a); in expectHasGroupWithSplits() 107 expected.add(b); in expectHasGroupWithSplits() 108 expectHasGroupWithSplits(expected); in expectHasGroupWithSplits() 112 Vector<const char*> expected; in expectHasGroupWithSplits() local 113 expected.add(a); in expectHasGroupWithSplits() 114 expected.add(b); in expectHasGroupWithSplits() [all …]
|
D | Rule_test.cpp | 42 std::string expected( in TEST() local 68 expected.erase(std::remove_if(expected.begin(), expected.end(), ::isspace), expected.end()); in TEST() 74 ASSERT_EQ(expected, result); in TEST()
|
D | SplitSelector_test.cpp | 52 SplitDescription expected; in TEST() local 53 ASSERT_TRUE(SplitDescription::parse(String8("hdpi"), &expected)); in TEST() 54 EXPECT_GE(bestSplits.indexOf(expected), 0); in TEST() 57 ssize_t idx = rules.indexOfKey(expected); in TEST()
|
/frameworks/base/core/tests/coretests/src/android/text/ |
D | StaticLayoutDirectionsTest.java | 74 private static Directions[] expected = { field in StaticLayoutDirectionsTest 117 checkDirections(b.build(), i, b.text, expected, f); in testDirections() local 135 Directions expected = dirs(0, LVL1_1, 1, LVL2_1, 2, 3 | (1 << Layout.RUN_LEVEL_SHIFT)); in testTrailingWhitespace() local 136 expectDirections("split line", expected, result); in testTrailingWhitespace() 149 int[] expected = { 0, 1, 4, 3, 2, 5 }; in testNextToRightOf() local 152 for (int i = 1; i < expected.length; ++i) { in testNextToRightOf() 154 if (t != expected[i]) { in testNextToRightOf() 156 expected[i] + " got: " + t); in testNextToRightOf() 165 int[] expected = { 0, 1, 4, 3, 2, 5 }; in testNextToLeftOf() local 168 for (int i = expected.length - 1; --i >= 0;) { in testNextToLeftOf() [all …]
|
/frameworks/base/core/tests/coretests/src/android/net/ |
D | IpPrefixTest.java | 47 } catch(RuntimeException expected) {} in testConstructor() 52 } catch(RuntimeException expected) {} in testConstructor() 57 } catch(RuntimeException expected) {} in testConstructor() 64 } catch(IllegalArgumentException expected) {} in testConstructor() 69 } catch(IllegalArgumentException expected) {} in testConstructor() 74 } catch(IllegalArgumentException expected) {} in testConstructor() 79 } catch(IllegalArgumentException expected) {} in testConstructor() 84 } catch(IllegalArgumentException expected) {} in testConstructor() 89 } catch(IllegalArgumentException expected) {} in testConstructor() 94 } catch(IllegalArgumentException expected) {} in testConstructor() [all …]
|
D | SSLTest.java | 53 byte[] expected = { in testStringsToLengthPrefixedBytes() 57 assertTrue(Arrays.equals(expected, SSLCertificateSocketFactory.toLengthPrefixedList( in testStringsToLengthPrefixedBytes() 66 } catch (IllegalArgumentException expected) { in testStringsToLengthPrefixedBytesEmptyArray() 74 } catch (IllegalArgumentException expected) { in testStringsToLengthPrefixedBytesEmptyByteArray() 82 } catch (IllegalArgumentException expected) { in testStringsToLengthPrefixedBytesOversizedInput()
|
/frameworks/base/core/java/android/test/ |
D | AndroidTestCase.java | 100 } catch (SecurityException expected) { in assertActivityRequiresPermission() 101 assertNotNull("security exception's error message.", expected.getMessage()); in assertActivityRequiresPermission() 103 expected.getMessage().contains(permission)); in assertActivityRequiresPermission() 119 } catch (SecurityException expected) { in assertReadingContentUriRequiresPermission() 120 assertNotNull("security exception's error message.", expected.getMessage()); in assertReadingContentUriRequiresPermission() 122 expected.getMessage().contains(permission)); in assertReadingContentUriRequiresPermission() 138 } catch (SecurityException expected) { in assertWritingContentUriRequiresPermission() 139 assertNotNull("security exception's error message.", expected.getMessage()); in assertWritingContentUriRequiresPermission() 141 + expected.getMessage() + "\".", in assertWritingContentUriRequiresPermission() 142 expected.getMessage().contains(permission)); in assertWritingContentUriRequiresPermission()
|
/frameworks/base/core/tests/coretests/src/com/android/internal/os/ |
D | LoggingPrintStreamTest.java | 134 String expected = builder.toString(); in testMultiByteCharactersSpanningBuffers() local 136 out.write(expected.getBytes("UTF-8")); in testMultiByteCharactersSpanningBuffers() 138 assertEquals(Arrays.asList(expected), out.lines); in testMultiByteCharactersSpanningBuffers() 142 String expected = " \u20AC \u20AC \u20AC \u20AC "; in testWriteOneByteAtATimeMultibyteCharacters() local 143 for (byte b : expected.getBytes()) { in testWriteOneByteAtATimeMultibyteCharacters() 147 assertEquals(Arrays.asList(expected), out.lines); in testWriteOneByteAtATimeMultibyteCharacters() 151 String expected = " \u20AC \u20AC \u20AC \u20AC "; in testWriteByteArrayAtATimeMultibyteCharacters() local 152 out.write(expected.getBytes()); in testWriteByteArrayAtATimeMultibyteCharacters() 154 assertEquals(Arrays.asList(expected), out.lines); in testWriteByteArrayAtATimeMultibyteCharacters() 158 String expected = " \u20AC \u20AC \u20AC \u20AC "; in testWriteWithOffsetsMultibyteCharacters() local [all …]
|
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/ |
D | PhoneNumberWatcherTest.java | 219 String expected = "+1-650-123-4567"; // Different formatting than ours in testAutoCompleteWithFormattedNumber() local 220 testReplacement(init, expected, expected); in testAutoCompleteWithFormattedNumber() 228 String expected = "Test User <650-123-4567>"; in testAutoCompleteWithFormattedNameAndNumber() local 229 testReplacement(init, expected, expected); in testAutoCompleteWithFormattedNameAndNumber() 237 String expected = "2nd Test User <650-123-4567>"; in testAutoCompleteWithNumericNameAndNumber() local 238 testReplacement(init, expected, expected); in testAutoCompleteWithNumericNameAndNumber() 246 String expected = "6501234567"; in testAutoCompleteWithUnformattedNumber() local 247 testReplacement(init, expected, expected); in testAutoCompleteWithUnformattedNumber() 258 String expected = "(650) 123-4567"; in testAutoCompleteUnformattedWithUnformattedNumber() local 259 testReplacement(init, replacement, expected); in testAutoCompleteUnformattedWithUnformattedNumber() [all …]
|
/frameworks/base/tools/aidl/ |
D | search_path.cpp | 21 string expected = given; local 23 int N = expected.length(); 25 char c = expected[i]; 27 expected[i] = OS_PATH_SEPARATOR; 30 expected += ".aidl"; 42 f.append(expected);
|
/frameworks/base/core/tests/overlaytests/OverlayTest/src/com/android/overlaytest/ |
D | OverlayBaseTest.java | 103 boolean expected = getExpected(no, so, mo); in assertResource() 105 assertEquals(expected, actual); in assertResource() 109 int expected = getExpected(no, so, mo); in assertResource() local 111 assertEquals(expected, actual); in assertResource() 115 String expected = getExpected(no, so, mo); in assertResource() local 117 assertEquals(expected, actual); in assertResource() 121 int[] expected = getExpected(no, so, mo); in assertResource() local 123 assertEquals("length:", expected.length, actual.length); in assertResource() 125 assertEquals("index " + i + ":", actual[i], expected[i]); in assertResource() 168 final int[] expected = {2, 3, 5, 7, 11, 13, 17, 19}; in testIntegerArray() local [all …]
|
/frameworks/rs/java/tests/RSTest_CompatLib/src/com/android/rs/test/ |
D | struct.rs | 9 static bool test_Point_2(int expected) { 13 _RS_ASSERT(point2[0].x == expected); 14 _RS_ASSERT(point2[0].y == expected); 26 void struct_test(int expected) { 28 failed |= test_Point_2(expected);
|
D | math_agree.rs | 58 static void fail_f1(float v1, float v2, float actual, float expected, char *op_name) { 59 int dist = float_dist(actual, expected); 63 rsDebug("Dalvik result", expected); 68 static void fail_f2(float2 v1, float2 v2, float2 actual, float2 expected, char *op_name) { 70 dist.x = float_dist(actual.x, expected.x); 71 dist.y = float_dist(actual.y, expected.y); 77 rsDebug("Dalvik result .x", expected.x); 78 rsDebug("Dalvik result .y", expected.y); 85 static void fail_f3(float3 v1, float3 v2, float3 actual, float3 expected, char *op_name) { 87 dist.x = float_dist(actual.x, expected.x); [all …]
|
/frameworks/rs/java/tests/RsTest/src/com/android/rs/test/ |
D | struct.rs | 9 static bool test_Point_2(int expected) { 13 _RS_ASSERT(point2[0].x == expected); 14 _RS_ASSERT(point2[0].y == expected); 26 void struct_test(int expected) { 28 failed |= test_Point_2(expected);
|
D | math_agree.rs | 58 static void fail_f1(float v1, float v2, float actual, float expected, char *op_name) { 59 int dist = float_dist(actual, expected); 63 rsDebug("Dalvik result", expected); 68 static void fail_f2(float2 v1, float2 v2, float2 actual, float2 expected, char *op_name) { 70 dist.x = float_dist(actual.x, expected.x); 71 dist.y = float_dist(actual.y, expected.y); 77 rsDebug("Dalvik result .x", expected.x); 78 rsDebug("Dalvik result .y", expected.y); 85 static void fail_f3(float3 v1, float3 v2, float3 actual, float3 expected, char *op_name) { 87 dist.x = float_dist(actual.x, expected.x); [all …]
|
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/ |
D | RationalTest.java | 391 private static void assertValueEquals(Rational object, float expected) { in assertValueEquals() argument 393 expected, object.floatValue()); in assertValueEquals() 396 private static void assertValueEquals(Rational object, double expected) { in assertValueEquals() argument 398 expected, object.doubleValue()); in assertValueEquals() 401 private static void assertValueEquals(Rational object, long expected) { in assertValueEquals() argument 403 expected, object.longValue()); in assertValueEquals() 406 private static void assertValueEquals(Rational object, int expected) { in assertValueEquals() argument 408 expected, object.intValue()); in assertValueEquals() 411 private static void assertValueEquals(Rational object, short expected) { in assertValueEquals() argument 413 expected, object.shortValue()); in assertValueEquals() [all …]
|
D | RangeTest.java | 148 private static <T extends Comparable<? super T>> void assertUpper(Range<T> object, T expected) { in assertUpper() argument 149 assertAction("upper", object, expected, object.getUpper()); in assertUpper() 152 private static <T extends Comparable<? super T>> void assertLower(Range<T> object, T expected) { in assertLower() argument 153 assertAction("lower", object, expected, object.getLower()); in assertLower() 156 private static <T, T2> void assertAction(String action, T object, T2 expected, in assertAction() argument 159 expected, actual); in assertAction() 162 private static <T, T2> void assertAction(String action, T object, T2 needle, boolean expected, in assertAction() argument 164 String expectedMessage = expected ? action : ("not " + action); in assertAction() 166 expected, actual); in assertAction()
|
D | CameraMetadataTest.java | 287 private static <T> void assertArrayEquals(T expected, T actual) { in assertArrayEquals() argument 288 if (!expected.getClass().isArray() || !actual.getClass().isArray()) { in assertArrayEquals() 293 Array.getLength(expected), Array.getLength(actual)); in assertArrayEquals() 295 int len = Array.getLength(expected); in assertArrayEquals() 298 Object expectedElement = Array.get(expected, i); in assertArrayEquals() 306 formatArray(expected, i), in assertArrayEquals() 334 private <T> void checkKeyGetAndSet(String keyStr, TypeReference<T> typeToken, T expected, in checkKeyGetAndSet() argument 340 mMetadata.set(key, expected); in checkKeyGetAndSet() 345 assertArrayEquals(expected, actual); in checkKeyGetAndSet() 347 assertEquals(expected, actual); in checkKeyGetAndSet() [all …]
|
/frameworks/base/core/tests/coretests/src/android/widget/ |
D | AutoCompleteTextViewPopup.java | 225 boolean expected) throws InterruptedException { in waitAssertPopupShowState() argument 227 if (textView.isPopupShowing() == expected) { in waitAssertPopupShowState() 232 assertEquals(message, expected, textView.isPopupShowing()); in waitAssertPopupShowState() 235 private void waitAssertListSelection(AutoCompleteTextView textView, int expected) in waitAssertListSelection() argument 237 waitAssertListSelection("getListSelection()", textView, expected); in waitAssertListSelection() 241 int expected) throws Exception { in waitAssertListSelection() argument 245 if (expected == currentSelection) { in waitAssertListSelection() 250 assertEquals(message, expected, textView.getListSelection()); in waitAssertListSelection()
|
/frameworks/opt/calendar/tests/src/com/android/calendarcommon2/ |
D | RecurrenceProcessorTest.java | 48 private static void printLists(String[] expected, String[] out) { in printLists() argument 51 for (i = 0; i < expected.length && i < out.length; i++) { in printLists() 52 Log.i(TAG, " [" + i + "] " + expected[i] in printLists() 55 for (; i < expected.length; i++) { in printLists() 56 Log.i(TAG, " [" + i + "] " + expected[i]); in printLists() 64 String exdate, String rangeStartStr, String rangeEndStr, String[] expected) in verifyRecurrence() argument 67 rangeEndStr, expected, expected[expected.length - 1]); in verifyRecurrence() 71 String exdate, String rangeStartStr, String rangeEndStr, String[] expected, in verifyRecurrence() argument 119 if (count != expected.length) { in verifyRecurrence() 122 printLists(expected, actual); in verifyRecurrence() [all …]
|
/frameworks/base/core/tests/coretests/src/android/content/pm/ |
D | LimitedLengthInputStreamTest.java | 83 byte[] expected = new byte[length]; in checkReadBytesWithOffsetAndLength_WithString1() 86 System.arraycopy(TEST_STRING1, offset, expected, 0, length); in checkReadBytesWithOffsetAndLength_WithString1() 92 assertTrue(Arrays.equals(expected, actual)); in checkReadBytesWithOffsetAndLength_WithString1() 133 byte[] expected = new byte[length]; in checkReadBytes_WithString1() 136 System.arraycopy(TEST_STRING1, offset, expected, 0, length); in checkReadBytes_WithString1() 142 assertTrue(Arrays.equals(expected, actual)); in checkReadBytes_WithString1()
|
/frameworks/base/core/tests/coretests/src/android/app/backup/ |
D | BackupDataTest.java | 178 String[] expected = truth.readLine().split(":"); in testReadMockData() local 180 if (expected.length > 1) { in testReadMockData() 181 expectedBytes = Base64.decode(expected[1], Base64.DEFAULT); in testReadMockData() 186 assertEquals("wrong key", expected[0], key); in testReadMockData() 192 assertEquals("wrong data for key " + key, expected[1], in testReadMockData() 208 String[] expected = truth.readLine().split(":"); in testReadRealData() local 210 if (expected.length > 1) { in testReadRealData() 211 expectedBytes = Base64.decode(expected[1], Base64.DEFAULT); in testReadRealData() 216 assertEquals("wrong key", expected[0], key); in testReadRealData() 222 assertEquals("wrong data for key " + key, expected[1], in testReadRealData()
|
/frameworks/base/tools/aapt/tests/ |
D | CrunchCache_test.cpp | 18 void expectEqual(int got, int expected, const char* desc) { in expectEqual() argument 20 cout << "Got " << got << ", expected " << expected << "..."; in expectEqual() 21 cout << ( (got == expected) ? "PASSED" : "FAILED") << endl; in expectEqual() 22 errno += ((got == expected) ? 0 : 1); in expectEqual()
|