Home
last modified time | relevance | path

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

12345678910>>...12

/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/DocumentsUI/tests/unit/com/android/documentsui/
DFileTypeMapTest.java50 String expected = mRes.getString(R.string.txt_file_type); in testPlainTextType() local
51 assertEquals(expected, mMap.lookup("text/plain")); in testPlainTextType()
56 String expected = mRes.getString(R.string.pdf_file_type); in testPortableDocumentFormatType() local
57 assertEquals(expected, mMap.lookup("application/pdf")); in testPortableDocumentFormatType()
62 String expected = mRes.getString(R.string.word_file_type); in testMsWordType() local
63 assertEquals(expected, mMap.lookup("application/msword")); in testMsWordType()
68 String expected = mRes.getString(R.string.gdoc_file_type); in testGoogleDocType() local
69 assertEquals(expected, mMap.lookup("application/vnd.google-apps.document")); in testGoogleDocType()
75 String expected = getExtensionTypeFromExtension(R.string.archive_file_type, "Zip"); in testZipType() local
76 assertEquals(expected, mMap.lookup(mime)); in testZipType()
[all …]
/packages/apps/UnifiedEmail/tests/src/com/android/mail/utils/
DUtilsTest.java36 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/providers/BlockedNumberProvider/tests/src/com/android/providers/blockednumber/
DBlockedNumberProviderTest.java202 } 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/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/Camera2/tests/src/com/android/camera/unittest/
DCameraUnitTest.java31 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/tests/src/com/android/messaging/datamodel/
DFrequentContactsCursorBuilderTest.java28 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/
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/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/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.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()
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/apps/TV/tests/common/src/com/android/tv/testing/dvr/
DRecordingTestUtils.java65 … public static void assertRecordingEquals(ScheduledRecording expected, ScheduledRecording actual) { in assertRecordingEquals() argument
66 Assert.assertEquals("id", expected.getId(), actual.getId()); in assertRecordingEquals()
67 Assert.assertEquals("channel", expected.getChannelId(), actual.getChannelId()); in assertRecordingEquals()
68 Assert.assertEquals("programId", expected.getProgramId(), actual.getProgramId()); in assertRecordingEquals()
69 Assert.assertEquals("priority", expected.getPriority(), actual.getPriority()); in assertRecordingEquals()
70 Assert.assertEquals("start time", expected.getStartTimeMs(), actual.getStartTimeMs()); in assertRecordingEquals()
71 Assert.assertEquals("end time", expected.getEndTimeMs(), actual.getEndTimeMs()); in assertRecordingEquals()
72 Assert.assertEquals("state", expected.getState(), actual.getState()); in assertRecordingEquals()
73 Assert.assertEquals("parent series recording", expected.getSeriesRecordingId(), in assertRecordingEquals()
/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()
/packages/apps/Test/connectivity/sl4n/rapidjson/test/unittest/
Dencodedstreamtest.cpp91 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/Contacts/tests/src/com/android/contacts/editor/
DEditorUiUtilsTest.java87 final String expected = getContext() in testGetProfileAccountInfo_NonLocalAccount() local
89 assertEquals(expected, label); in testGetProfileAccountInfo_NonLocalAccount()
101 final String expected = getContext().getString(R.string.local_profile_title); in testGetProfileAccountInfo_DeviceLocalAccount() local
102 assertEquals(expected, label); in testGetProfileAccountInfo_DeviceLocalAccount()
112 final String expected = getContext().getString(R.string.account_type_format, DISPLAY_LABEL); in testGetAccountInfo_AccountType_NonGoogle() local
113 assertEquals(expected, label); in testGetAccountInfo_AccountType_NonGoogle()
123 final String expected = getContext().getString(R.string.google_account_type_format, in testGetAccountInfo_AccountType_Google() local
125 assertEquals(expected, label); in testGetAccountInfo_AccountType_Google()
136 final String expected = getContext().getString(R.string.account_phone); in testGetAccountInfo_AccountType_DeviceAccount() local
137 assertEquals(expected, label); in testGetAccountInfo_AccountType_DeviceAccount()
/packages/providers/CalendarProvider/tests/src/com/android/providers/calendar/
DCalendarProvider2Test.java208 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/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/Contacts/tests/src/com/android/contacts/util/
DContactDisplayUtilTests.java73 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/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/Settings/tests/robotests/src/com/android/settings/
DSettingsLicenseActivityTest.java61 void assertEqualIntents(Intent actual, Intent expected) { in assertEqualIntents() argument
62 assertThat(actual.getAction()).isEqualTo(expected.getAction()); in assertEqualIntents()
63 assertThat(actual.getDataString()).isEqualTo(expected.getDataString()); in assertEqualIntents()
64 assertThat(actual.getType()).isEqualTo(expected.getType()); in assertEqualIntents()
65 assertThat(actual.getCategories()).isEqualTo(expected.getCategories()); in assertEqualIntents()
66 assertThat(actual.getPackage()).isEqualTo(expected.getPackage()); in assertEqualIntents()
67 assertThat(actual.getFlags()).isEqualTo(expected.getFlags()); in assertEqualIntents()
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/common/
DCustomizationVerifier.java74 ColorStateList expected = ColorStateList.valueOf(targetColor); in assertNextButtonColorCorrect() local
75 assertThat(actual, equalTo(expected)); in assertNextButtonColorCorrect()
82 ColorStateList expected = ColorStateList.valueOf(targetColor); in assertProgressBarColorCorrect() local
83 assertThat(progressBar.getIndeterminateTintList(), equalTo(expected)); in assertProgressBarColorCorrect()
84 assertThat(progressBar.getProgressBackgroundTintList(), equalTo(expected)); in assertProgressBarColorCorrect()
87 private Matcher<Bitmap> bitmapEqualTo(Bitmap expected) { in bitmapEqualTo() argument
96 return expected.sameAs((Bitmap) actual); in bitmapEqualTo()
/packages/apps/Bluetooth/src/com/android/bluetooth/mapclient/obex/
DBmessageParser.java92 private ParseException expected(Property... props) { in expected() method in BmessageParser
118 throw expected(BEGIN_BMSG); in parse()
134 throw expected(BEGIN_BENV); in parse()
140 throw expected(END_BENV); in parse()
233 throw expected(BEGIN_BENV, BEGIN_BBODY); in parseEnvelope()
237 throw expected(END_BENV); in parseEnvelope()
328 throw expected(END_MSG); in parseBody()
350 throw expected(END_MSG); in parseBody()
363 throw expected(END_BBODY); in parseBody()
/packages/apps/DocumentsUI/tests/common/com/android/documentsui/
DDocumentsProviderHelper.java160 public void assertChildCount(Uri parentUri, int expected) throws Exception { in assertChildCount() argument
162 assertEquals("Incorrect file count after copy", expected, children.size()); in assertChildCount()
165 public void assertChildCount(String parentId, int expected) throws Exception { in assertChildCount() argument
167 assertEquals("Incorrect file count after copy", expected, children.size()); in assertChildCount()
170 public void assertChildCount(RootInfo root, int expected) throws Exception { in assertChildCount() argument
171 assertChildCount(root.documentId, expected); in assertChildCount()
287 public void assertFileContents(Uri documentUri, byte[] expected) throws Exception { in assertFileContents() argument
290 expected, readDocument(documentUri)); in assertFileContents()
293 public void assertFileContents(String parentId, String fileName, byte[] expected) in assertFileContents() argument
297 assertFileContents(file.derivedUri, expected); in assertFileContents()

12345678910>>...12