/packages/apps/Contacts/tests/src/com/android/contacts/util/ |
D | SearchUtilTest.java | 30 final String actual = "this is a long test string.\nWith potentially many lines.\n" + in testFindMatchingLine() local 33 SearchUtil.MatchedLine matched = SearchUtil.findMatchingLine(actual, "poten"); in testFindMatchingLine() 38 matched = SearchUtil.findMatchingLine(actual, "hello"); in testFindMatchingLine() 43 matched = SearchUtil.findMatchingLine(actual, "this"); in testFindMatchingLine() 48 matched = SearchUtil.findMatchingLine(actual, "punc"); in testFindMatchingLine() 54 final String actual = "this is a long test string.\nWith potentially many lines.\n" + in testContains() local 56 assertEquals(0, SearchUtil.contains(actual, "this")); in testContains() 57 assertEquals(10, SearchUtil.contains(actual, "lon")); in testContains() 65 final String actual = "this is a long test string.\nWith potentially many lines.\n" + in testContainsNotFound() local 69 assertEquals(-1, SearchUtil.contains(actual, "ith")); in testContainsNotFound() [all …]
|
/packages/apps/TV/tests/unit/src/com/android/tv/util/images/ |
D | ScaledBitmapInfoTest.java | 36 ScaledBitmapInfo actual = BitmapUtils.createScaledBitmapInfo("B80x100", B80x100, 50, 50); in testSize_B100x100to50x50() local 37 assertScaledBitmapSize(2, 40, 50, actual); in testSize_B100x100to50x50() 42 ScaledBitmapInfo actual = BitmapUtils.createScaledBitmapInfo("B80x100", B80x100, 50, 50); in testNeedsToReload_B100x100to50x50() local 43 assertNeedsToReload(false, actual, 25, 25); in testNeedsToReload_B100x100to50x50() 44 assertNeedsToReload(false, actual, 50, 50); in testNeedsToReload_B100x100to50x50() 45 assertNeedsToReload(false, actual, 99, 99); in testNeedsToReload_B100x100to50x50() 46 assertNeedsToReload(true, actual, 100, 100); in testNeedsToReload_B100x100to50x50() 47 assertNeedsToReload(true, actual, 101, 101); in testNeedsToReload_B100x100to50x50() 53 ScaledBitmapInfo actual = in testBug20488453() local 55 assertScaledBitmapSize(8, 107, 160, actual); in testBug20488453() [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/TV/tests/common/src/com/android/tv/testing/ |
D | ChannelNumberSubject.java | 37 public static ChannelNumberSubject assertThat(@Nullable ChannelNumber actual) { in assertThat() argument 38 return Truth.assertAbout(channelNumbers()).that(actual); in assertThat() 41 private final ChannelNumber actual; field in ChannelNumberSubject 45 this.actual = subject; in ChannelNumberSubject() 49 if (!actual.majorNumber.equals(Integer.toString(major)) || actual.hasDelimiter) { in displaysAs() 55 if (!actual.majorNumber.equals(Integer.toString(major)) in displaysAs() 56 || !actual.minorNumber.equals(Integer.toString(minor)) in displaysAs() 57 || !actual.hasDelimiter) { in displaysAs() 63 if (!actual.majorNumber.isEmpty() || !actual.minorNumber.isEmpty() || actual.hasDelimiter) { in isEmpty()
|
/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 31 assertEquals(rowCount, actual.getCount()); in verifyBuiltCursor() 32 assertEquals(columnCount, actual.getColumnCount()); in verifyBuiltCursor() 35 actual.moveToPosition(i); in verifyBuiltCursor() 37 actual.getLong(ContactUtil.INDEX_DATA_ID)); in verifyBuiltCursor() 39 actual.getLong(ContactUtil.INDEX_CONTACT_ID)); in verifyBuiltCursor() 41 actual.getString(ContactUtil.INDEX_LOOKUP_KEY)); in verifyBuiltCursor() 43 actual.getString(ContactUtil.INDEX_DISPLAY_NAME)); in verifyBuiltCursor() 45 actual.getString(ContactUtil.INDEX_PHOTO_URI)); in verifyBuiltCursor() 47 actual.getString(ContactUtil.INDEX_PHONE_EMAIL)); in verifyBuiltCursor() [all …]
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/keyboard/internal/ |
D | MoreKeySpecTests.java | 57 final Object[] actual) { 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() 71 Arrays.toString(expected), Arrays.toString(actual)); in assertArrayEquals() 77 final String[] actual = MoreKeySpec.insertAdditionalMoreKeys(moreKeys, additionalMoreKeys); in assertInsertAdditionalMoreKeys() local 78 assertArrayEquals(message, expected, actual); in assertInsertAdditionalMoreKeys() 305 final String[] actual = Arrays.copyOf(moreKeys, moreKeys.length); in assertGetBooleanValue() local [all …]
|
D | MoreKeySpecSplitTests.java | 53 static <T> void assertArrayEquals(final String message, final T[] expected, final T[] actual) { in assertArrayEquals() argument 54 if (expected == actual) { in assertArrayEquals() 57 if (expected == null || actual == null) { in assertArrayEquals() 58 assertEquals(message, Arrays.toString(expected), Arrays.toString(actual)); in assertArrayEquals() 61 if (expected.length != actual.length) { in assertArrayEquals() 62 assertEquals(message + " [length]", Arrays.toString(expected), Arrays.toString(actual)); in assertArrayEquals() 67 final T a = actual[i]; in assertArrayEquals() 78 final String[] actual = MoreKeySpec.splitKeySpecs(resolvedActual); in assertTextArray() local 80 assertArrayEquals(message, expected, actual); in assertTextArray()
|
/packages/apps/TV/tests/common/src/com/android/tv/testing/dvr/ |
D | RecordingTestUtils.java | 63 ScheduledRecording expected, ScheduledRecording actual) { in assertRecordingEquals() argument 64 Assert.assertEquals("id", expected.getId(), actual.getId()); in assertRecordingEquals() 65 Assert.assertEquals("channel", expected.getChannelId(), actual.getChannelId()); in assertRecordingEquals() 66 Assert.assertEquals("programId", expected.getProgramId(), actual.getProgramId()); in assertRecordingEquals() 67 Assert.assertEquals("priority", expected.getPriority(), actual.getPriority()); in assertRecordingEquals() 68 Assert.assertEquals("start time", expected.getStartTimeMs(), actual.getStartTimeMs()); in assertRecordingEquals() 69 Assert.assertEquals("end time", expected.getEndTimeMs(), actual.getEndTimeMs()); in assertRecordingEquals() 70 Assert.assertEquals("state", expected.getState(), actual.getState()); in assertRecordingEquals() 74 actual.getSeriesRecordingId()); in assertRecordingEquals()
|
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/ |
D | NameLookupBuilderTest.java | 228 String actual = mBuilder.inserted(); in testMultiwordName() local 231 assertTrue(actual.contains("(0:Jo.Jeffrey.John.Jessy.Longname)")); in testMultiwordName() 234 assertTrue(actual.contains("(2:JoJeffreyJohnJessyLongname)")); in testMultiwordName() 237 assertTrue(actual.contains("(1:Longname.Jeffrey.Jessy.John)")); in testMultiwordName() 240 assertTrue(actual.contains("(2:Jo")); in testMultiwordName() 241 assertTrue(actual.contains("(2:Jeffrey")); in testMultiwordName() 242 assertTrue(actual.contains("(2:John")); in testMultiwordName() 243 assertTrue(actual.contains("(2:Jessy")); in testMultiwordName() 244 assertTrue(actual.contains("(2:Longname")); in testMultiwordName()
|
D | EvenMoreAsserts.java | 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() 93 String actualFile = TestUtils.dumpToCacheDir(context, "actual", ".jpg", actual); in assertImageRawData() 97 " actual dimentions=" + getImageDimensions(actual) + in assertImageRawData()
|
/packages/apps/Test/connectivity/sl4n/rapidjson/test/unittest/ |
D | encodedstreamtest.cpp | 91 unsigned expected, actual; in TestEncodedInputStream() local 93 EXPECT_TRUE(MemoryEncoding::Decode(eis, &actual)); in TestEncodedInputStream() 94 EXPECT_EQ(expected, actual); in TestEncodedInputStream() 109 unsigned expected, actual; in TestEncodedInputStream() local 111 EXPECT_TRUE(MemoryEncoding::Decode(eis, &actual)); in TestEncodedInputStream() 112 EXPECT_EQ(expected, actual); in TestEncodedInputStream() 131 unsigned expected, actual; in TestAutoUTFInputStream() local 133 EXPECT_TRUE(AutoUTF<unsigned>::Decode(eis, &actual)); in TestAutoUTFInputStream() 134 EXPECT_EQ(expected, actual); in TestAutoUTFInputStream() 150 unsigned expected, actual; in TestAutoUTFInputStream() local [all …]
|
/packages/providers/DownloadProvider/tests/src/com/android/providers/downloads/ |
D | HelpersTest.java | 44 final String actual = Helpers.generateSaveFile(getContext(), in testGenerateSaveFile() local 47 assertEquals(expected.getAbsolutePath(), actual); in testGenerateSaveFile() local 65 final String actual = Helpers.generateSaveFile(getContext(), in testGenerateSaveFileNoExtension() local 68 assertEquals(expected.getAbsolutePath(), actual); in testGenerateSaveFileNoExtension() local 76 final String actual = Helpers.generateSaveFile(getContext(), "url", hint, in testGenerateSaveFileHint() local 78 assertEquals(expected.getAbsolutePath(), actual); in testGenerateSaveFileHint() local 83 final String actual = Helpers.generateSaveFile(getContext(), in testGenerateSaveFileDisposition() local 86 assertEquals(expected.getAbsolutePath(), actual); in testGenerateSaveFileDisposition() local
|
D | AbstractPublicApiTest.java | 134 int actual = -1; in waitForStatus() local 139 actual = getStatus(); in waitForStatus() 140 if (actual == STATUS_SUCCESSFUL || actual == STATUS_FAILED) { in waitForStatus() 141 assertEquals(expected, actual); in waitForStatus() 143 } else if (actual == expected) { in waitForStatus() 162 throw new TimeoutException("Expected status " + expected + "; only reached " + actual); in waitForStatus()
|
/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 26 if (actual < 0.0f || M_PI_F < actual) { in ExpectAngleDiffEq() 30 << " actual: " << actual; 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/providers/ContactsProvider/tests/src/com/android/providers/contacts/database/ |
D | MoreDatabaseUtilTest.java | 38 String actual = MoreDatabaseUtils.buildCreateIndexSql("testtable", "testfield") in testBuildIndex() local 40 assertEquals(expected, actual); in testBuildIndex() 43 actual = MoreDatabaseUtils.buildCreateIndexSql("test_table", "test_field").toLowerCase(); in testBuildIndex() 44 assertEquals(expected, actual); in testBuildIndex() 49 String actual = MoreDatabaseUtils.buildDropIndexSql("testtable", "testfield").toLowerCase(); in testDropIndex() local 50 assertEquals(expected, actual); in testDropIndex()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/ |
D | SettingsLicenseActivityTest.java | 57 private void assertEqualIntents(Intent actual, Intent expected) { in assertEqualIntents() argument 58 assertThat(actual.getAction()).isEqualTo(expected.getAction()); in assertEqualIntents() 59 assertThat(actual.getDataString()).isEqualTo(expected.getDataString()); in assertEqualIntents() 60 assertThat(actual.getType()).isEqualTo(expected.getType()); in assertEqualIntents() 61 assertThat(actual.getCategories()).isEqualTo(expected.getCategories()); in assertEqualIntents() 62 assertThat(actual.getPackage()).isEqualTo(expected.getPackage()); in assertEqualIntents() 63 assertThat(actual.getFlags()).isEqualTo(expected.getFlags()); in assertEqualIntents()
|
/packages/apps/TvSettings/Settings/tests/robotests/src/com/android/tv/settings/about/ |
D | LicenseActivityTest.java | 59 void assertEqualIntents(Intent actual, Intent expected) { in assertEqualIntents() argument 60 assertThat(actual.getAction()).isEqualTo(expected.getAction()); in assertEqualIntents() 61 assertThat(actual.getDataString()).isEqualTo(expected.getDataString()); in assertEqualIntents() 62 assertThat(actual.getType()).isEqualTo(expected.getType()); in assertEqualIntents() 63 assertThat(actual.getCategories()).isEqualTo(expected.getCategories()); in assertEqualIntents() 64 assertThat(actual.getPackage()).isEqualTo(expected.getPackage()); in assertEqualIntents() 65 assertThat(actual.getFlags()).isEqualTo(expected.getFlags()); in assertEqualIntents()
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/applications/defaultapps/ |
D | DefaultAssistantPickerEntryPreferenceControllerTest.java | 197 Intent actual = ShadowApplication.getInstance().getNextStartedActivity(); in performClick_permissionControllerExists_startsPermissionController() local 198 assertThat(actual.getAction()).isEqualTo(Intent.ACTION_MANAGE_DEFAULT_APP); in performClick_permissionControllerExists_startsPermissionController() 207 Intent actual = ShadowApplication.getInstance().getNextStartedActivity(); in performClick_permissionControllerExists_intentHasPackageName() local 208 assertThat(actual.getPackage()).isEqualTo(testPackage); in performClick_permissionControllerExists_intentHasPackageName() 217 Intent actual = ShadowApplication.getInstance().getNextStartedActivity(); in performClick_permissionControllerExists_intentHasRole() local 218 assertThat(actual.getStringExtra(Intent.EXTRA_ROLE_NAME)).isEqualTo( in performClick_permissionControllerExists_intentHasRole() 226 Intent actual = ShadowApplication.getInstance().getNextStartedActivity(); in performClick_permissionControllerDoesntExist_doesNotStartPermissionController() local 227 assertThat(actual).isNull(); in performClick_permissionControllerDoesntExist_doesNotStartPermissionController()
|
/packages/services/Car/tests/carservice_test/src/com/android/car/ |
D | CarUxRestrictionsManagerServiceTest.java | 167 List<CarUxRestrictionsConfiguration> actual = mService.loadConfig(); in testLoadConfig_UseXml() local 169 assertTrue(actual.equals(expected)); in testLoadConfig_UseXml() 177 CarUxRestrictionsConfiguration actual = mService.loadConfig().get(0); in testLoadConfig_UseProdConfig() local 179 assertTrue(actual.equals(expected)); in testLoadConfig_UseProdConfig() 196 CarUxRestrictionsConfiguration actual = mService.loadConfig().get(0); in testLoadConfig_SupportsLegacyV1() local 244 assertTrue(actual.equals(expectedConfig)); in testLoadConfig_SupportsLegacyV1() 255 CarUxRestrictionsConfiguration actual = mService.loadConfig().get(0); in testLoadConfig_PromoteStagedFileWhenParked() local 259 assertTrue(actual.equals(expected)); in testLoadConfig_PromoteStagedFileWhenParked() 270 CarUxRestrictionsConfiguration actual = mService.loadConfig().get(0); in testLoadConfig_NoPromoteStagedFileWhenMoving() local 274 assertTrue(actual.equals(expected)); in testLoadConfig_NoPromoteStagedFileWhenMoving()
|
/packages/apps/Gallery2/jni_jpegstream/src/ |
D | jpeg_hook.cpp | 132 int64_t actual = src->inStream->skip(skip); in Mgr_skip_input_data_fcn() local 133 if (actual < 0) { in Mgr_skip_input_data_fcn() 136 skip -= actual; in Mgr_skip_input_data_fcn() 138 actual = src->inStream->skip(skip); in Mgr_skip_input_data_fcn() 139 if (actual < 0) { in Mgr_skip_input_data_fcn() 142 skip -= actual; in Mgr_skip_input_data_fcn() 143 if (actual == 0) { in Mgr_skip_input_data_fcn()
|
/packages/apps/TV/tests/robotests/src/com/android/tv/dvr/ |
D | ScheduledRecordingTest.java | 74 ScheduledRecording actual = in testBuildProgram() local 76 assertWithMessage("type").that(actual.getType()).isEqualTo(ScheduledRecording.TYPE_PROGRAM); in testBuildProgram() 81 ScheduledRecording actual = in testBuildTime() local 83 assertWithMessage("type").that(actual.getType()).isEqualTo(ScheduledRecording.TYPE_TIMED); in testBuildTime() 90 ScheduledRecording actual = ScheduledRecording.buildFrom(expected).build(); in testBuildFrom() local 91 RecordingTestUtils.assertRecordingEquals(expected, actual); in testBuildFrom()
|
/packages/apps/Launcher3/tests/tapl/com/android/launcher3/tapl/ |
D | LauncherInstrumentation.java | 370 private void failEquals(String message, Object actual) { in failEquals() argument 371 fail(message + ". " + "Actual: " + actual); in failEquals() 374 private void assertEquals(String message, int expected, int actual) { in assertEquals() argument 375 if (expected != actual) { in assertEquals() 376 fail(message + " expected: " + expected + " but was: " + actual); in assertEquals() 380 void assertEquals(String message, String expected, String actual) { in assertEquals() argument 381 if (!TextUtils.equals(expected, actual)) { in assertEquals() 382 fail(message + " expected: '" + expected + "' but was: '" + actual + "'"); in assertEquals() 386 void assertEquals(String message, long expected, long actual) { in assertEquals() argument 387 if (expected != actual) { in assertEquals() [all …]
|
/packages/apps/Messaging/tests/src/com/android/messaging/datamodel/action/ |
D | ReadWriteDraftMessageActionTest.java | 94 final MessageData actual = BugleDatabaseOperations.readMessage(db, messageId); in testWriteDraft() local 95 assertNotNull("Database missing draft", actual); in testWriteDraft() 96 assertEquals("Draft text changed", draftMessage, actual.getMessageText()); in testWriteDraft() 194 final MessageData actual = BugleDatabaseOperations.readDraftMessageData(db, conversationId, in testReadDraftForNewConversation() local 196 assertNull(actual); in testReadDraftForNewConversation() 321 final MessageData actual = BugleDatabaseOperations.readDraftMessageData(db, in testUpdateDraft() local 323 assertNotNull("Database missing draft", actual); in testUpdateDraft() 324 assertEquals("Draft text mismatch", draftMessage, actual.getMessageText()); in testUpdateDraft() 325 assertNull("Draft messageId should be null", actual.getMessageId()); in testUpdateDraft()
|
/packages/apps/Calendar/tests/src/com/android/calendar/widget/ |
D | CalendarAppWidgetServiceTest.java | 121 CalendarAppWidgetModel actual = CalendarFactory.buildAppWidgetModel( in testGetAppWidgetModel_1Event() local 124 assertEquals(expected.toString(), actual.toString()); in testGetAppWidgetModel_1Event() 170 … CalendarAppWidgetModel actual = CalendarAppWidgetService.CalendarFactory.buildAppWidgetModel( in testGetAppWidgetModel_AllDayEventLater() local 174 + " actual: " + actual.toString()); in testGetAppWidgetModel_AllDayEventLater() 175 assertEquals(expected.toString(), actual.toString()); in testGetAppWidgetModel_AllDayEventLater()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/ |
D | ZenOnboardingActivityTest.java | 107 Policy actual = captor.getValue(); in saveNewSetting() local 108 assertThat(actual.priorityCategories).isEqualTo(PRIORITY_CATEGORY_ALARMS in saveNewSetting() 110 assertThat(actual.priorityCallSenders).isEqualTo(Policy.PRIORITY_SENDERS_STARRED); in saveNewSetting() 111 assertThat(actual.priorityMessageSenders).isEqualTo(Policy.PRIORITY_SENDERS_ANY); in saveNewSetting() 112 assertThat(actual.suppressedVisualEffects).isEqualTo( in saveNewSetting()
|