/packages/apps/Email/tests/src/com/android/email/mail/store/imap/ |
D | ImapUtilityTests.java | 43 String[] expected; in testGetImapSequenceValues() local 47 expected = new String[] {"1"}; in testGetImapSequenceValues() 49 MoreAsserts.assertEquals(expected, actual); in testGetImapSequenceValues() 51 expected = new String[] {"1", "3", "2"}; in testGetImapSequenceValues() 53 MoreAsserts.assertEquals(expected, actual); in testGetImapSequenceValues() 55 expected = new String[] {"4", "5", "6"}; in testGetImapSequenceValues() 57 MoreAsserts.assertEquals(expected, actual); in testGetImapSequenceValues() 59 expected = new String[] {"9", "8", "7"}; in testGetImapSequenceValues() 61 MoreAsserts.assertEquals(expected, actual); in testGetImapSequenceValues() 63 expected = new String[] {"1", "2", "3", "4", "9", "8", "7"}; in testGetImapSequenceValues() [all …]
|
D | ImapTestUtils.java | 45 public static final void assertElement(ImapElement expected, ImapElement actual) { in assertElement() argument 46 assertElement("(no message)", expected, actual); in assertElement() 54 public static final void assertElement(String message, ImapElement expected, in assertElement() argument 56 if (expected == null && actual == null) { in assertElement() 59 if (expected != null && expected.equalsForTest(actual)) { in assertElement() 62 Assert.fail(String.format("%s expected=%s\nactual=%s", message, expected, actual)); in assertElement()
|
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/ |
D | SuggestionCursorUtil.java | 44 SuggestionCursor expected, SuggestionCursor observed) { in assertSameSuggestion() argument 45 assertSameSuggestion(message, expected, position, observed, position); in assertSameSuggestion() 49 SuggestionCursor expected, int positionExpected, in assertSameSuggestion() argument 53 expected.moveTo(positionExpected); in assertSameSuggestion() 55 assertSuggestionEquals(message, expected, observed); in assertSameSuggestion() 58 public static void assertSameSuggestions(SuggestionCursor expected, SuggestionCursor observed) { in assertSameSuggestions() argument 59 assertSameSuggestions("", expected, observed); in assertSameSuggestions() 63 String message, SuggestionCursor expected, SuggestionCursor observed) { in assertSameSuggestions() argument 64 assertNotNull(message + ", expected == null", expected); in assertSameSuggestions() 66 assertEquals(message + ", count", expected.getCount(), observed.getCount()); in assertSameSuggestions() [all …]
|
/packages/apps/Bluetooth/tests/src/com/android/bluetooth/tests/ |
D | BluetoothMapUtilsTest.java | 62 SignedLongLong expected = new SignedLongLong(0x12345678L, 0x90abcdefL); in testXBtUid() local 66 assertTrue("expected: " + expected + " value = " + value, in testXBtUid() 67 0 == value.compareTo(expected)); in testXBtUid() 68 assertEquals("expected: " + expected + " value = " + value, in testXBtUid() 69 expected.toHexString(), value.toHexString()); in testXBtUid() 73 SignedLongLong expected = new SignedLongLong(0x12345678L, 0xfedcba9890abcdefL); in testXBtUid() local 77 assertTrue("expected: " + expected + " value = " + value, in testXBtUid() 78 0 == value.compareTo(expected)); in testXBtUid() 79 assertEquals("expected: " + expected + " value = " + value, in testXBtUid() 80 expected.toHexString(), value.toHexString()); in testXBtUid() [all …]
|
D | SapServerTest.java | 483 private boolean compareSapMessages(SapMessage received, SapMessage expected) { in compareSapMessages() argument 485 if(expected.getCardReaderStatus() != -1 && in compareSapMessages() 486 received.getCardReaderStatus() != expected.getCardReaderStatus()) { in compareSapMessages() 488 + received.getCardReaderStatus() + " != " + expected.getCardReaderStatus()); in compareSapMessages() 491 if(received.getConnectionStatus() != expected.getConnectionStatus()) { in compareSapMessages() 493 + received.getConnectionStatus() + " != " + expected.getConnectionStatus()); in compareSapMessages() 496 if(received.getDisconnectionType() != expected.getDisconnectionType()) { in compareSapMessages() 499 + expected.getDisconnectionType()); in compareSapMessages() 502 if(received.getMaxMsgSize() != expected.getMaxMsgSize()) { in compareSapMessages() 504 + received.getMaxMsgSize() +" != " + expected.getMaxMsgSize()); in compareSapMessages() [all …]
|
D | BluetoothMapbMessageTest.java | 160 String expected = in testSmsEncodeNativeDeliverPdu() local 212 if(D) Log.d(TAG, "\nExpected: \n" + expected); in testSmsEncodeNativeDeliverPdu() 215 assertTrue(expected.equalsIgnoreCase(encoded)); in testSmsEncodeNativeDeliverPdu() 231 String expected = in testSmsEncodeDecodeNativeSubmitPdu() local 284 if(D) Log.d(TAG, "\nExpected: \n" + expected); in testSmsEncodeDecodeNativeSubmitPdu() 287 … assertTrue("The encoded bMessage do not match the expected.", expected.equalsIgnoreCase(encoded)); in testSmsEncodeDecodeNativeSubmitPdu() 339 String expected = "Flo"; in testSmsEncodeDecodeNativeSubmitPduWithSc() local 345 …e("Decoded string (" + decoded + ") did not match expected (" + expected + ")", expected.equals(de… in testSmsEncodeDecodeNativeSubmitPduWithSc() 362 String expected = folder.substring(folder.length()-512, folder.length()); in testFolderLengthTruncation() local 374 … assertTrue("Wrong length expected 512, got " + expected.length(), expected.length() == 512); in testFolderLengthTruncation() [all …]
|
/packages/apps/UnifiedEmail/tests/src/com/android/mail/utils/ |
D | UtilsTest.java | 36 final SpannableString expected = new SpannableString(entire); in testInsertStringWithStyle() local 37 expected.setSpan(new TextAppearanceSpan(getContext(), appearance), 6, 11, 0); in testInsertStringWithStyle() 39 assertSpannedEquals(expected, actual); in testInsertStringWithStyle() 48 final SpannableString expected = new SpannableString(entire); in testInsertStringWithStyle_substringNotInEntire() local 50 assertSpannedEquals(expected, actual); in testInsertStringWithStyle_substringNotInEntire() 53 public static void assertSpannedEquals(Spanned expected, Spanned actual) { in assertSpannedEquals() argument 54 assertEquals(expected.length(), actual.length()); in assertSpannedEquals() 55 assertEquals(expected.toString(), actual.toString()); in assertSpannedEquals() 56 if (expected.length() > 0) { in assertSpannedEquals() 58 expected.getSpans(0, expected.length(), TextAppearanceSpan.class); in assertSpannedEquals() [all …]
|
/packages/apps/Camera2/tests/src/com/android/camera/unittest/ |
D | CameraUnitTest.java | 31 int[] expected; in testPrepareMatrix() local 35 expected = new int[] {0, 0, 400, 240, 800, 480, 400, 480, 100, 300}; in testPrepareMatrix() 37 assertEquals(expected, points); in testPrepareMatrix() 41 expected = new int[] {800, 0, 400, 240, 0, 480, 0, 240, 300, 60}; in testPrepareMatrix() 43 assertEquals(expected, points); in testPrepareMatrix() 47 expected = new int[] {800, 480, 400, 240, 0, 0, 400, 0, 700, 180}; in testPrepareMatrix() 49 assertEquals(expected, points); in testPrepareMatrix() 53 expected = new int[] {0, 480, 400, 240, 800, 0, 400, 0, 100, 180}; in testPrepareMatrix() 55 assertEquals(expected, points); in testPrepareMatrix() 58 private void assertEquals(int expected[], float[] actual) { in assertEquals() argument [all …]
|
/packages/apps/Camera2/tests_camera/src/com/android/camera/unittest/ |
D | CameraUnitTest.java | 31 int[] expected; in testPrepareMatrix() local 35 expected = new int[] {0, 0, 400, 240, 800, 480, 400, 480, 100, 300}; in testPrepareMatrix() 37 assertEquals(expected, points); in testPrepareMatrix() 41 expected = new int[] {800, 0, 400, 240, 0, 480, 0, 240, 300, 60}; in testPrepareMatrix() 43 assertEquals(expected, points); in testPrepareMatrix() 47 expected = new int[] {800, 480, 400, 240, 0, 0, 400, 0, 700, 180}; in testPrepareMatrix() 49 assertEquals(expected, points); in testPrepareMatrix() 53 expected = new int[] {0, 480, 400, 240, 800, 0, 400, 0, 100, 180}; in testPrepareMatrix() 55 assertEquals(expected, points); in testPrepareMatrix() 58 private void assertEquals(int expected[], float[] actual) { in assertEquals() argument [all …]
|
/packages/apps/Messaging/src/com/android/messaging/util/ |
D | Assert.java | 106 public static void equals(final int expected, final int actual) { in equals() argument 107 if (expected != actual) { in equals() 108 fail("Expected " + expected + " but got " + actual, false); in equals() 112 public static void equals(final long expected, final long actual) { in equals() argument 113 if (expected != actual) { in equals() 114 fail("Expected " + expected + " but got " + actual, false); in equals() 118 public static void equals(final Object expected, final Object actual) { in equals() argument 119 if (expected != actual in equals() 120 && (expected == null || actual == null || !expected.equals(actual))) { in equals() 121 fail("Expected " + expected + " but got " + actual, false); in equals() [all …]
|
/packages/providers/BlockedNumberProvider/tests/src/com/android/providers/blockednumber/ |
D | BlockedNumberProviderTest.java | 202 } catch (IllegalArgumentException expected) { in insertExpectingFailure() 226 } catch (IllegalArgumentException expected) { in testDelete() 227 MoreAsserts.assertContainsRegex("selection must be null", expected.getMessage()); in testDelete() 242 } catch (SQLiteException expected) { in testDelete() 255 } catch (UnsupportedOperationException expected) { in testUpdate() 256 MoreAsserts.assertContainsRegex("Update is not supported", expected.getMessage()); in testUpdate() 335 } catch (SecurityException expected) { in testRegularAppCannotAccessApis() 341 } catch (SecurityException expected) { in testRegularAppCannotAccessApis() 347 } catch (SecurityException expected) { in testRegularAppCannotAccessApis() 353 } catch (SecurityException expected) { in testRegularAppCannotAccessApis() [all …]
|
/packages/apps/Messaging/tests/src/com/android/messaging/datamodel/ |
D | FrequentContactsCursorBuilderTest.java | 28 private void verifyBuiltCursor(final Cursor expected, final Cursor actual) { in verifyBuiltCursor() argument 29 final int rowCount = expected.getCount(); in verifyBuiltCursor() 30 final int columnCount = expected.getColumnCount(); in verifyBuiltCursor() 34 expected.moveToPosition(i); in verifyBuiltCursor() 36 assertEquals(expected.getLong(ContactUtil.INDEX_DATA_ID), in verifyBuiltCursor() 38 assertEquals(expected.getLong(ContactUtil.INDEX_CONTACT_ID), in verifyBuiltCursor() 40 assertEquals(expected.getString(ContactUtil.INDEX_LOOKUP_KEY), in verifyBuiltCursor() 42 assertEquals(expected.getString(ContactUtil.INDEX_DISPLAY_NAME), in verifyBuiltCursor() 44 assertEquals(expected.getString(ContactUtil.INDEX_PHOTO_URI), in verifyBuiltCursor() 46 assertEquals(expected.getString(ContactUtil.INDEX_PHONE_EMAIL), in verifyBuiltCursor() [all …]
|
/packages/apps/LegacyCamera/tests/src/com/android/camera/unittest/ |
D | CameraTest.java | 79 int[] expected; in testPrepareMatrix() local 83 expected = new int[] {0, 0, 400, 240, 800, 480, 400, 480, 100, 300}; in testPrepareMatrix() 85 assertEquals(expected, points); in testPrepareMatrix() 89 expected = new int[] {800, 0, 400, 240, 0, 480, 0, 240, 300, 60}; in testPrepareMatrix() 91 assertEquals(expected, points); in testPrepareMatrix() 95 expected = new int[] {800, 480, 400, 240, 0, 0, 400, 0, 700, 180}; in testPrepareMatrix() 97 assertEquals(expected, points); in testPrepareMatrix() 101 expected = new int[] {0, 480, 400, 240, 800, 0, 400, 0, 100, 180}; in testPrepareMatrix() 103 assertEquals(expected, points); in testPrepareMatrix() 106 private void assertEquals(int expected[], float[] actual) { in assertEquals() argument [all …]
|
/packages/apps/TV/tests/common/src/com/android/tv/testing/dvr/ |
D | RecordingTestUtils.java | 54 … public static void assertRecordingEquals(ScheduledRecording expected, ScheduledRecording actual) { in assertRecordingEquals() argument 55 Assert.assertEquals("id", expected.getId(), actual.getId()); in assertRecordingEquals() 56 Assert.assertEquals("channel", expected.getChannelId(), actual.getChannelId()); in assertRecordingEquals() 57 Assert.assertEquals("programId", expected.getProgramId(), actual.getProgramId()); in assertRecordingEquals() 58 Assert.assertEquals("priority", expected.getPriority(), actual.getPriority()); in assertRecordingEquals() 59 Assert.assertEquals("start time", expected.getStartTimeMs(), actual.getStartTimeMs()); in assertRecordingEquals() 60 Assert.assertEquals("end time", expected.getEndTimeMs(), actual.getEndTimeMs()); in assertRecordingEquals() 61 Assert.assertEquals("state", expected.getState(), actual.getState()); in assertRecordingEquals() 62 Assert.assertEquals("parent season recording", expected.getParentSeasonRecording(), in assertRecordingEquals()
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/keyboard/internal/ |
D | MoreKeySpecSplitTests.java | 45 static <T> void assertArrayEquals(final String message, final T[] expected, final T[] actual) { in assertArrayEquals() argument 46 if (expected == actual) { in assertArrayEquals() 49 if (expected == null || actual == null) { in assertArrayEquals() 50 assertEquals(message, Arrays.toString(expected), Arrays.toString(actual)); in assertArrayEquals() 53 if (expected.length != actual.length) { in assertArrayEquals() 54 assertEquals(message + " [length]", Arrays.toString(expected), Arrays.toString(actual)); in assertArrayEquals() 57 for (int i = 0; i < expected.length; i++) { in assertArrayEquals() 58 final T e = expected[i]; in assertArrayEquals() 71 final String[] expected = (expectedArray.length == 0) ? null : expectedArray; in assertTextArray() local 72 assertArrayEquals(message, expected, actual); in assertTextArray() [all …]
|
D | MoreKeySpecTests.java | 56 private static void assertArrayEquals(final String message, final Object[] expected, in assertArrayEquals() argument 58 if (expected == actual) { in assertArrayEquals() 61 if (expected == null || actual == null) { in assertArrayEquals() 62 assertEquals(message, Arrays.toString(expected), Arrays.toString(actual)); in assertArrayEquals() 65 if (expected.length != actual.length) { in assertArrayEquals() 66 assertEquals(message + " [length]", Arrays.toString(expected), Arrays.toString(actual)); in assertArrayEquals() 69 for (int i = 0; i < expected.length; i++) { in assertArrayEquals() 71 Arrays.toString(expected), Arrays.toString(actual)); in assertArrayEquals() 76 final String[] moreKeys, final String[] additionalMoreKeys, final String[] expected) { in assertInsertAdditionalMoreKeys() argument 78 assertArrayEquals(message, expected, actual); in assertInsertAdditionalMoreKeys() [all …]
|
/packages/providers/DownloadProvider/tests/src/com/android/providers/downloads/ |
D | HelpersTest.java | 43 final File expected = new File(getContext().getFilesDir(), "file.mp4"); in testGenerateSaveFile() local 47 assertEquals(expected.getAbsolutePath(), actual); in testGenerateSaveFile() 64 final File expected = new File(getContext().getFilesDir(), "file.mp4"); in testGenerateSaveFileNoExtension() local 68 assertEquals(expected.getAbsolutePath(), actual); in testGenerateSaveFileNoExtension() 72 final File expected = new File(getContext().getFilesDir(), "meow"); in testGenerateSaveFileHint() local 73 final String hint = Uri.fromFile(expected).toString(); in testGenerateSaveFileHint() 78 assertEquals(expected.getAbsolutePath(), actual); in testGenerateSaveFileHint() 82 final File expected = new File(getContext().getFilesDir(), "real.mp4"); in testGenerateSaveFileDisposition() local 86 assertEquals(expected.getAbsolutePath(), actual); in testGenerateSaveFileDisposition()
|
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/ |
D | EvenMoreAsserts.java | 66 public static void assertImageRawData(Context context, byte[] expected, in assertImageRawData() argument 78 assertImageRawData(context, expected, baos.toByteArray()); in assertImageRawData() 81 public static void assertImageRawData(Context context, byte[] expected, byte[] actual) { in assertImageRawData() argument 83 if (expected.length != actual.length) { in assertImageRawData() 85 " expected=" + expected.length + " actual=" + actual.length; in assertImageRawData() 86 } else if (!Arrays.equals(expected, actual)) { in assertImageRawData() 92 String expectedFile = TestUtils.dumpToCacheDir(context, "expected", ".jpg", expected); in assertImageRawData() 96 Assert.fail(failReason + ", expected dimentions=" + getImageDimensions(expected) + in assertImageRawData()
|
/packages/apps/Calendar/tests/src/com/android/calendar/ |
D | AsyncQueryServiceTest.java | 285 OperationInfo[] expected = generateSortedWork(work, work.length - 1); in testCancel_simpleCancelLastTest() local 287 TestAsyncQueryService aqs = new TestAsyncQueryService(buildTestContext(expected), expected); in testCancel_simpleCancelLastTest() 296 assertEquals("Not all operations were executed.", expected.length, aqs in testCancel_simpleCancelLastTest() 313 OperationInfo[] expected = new OperationInfo[4]; in testCancel_cancelSecondToLast() local 314 expected[0] = work[1]; // delay = 0 in testCancel_cancelSecondToLast() 315 expected[1] = work[3]; // delay = 0 in testCancel_cancelSecondToLast() 316 expected[2] = work[2]; // delay = MIN_DELAY in testCancel_cancelSecondToLast() 317 expected[3] = work[4]; // delay = MIN_DELAY * 3 in testCancel_cancelSecondToLast() 319 TestAsyncQueryService aqs = new TestAsyncQueryService(buildTestContext(expected), expected); in testCancel_cancelSecondToLast() 328 assertEquals("Not all operations were executed.", expected.length, aqs in testCancel_cancelSecondToLast() [all …]
|
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/database/ |
D | MoreDatabaseUtilTest.java | 37 String expected = "create index testtable_testfield_index on testtable(testfield)"; in testBuildIndex() local 40 assertEquals(expected, actual); in testBuildIndex() 42 expected = "create index test_table_test_field_index on test_table(test_field)"; in testBuildIndex() 44 assertEquals(expected, actual); in testBuildIndex() 48 String expected = "drop index if exists testtable_testfield_index"; in testDropIndex() local 50 assertEquals(expected, actual); in testDropIndex()
|
/packages/apps/Test/connectivity/sl4n/rapidjson/test/unittest/ |
D | encodedstreamtest.cpp | 91 unsigned expected, actual; in TestEncodedInputStream() local 92 EXPECT_TRUE(UTF8<>::Decode(s, &expected)); in TestEncodedInputStream() 94 EXPECT_EQ(expected, actual); in TestEncodedInputStream() 109 unsigned expected, actual; in TestEncodedInputStream() local 110 EXPECT_TRUE(UTF8<>::Decode(s, &expected)); in TestEncodedInputStream() 112 EXPECT_EQ(expected, actual); in TestEncodedInputStream() 131 unsigned expected, actual; in TestAutoUTFInputStream() local 132 EXPECT_TRUE(UTF8<>::Decode(s, &expected)); in TestAutoUTFInputStream() 134 EXPECT_EQ(expected, actual); in TestAutoUTFInputStream() 150 unsigned expected, actual; in TestAutoUTFInputStream() local [all …]
|
/packages/apps/ContactsCommon/tests/src/com/android/contacts/common/util/ |
D | ContactDisplayUtilTests.java | 73 CharSequence expected = getContext().getResources().getText(R.string.call_home); in testGetLabelForCallOrSmsReturnsCallLabels() local 74 assertEquals(expected, result); in testGetLabelForCallOrSmsReturnsCallLabels() 78 expected = getContext().getResources().getText(R.string.call_mobile); in testGetLabelForCallOrSmsReturnsCallLabels() 79 assertEquals(expected, result); in testGetLabelForCallOrSmsReturnsCallLabels() 85 CharSequence expected = getContext().getResources().getText(R.string.sms_home); in testGetLabelForCallOrSmsReturnsSmsLabels() local 86 assertEquals(expected, result); in testGetLabelForCallOrSmsReturnsSmsLabels() 90 expected = getContext().getResources().getText(R.string.sms_mobile); in testGetLabelForCallOrSmsReturnsSmsLabels() 91 assertEquals(expected, result); in testGetLabelForCallOrSmsReturnsSmsLabels()
|
/packages/inputmethods/LatinIME/native/jni/tests/suggest/core/layout/ |
D | geometry_utils_test.cpp | 25 const char* actualExpression, float expected, float actual) { in ExpectAngleDiffEq() argument 29 << " expected: " << expected in ExpectAngleDiffEq() 33 expectedExpression, actualExpression, expected, actual); in ExpectAngleDiffEq() 36 #define EXPECT_ANGLE_DIFF_EQ(expected, actual) \ argument 37 EXPECT_PRED_FORMAT2(ExpectAngleDiffEq, expected, actual);
|
/packages/apps/Calendar/tests/src/com/android/calendar/widget/ |
D | CalendarAppWidgetServiceTest.java | 99 CalendarAppWidgetModel expected = new CalendarAppWidgetModel(getContext(), Time in testGetAppWidgetModel_1Event() local 117 expected.mEventInfos.add(eventInfo); in testGetAppWidgetModel_1Event() 123 assertEquals(expected.toString(), actual.toString()); in testGetAppWidgetModel_1Event() 129 CalendarAppWidgetModel expected = new CalendarAppWidgetModel(getContext(), Time in testGetAppWidgetModel_AllDayEventLater() local 144 expected.mEventInfos.add(eventInfo); in testGetAppWidgetModel_AllDayEventLater() 166 expected.mEventInfos.add(eventInfo); in testGetAppWidgetModel_AllDayEventLater() 173 assertEquals(expected.toString(), actual.toString()); in testGetAppWidgetModel_AllDayEventLater()
|
/packages/apps/UnifiedEmail/src/org/apache/james/mime4j/field/address/parser/ |
D | ParseException.java | 116 StringBuffer expected = new StringBuffer(); in getMessage() local 123 expected.append(tokenImage[expectedTokenSequences[i][j]]).append(" "); in getMessage() 126 expected.append("..."); in getMessage() 128 expected.append(eol).append(" "); in getMessage() 148 retval += expected.toString(); in getMessage()
|