Home
last modified time | relevance | path

Searched refs:actual (Results 1 – 25 of 63) sorted by relevance

123

/packages/apps/Email/tests/src/com/android/email/provider/
DProviderTestUtils.java271 EmailContent actual) { in assertEmailContentEqual() argument
272 if (expect == actual) { in assertEmailContentEqual()
276 assertEquals(caller + " mId", expect.mId, actual.mId); in assertEmailContentEqual()
277 assertEquals(caller + " mBaseUri", expect.mBaseUri, actual.mBaseUri); in assertEmailContentEqual()
285 public static void assertAccountEqual(String caller, Account expect, Account actual) { in assertAccountEqual() argument
286 if (expect == actual) { in assertAccountEqual()
290 assertEmailContentEqual(caller, expect, actual); in assertAccountEqual()
291 assertEquals(caller + " mDisplayName", expect.mDisplayName, actual.mDisplayName); in assertAccountEqual()
292 assertEquals(caller + " mEmailAddress", expect.mEmailAddress, actual.mEmailAddress); in assertAccountEqual()
293 assertEquals(caller + " mSyncKey", expect.mSyncKey, actual.mSyncKey); in assertAccountEqual()
[all …]
DAccountBackupRestoreTests.java60 public static void assertRestoredAccountEqual(Account expect, Account actual) { in assertRestoredAccountEqual() argument
61 assertEquals(" mDisplayName", expect.mDisplayName, actual.mDisplayName); in assertRestoredAccountEqual()
62 assertEquals(" mEmailAddress", expect.mEmailAddress, actual.mEmailAddress); in assertRestoredAccountEqual()
64 assertEquals(" mSyncLookback", expect.mSyncLookback, actual.mSyncLookback); in assertRestoredAccountEqual()
65 assertEquals(" mSyncInterval", expect.mSyncInterval, actual.mSyncInterval); in assertRestoredAccountEqual()
66 assertEquals(" mFlags", expect.mFlags, actual.mFlags); in assertRestoredAccountEqual()
67 assertEquals(" mSenderName", expect.mSenderName, actual.mSenderName); in assertRestoredAccountEqual()
69 actual.mProtocolVersion); in assertRestoredAccountEqual()
70 assertEquals(" mSignature", expect.mSignature, actual.mSignature); in assertRestoredAccountEqual()
73 assertEquals(0, actual.mPolicyKey); in assertRestoredAccountEqual()
[all …]
/packages/apps/Email/tests/src/com/android/email/mail/store/imap/
DImapUtilityTests.java44 String[] actual; in testGetImapSequenceValues() local
48 actual = ImapUtility.getImapSequenceValues("1"); in testGetImapSequenceValues()
49 MoreAsserts.assertEquals(expected, actual); in testGetImapSequenceValues()
52 actual = ImapUtility.getImapSequenceValues("1,3,2"); in testGetImapSequenceValues()
53 MoreAsserts.assertEquals(expected, actual); in testGetImapSequenceValues()
56 actual = ImapUtility.getImapSequenceValues("4:6"); in testGetImapSequenceValues()
57 MoreAsserts.assertEquals(expected, actual); in testGetImapSequenceValues()
60 actual = ImapUtility.getImapSequenceValues("9:7"); in testGetImapSequenceValues()
61 MoreAsserts.assertEquals(expected, actual); in testGetImapSequenceValues()
64 actual = ImapUtility.getImapSequenceValues("1,2:4,9:7"); in testGetImapSequenceValues()
[all …]
DImapTestUtils.java45 public static final void assertElement(ImapElement expected, ImapElement actual) { in assertElement() argument
46 assertElement("(no message)", expected, actual); in assertElement()
55 ImapElement actual) { 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/ContactsCommon/tests/src/com/android/contacts/common/util/
DSearchUtilTest.java30 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/
DScaledBitmapInfoTest.java18 ScaledBitmapInfo actual = BitmapUtils.createScaledBitmapInfo("B80x100", B80x100, 50, 50); in testSize_B100x100to50x50() local
19 assertScaledBitmapSize(2, 40, 50, actual); in testSize_B100x100to50x50()
23 ScaledBitmapInfo actual = BitmapUtils.createScaledBitmapInfo("B80x100", B80x100, 50, 50); in testNeedsToReload_B100x100to50x50() local
24 assertNeedsToReload(false, actual, 25, 25); in testNeedsToReload_B100x100to50x50()
25 assertNeedsToReload(false, actual, 50, 50); in testNeedsToReload_B100x100to50x50()
26 assertNeedsToReload(false, actual, 99, 99); in testNeedsToReload_B100x100to50x50()
27 assertNeedsToReload(true, actual, 100, 100); in testNeedsToReload_B100x100to50x50()
28 assertNeedsToReload(true, actual, 101, 101); in testNeedsToReload_B100x100to50x50()
35 ScaledBitmapInfo actual = BitmapUtils in testBug20488453() local
37 assertScaledBitmapSize(8, 107, 160, actual); in testBug20488453()
[all …]
/packages/apps/UnifiedEmail/tests/src/com/android/mail/utils/
DUtilsTest.java34 final Spanned actual = Utils.insertStringWithStyle( in testInsertStringWithStyle() local
39 assertSpannedEquals(expected, actual); in testInsertStringWithStyle()
46 final Spanned actual = Utils.insertStringWithStyle( 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()
60 actual.getSpans(0, actual.length(), TextAppearanceSpan.class); in assertSpannedEquals()
69 TextAppearanceSpan expected, TextAppearanceSpan actual) { in assertTextAppearanceSpanEquals() argument
70 assertEquals(expected.describeContents(), actual.describeContents()); in assertTextAppearanceSpanEquals()
[all …]
/packages/apps/Messaging/src/com/android/messaging/util/
DAssert.java106 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/Messaging/tests/src/com/android/messaging/datamodel/
DFrequentContactsCursorBuilderTest.java28 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/apps/Email/tests/src/com/android/email/
DLegacyConversionsTests.java288 private void checkAttachment(String tag, Part expected, EmailContent.Attachment actual, in checkAttachment() argument
292 assertEquals(tag, expected.getMimeType(), actual.mMimeType); in checkAttachment()
297 assertEquals(tag, expectedSize, actual.mSize); in checkAttachment()
298 assertEquals(tag, expected.getContentId(), actual.mContentId); in checkAttachment()
302 assertEquals(tag, expectedName, actual.mFileName); in checkAttachment()
305 assertNull(tag, actual.getContentUri()); in checkAttachment()
307 assertTrue(tag, 0 != actual.mMessageKey); in checkAttachment()
315 assertEquals(tag, expectedPartId, actual.mLocation); in checkAttachment()
316 assertEquals(tag, "B", actual.mEncoding); in checkAttachment()
317 assertEquals(tag, accountKey, actual.mAccountKey); in checkAttachment()
[all …]
/packages/apps/TV/tests/common/src/com/android/tv/testing/dvr/
DRecordingTestUtils.java54 … 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()
63 actual.getParentSeasonRecording()); in assertRecordingEquals()
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/keyboard/internal/
DMoreKeySpecTests.java57 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 …]
DMoreKeySpecSplitTests.java45 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()
59 final T a = actual[i]; in assertArrayEquals()
70 final String[] actual = MoreKeySpec.splitKeySpecs(resolvedActual); in assertTextArray() local
72 assertArrayEquals(message, expected, actual); in assertTextArray()
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/
DNameLookupBuilderTest.java228 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()
DEvenMoreAsserts.java81 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/providers/DownloadProvider/tests/src/com/android/providers/downloads/
DHelpersTest.java44 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
DAbstractPublicApiTest.java133 int actual = -1; in waitForStatus() local
138 actual = getStatus(); in waitForStatus()
139 if (actual == STATUS_SUCCESSFUL || actual == STATUS_FAILED) { in waitForStatus()
140 assertEquals(expected, actual); in waitForStatus()
142 } else if (actual == expected) { in waitForStatus()
161 throw new TimeoutException("Expected status " + expected + "; only reached " + actual); in waitForStatus()
/packages/apps/TV/tests/unit/src/com/android/tv/data/
DChannelNumberTest.java87 private void assertChannelEquals(ChannelNumber actual, String expectedMajor, in assertChannelEquals() argument
89 assertEquals(actual + " major", actual.majorNumber, expectedMajor); in assertChannelEquals()
90 assertEquals(actual + " hasDelimiter", actual.hasDelimiter, expectedHasDelimiter); in assertChannelEquals()
91 assertEquals(actual + " minor", actual.minorNumber, expectedMinor); in assertChannelEquals()
/packages/inputmethods/LatinIME/native/jni/tests/suggest/core/layout/
Dgeometry_utils_test.cpp25 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/
DMoreDatabaseUtilTest.java38 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/Test/connectivity/sl4n/rapidjson/test/unittest/
Dencodedstreamtest.cpp91 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/apps/TV/tests/unit/src/com/android/tv/dvr/
DScheduledRecordingTest.java62 ScheduledRecording actual = ScheduledRecording.builder(p).setChannelId(c.getId()).build(); in testBuildProgram() local
63 assertEquals("type", ScheduledRecording.TYPE_PROGRAM, actual.getType()); in testBuildProgram()
67 ScheduledRecording actual = createTestRecordingWithIdAndPeriod(1, CHANNEL_ID, 10L, 20L); in testBuildTime() local
68 assertEquals("type", ScheduledRecording.TYPE_TIMED, actual.getType()); in testBuildTime()
73 ScheduledRecording actual = ScheduledRecording.buildFrom(expected).build(); in testBuildFrom() local
74 RecordingTestUtils.assertRecordingEquals(expected, actual); in testBuildFrom()
/packages/apps/Gallery2/jni_jpegstream/src/
Djpeg_hook.cpp132 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/Calendar/tests/src/com/android/calendar/alerts/
DAlertServiceTest.java298 NotificationWrapper actual = mActualNotifications[id]; in validateNotificationsAndReset() local
300 assertNull("Received unexpected notificationId " + id + debugStr, actual); in validateNotificationsAndReset()
305 + debugStr, actual); in validateNotificationsAndReset()
309 expected.mPriority, actual.mNotification.priority); in validateNotificationsAndReset()
313 a.mEventId, actual.mEventId); in validateNotificationsAndReset()
315 a.mBegin, actual.mBegin); in validateNotificationsAndReset()
317 a.mEnd, actual.mEnd); in validateNotificationsAndReset()
321 actual.mNw); in validateNotificationsAndReset()
323 + debugStr, expected.mAlertIdsInDigest.length, actual.mNw.size()); in validateNotificationsAndReset()
324 for (int i = 0; i < actual.mNw.size(); i++) { in validateNotificationsAndReset()
[all …]
/packages/apps/Email/tests/src/com/android/emailcommon/internet/
DRfc822OutputTests.java235 String actual; in testGetHtmlBody() local
236 actual = Rfc822Output.getHtmlBody(HTML_FULL_BODY); in testGetHtmlBody()
237 assertEquals(HTML_FULL_RESULT, actual); in testGetHtmlBody()
238 actual = Rfc822Output.getHtmlBody(HTML_BODY_BODY); in testGetHtmlBody()
239 assertEquals(HTML_BODY_RESULT, actual); in testGetHtmlBody()
240 actual = Rfc822Output.getHtmlBody(HTML_NO_BODY_BODY); in testGetHtmlBody()
241 assertEquals(HTML_NO_BODY_RESULT, actual); in testGetHtmlBody()

123