/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/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/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/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/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/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/Camera/tests/src/com/android/camera/unittest/ |
D | CameraUnitTest.java | 75 int[] expected; in testPrepareMatrix() local 79 expected = new int[] {0, 0, 400, 240, 800, 480, 400, 480, 100, 300}; in testPrepareMatrix() 81 assertEquals(expected, points); in testPrepareMatrix() 85 expected = new int[] {800, 0, 400, 240, 0, 480, 0, 240, 300, 60}; in testPrepareMatrix() 87 assertEquals(expected, points); in testPrepareMatrix() 91 expected = new int[] {800, 480, 400, 240, 0, 0, 400, 0, 700, 180}; in testPrepareMatrix() 93 assertEquals(expected, points); in testPrepareMatrix() 97 expected = new int[] {0, 480, 400, 240, 800, 0, 400, 0, 100, 180}; in testPrepareMatrix() 99 assertEquals(expected, points); in testPrepareMatrix() 102 private void assertEquals(int expected[], float[] actual) { in assertEquals() argument [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/inputmethods/LatinIME/tests/src/com/android/inputmethod/keyboard/internal/ |
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 …]
|
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 …]
|
/packages/providers/CalendarProvider/tests/src/com/android/providers/calendar/ |
D | CalendarProvider2Test.java | 208 int expected; field in CalendarProvider2Test.Delete 210 public Delete(String eventName, int expected, String account, String accountType) { in Delete() argument 212 this.expected = expected; in Delete() 220 assertEquals(expected, rows); in execute() 270 int expected; field in CalendarProvider2Test.QueryNumEvents 272 public QueryNumEvents(int expected) { in QueryNumEvents() argument 273 this.expected = expected; in QueryNumEvents() 278 assertEquals(expected, cursor.getCount()); in execute() 326 int expected; field in CalendarProvider2Test.QueryNumInstances 330 public QueryNumInstances(String startDate, String endDate, int expected) { in QueryNumInstances() argument [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()
|
D | AbstractPublicApiTest.java | 126 void waitForStatus(int expected, long afterMillis) throws TimeoutException { in waitForStatus() argument 127 waitForStatus(expected, afterMillis, 15 * SECOND_IN_MILLIS); in waitForStatus() 130 void waitForStatus(int expected, long afterMillis, long timeout) throws TimeoutException { in waitForStatus() argument 138 assertEquals(expected, actual); in waitForStatus() 140 } else if (actual == expected) { in waitForStatus() 159 throw new TimeoutException("Expected status " + expected + "; only reached " + actual); in waitForStatus()
|
/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/ContactsCommon/tests/src/com/android/contacts/common/util/ |
D | ContactDisplayUtilTests.java | 57 CharSequence expected = getContext().getResources().getText(R.string.call_home); in testGetLabelForCallOrSmsReturnsCallLabels() local 58 assertEquals(expected, result); in testGetLabelForCallOrSmsReturnsCallLabels() 62 expected = getContext().getResources().getText(R.string.call_mobile); in testGetLabelForCallOrSmsReturnsCallLabels() 63 assertEquals(expected, result); in testGetLabelForCallOrSmsReturnsCallLabels() 69 CharSequence expected = getContext().getResources().getText(R.string.sms_home); in testGetLabelForCallOrSmsReturnsSmsLabels() local 70 assertEquals(expected, result); in testGetLabelForCallOrSmsReturnsSmsLabels() 74 expected = getContext().getResources().getText(R.string.sms_mobile); in testGetLabelForCallOrSmsReturnsSmsLabels() 75 assertEquals(expected, result); in testGetLabelForCallOrSmsReturnsSmsLabels()
|
/packages/apps/Calendar/tests/src/com/android/calendar/event/ |
D | EditEventHelperTest.java | 899 LinkedHashSet<Rfc822Token> expected = new LinkedHashSet<Rfc822Token>(); in testGetAddressesFromList() local 900 expected.add(new Rfc822Token(null, "ad1@email.com", "")); in testGetAddressesFromList() 901 expected.add(new Rfc822Token("First Last", "first@email.com", "comment")); in testGetAddressesFromList() 902 expected.add(new Rfc822Token(null, "one.two.three@email.grue", "")); in testGetAddressesFromList() 906 assertEquals(expected, actual); in testGetAddressesFromList() 916 long expected = now + 30 * DateUtils.MINUTE_IN_MILLIS; in testConstructDefaultStartTime() local 917 assertEquals(expected, mHelper.constructDefaultStartTime(now)); in testConstructDefaultStartTime() 921 expected = now + 30 * DateUtils.MINUTE_IN_MILLIS; in testConstructDefaultStartTime() 922 assertEquals(expected, mHelper.constructDefaultStartTime(now)); in testConstructDefaultStartTime() 926 assertEquals(expected, mHelper.constructDefaultStartTime(now)); in testConstructDefaultStartTime() [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/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/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/common/ |
D | StringUtilsTests.java | 32 final String lowerCase, final String expected) { in assert_toTitleCaseOfKeyLabel() argument 33 assertEquals(lowerCase + " in " + locale, expected, in assert_toTitleCaseOfKeyLabel() 114 final int expected) { in assert_toTitleCaseOfKeyCode() argument 115 assertEquals(lowerCase + " in " + locale, expected, in assert_toTitleCaseOfKeyCode() 146 final String expected) { in assert_capitalizeFirstCodePoint() argument 147 assertEquals(text + " in " + locale, expected, in assert_capitalizeFirstCodePoint() 165 final String text, final String expected) { in assert_capitalizeFirstAndDowncaseRest() argument 166 assertEquals(text + " in " + locale, expected, in assert_capitalizeFirstAndDowncaseRest()
|