Home
last modified time | relevance | path

Searched refs:expected (Results 1 – 25 of 162) sorted by relevance

1234567

/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/
DSuggestionCursorUtil.java44 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/
DImapUtilityTests.java43 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 …]
DImapTestUtils.java45 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/Calendar/tests/src/com/android/calendar/
DAsyncQueryServiceTest.java285 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/CalendarProvider/tests/src/com/android/providers/calendar/
DCalendarProvider2Test.java200 int expected; field in CalendarProvider2Test.Delete
202 public Delete(String eventName, int expected, String account, String accountType) { in Delete() argument
204 this.expected = expected; in Delete()
212 assertEquals(expected, rows); in execute()
262 int expected; field in CalendarProvider2Test.QueryNumEvents
264 public QueryNumEvents(int expected) { in QueryNumEvents() argument
265 this.expected = expected; in QueryNumEvents()
270 assertEquals(expected, cursor.getCount()); in execute()
318 int expected; field in CalendarProvider2Test.QueryNumInstances
322 public QueryNumInstances(String startDate, String endDate, int expected) { in QueryNumInstances() argument
[all …]
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/keyboard/internal/
DMoreKeySpecTests.java56 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 …]
DMoreKeySpecSplitTests.java63 private static <T> void assertArrayEquals(final String message, final T[] expected, in assertArrayEquals() argument
65 if (expected == actual) { in assertArrayEquals()
68 if (expected == null || actual == null) { in assertArrayEquals()
69 assertEquals(message, Arrays.toString(expected), Arrays.toString(actual)); in assertArrayEquals()
72 if (expected.length != actual.length) { in assertArrayEquals()
73 assertEquals(message + " [length]", Arrays.toString(expected), Arrays.toString(actual)); in assertArrayEquals()
76 for (int i = 0; i < expected.length; i++) { in assertArrayEquals()
77 final T e = expected[i]; in assertArrayEquals()
90 final String[] expected = (expectedArray.length == 0) ? null : expectedArray; in assertTextArray() local
91 assertArrayEquals(message, expected, actual); in assertTextArray()
[all …]
/packages/apps/Camera2/tests_camera/src/com/android/camera/unittest/
DCameraUnitTest.java75 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/Camera2/tests/src/com/android/camera/unittest/
DCameraUnitTest.java75 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/Camera/tests/src/com/android/camera/unittest/
DCameraUnitTest.java75 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/LegacyCamera/tests/src/com/android/camera/unittest/
DCameraTest.java79 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/Bluetooth/tests/src/com/android/bluetooth/tests/
DBluetoothMapbMessageTest.java146 String expected = in testSmsEncodeNativeDeliverPdu() local
198 if(D) Log.d(TAG, "\nExpected: \n" + expected); in testSmsEncodeNativeDeliverPdu()
201 assertTrue(expected.equalsIgnoreCase(encoded)); in testSmsEncodeNativeDeliverPdu()
217 String expected = in testSmsEncodeDecodeNativeSubmitPdu() local
270 if(D) Log.d(TAG, "\nExpected: \n" + expected); in testSmsEncodeDecodeNativeSubmitPdu()
273 … assertTrue("The encoded bMessage do not match the expected.", expected.equalsIgnoreCase(encoded)); in testSmsEncodeDecodeNativeSubmitPdu()
325 String expected = "Flo"; in testSmsEncodeDecodeNativeSubmitPduWithSc() local
331 …e("Decoded string (" + decoded + ") did not match expected (" + expected + ")", expected.equals(de… in testSmsEncodeDecodeNativeSubmitPduWithSc()
348 String expected = folder.substring(folder.length()-512, folder.length()); in testFolderLengthTruncation() local
360 … assertTrue("Wrong length expected 512, got " + expected.length(), expected.length() == 512); in testFolderLengthTruncation()
[all …]
/packages/providers/DownloadProvider/tests/src/com/android/providers/downloads/
DHelpersTest.java43 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()
DAbstractPublicApiTest.java126 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/apps/Calendar/tests/src/com/android/calendar/event/
DEditEventHelperTest.java899 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/
DEvenMoreAsserts.java66 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/
DContactDisplayUtilTests.java57 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/widget/
DCalendarAppWidgetServiceTest.java99 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/providers/ContactsProvider/tests/src/com/android/providers/contacts/database/
DMoreDatabaseUtilTest.java37 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/UnifiedEmail/src/org/apache/james/mime4j/field/datetime/parser/
DParseException.java116 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()
/packages/apps/UnifiedEmail/src/org/apache/james/mime4j/field/contenttype/parser/
DParseException.java116 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()
/packages/apps/UnifiedEmail/src/org/apache/james/mime4j/field/address/parser/
DParseException.java116 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()
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/keyboard/layout/tests/
DLayoutTestsBase.java29 import com.android.inputmethod.keyboard.layout.expected.AbstractLayoutBase;
30 import com.android.inputmethod.keyboard.layout.expected.ActualKeyboardBuilder;
31 import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
32 import com.android.inputmethod.keyboard.layout.expected.ExpectedKey.ExpectedAdditionalMoreKey;
33 import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
/packages/apps/ContactsCommon/tests/src/com/android/contacts/common/
DMoreContactUtilsTest.java150 private void assertCollapses(String message, boolean expected, CharSequence mimetype1, in assertCollapses() argument
152 assertEquals(message, expected, MoreContactUtils.shouldCollapse(mimetype1, data1, mimetype2, in assertCollapses()
154 assertEquals(message, expected, MoreContactUtils.shouldCollapse(mimetype2, data2, mimetype1, in assertCollapses()
170 assertEquals(message, expected, MoreContactUtils.shouldCollapse(mimetype1, data1, in assertCollapses()
172 assertEquals(message, expected, MoreContactUtils.shouldCollapse(mimetype2, data2_newref, in assertCollapses()
/packages/apps/Email/tests/src/com/android/email/
DLegacyConversionsTests.java288 private void checkAttachment(String tag, Part expected, EmailContent.Attachment actual, in checkAttachment() argument
290 String contentType = MimeUtility.unfoldAndDecode(expected.getContentType()); in checkAttachment()
292 assertEquals(tag, expected.getMimeType(), actual.mMimeType); in checkAttachment()
293 String disposition = expected.getDisposition(); in checkAttachment()
298 assertEquals(tag, expected.getContentId(), actual.mContentId); in checkAttachment()
311 String[] storeData = expected.getHeader(MimeHeader.HEADER_ANDROID_ATTACHMENT_STORE_DATA); in checkAttachment()

1234567