Home
last modified time | relevance | path

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

12345678910>>...21

/cts/tests/tests/content/src/android/content/pm/cts/
DPackageInfoTest.java64 private void checkPkgInfoSame(PackageInfo expected, PackageInfo actual) { in checkPkgInfoSame() argument
65 assertEquals(expected.packageName, actual.packageName); in checkPkgInfoSame()
66 assertEquals(expected.getLongVersionCode(), actual.getLongVersionCode()); in checkPkgInfoSame()
67 assertEquals(expected.versionName, actual.versionName); in checkPkgInfoSame()
68 assertEquals(expected.sharedUserId, actual.sharedUserId); in checkPkgInfoSame()
69 assertEquals(expected.sharedUserLabel, actual.sharedUserLabel); in checkPkgInfoSame()
70 if (expected.applicationInfo != null) { in checkPkgInfoSame()
72 checkAppInfo(expected.applicationInfo, actual.applicationInfo); in checkPkgInfoSame()
76 assertTrue(Arrays.equals(expected.gids, actual.gids)); in checkPkgInfoSame()
77 checkInfoArray(expected.activities, actual.activities); in checkPkgInfoSame()
[all …]
DInstrumentationInfoTest.java55 private void checkInfoSame(InstrumentationInfo expected, InstrumentationInfo actual) { in checkInfoSame() argument
56 assertEquals(expected.name, actual.name); in checkInfoSame()
57 assertEquals(expected.dataDir, actual.dataDir); in checkInfoSame()
58 assertEquals(expected.handleProfiling, actual.handleProfiling); in checkInfoSame()
59 assertEquals(expected.functionalTest, actual.functionalTest); in checkInfoSame()
60 assertEquals(expected.targetPackage, actual.targetPackage); in checkInfoSame()
61 assertEquals(expected.sourceDir, actual.sourceDir); in checkInfoSame()
62 assertEquals(expected.publicSourceDir, actual.publicSourceDir); in checkInfoSame()
DProviderInfoTest.java86 private void checkInfoSame(ProviderInfo expected, ProviderInfo actual) { in checkInfoSame() argument
87 assertEquals(expected.name, actual.name); in checkInfoSame()
88 assertEquals(expected.authority, actual.authority); in checkInfoSame()
89 assertEquals(expected.readPermission, actual.readPermission); in checkInfoSame()
90 assertEquals(expected.writePermission, actual.writePermission); in checkInfoSame()
91 assertEquals(expected.grantUriPermissions, actual.grantUriPermissions); in checkInfoSame()
92 assertEquals(expected.uriPermissionPatterns, actual.uriPermissionPatterns); in checkInfoSame()
93 assertEquals(expected.multiprocess, actual.multiprocess); in checkInfoSame()
94 assertEquals(expected.initOrder, actual.initOrder); in checkInfoSame()
95 assertEquals(expected.isSyncable, actual.isSyncable); in checkInfoSame()
/cts/tests/tests/content/src/android/content/cts/
DContentValuesTest.java85 Long expected = 10L; in testGetAsLong() local
86 mContentValues.put("Long", expected); in testGetAsLong()
87 assertEquals(expected, mContentValues.getAsLong("Long")); in testGetAsLong()
89 expected = -1000L; in testGetAsLong()
90 mContentValues.put("Long", expected); in testGetAsLong()
91 assertEquals(expected, mContentValues.getAsLong("Long")); in testGetAsLong()
98 Byte expected = 'a'; in testGetAsByte() local
99 mContentValues.put("Byte", expected); in testGetAsByte()
100 assertEquals(expected, mContentValues.getAsByte("Byte")); in testGetAsByte()
102 expected = 'z'; in testGetAsByte()
[all …]
DIntentTest.java118 final CharSequence expected = "CharSequencetest"; in testGetCharSequenceExtra() local
119 mIntent.putExtra(TEST_EXTRA_NAME, expected); in testGetCharSequenceExtra()
120 assertEquals(expected, mIntent.getCharSequenceExtra(TEST_EXTRA_NAME)); in testGetCharSequenceExtra()
144 final ArrayList<Intent> expected = new ArrayList<Intent>(); in testGetParcelableArrayListExtra() local
146 expected.add(intent); in testGetParcelableArrayListExtra()
148 mIntent.putParcelableArrayListExtra(TEST_EXTRA_NAME, expected); in testGetParcelableArrayListExtra()
150 assertEquals(expected.size(), target.size()); in testGetParcelableArrayListExtra()
151 assertEquals(expected, target); in testGetParcelableArrayListExtra()
171 final ArrayList<Integer> expected = new ArrayList<Integer>(); in testGetIntegerArrayListExtra() local
172 expected.add(0); in testGetIntegerArrayListExtra()
[all …]
/cts/tests/tests/transition/src/android/transition/cts/
DArcMotionTest.java36 Path expected = arcWithPoint(0, 100, 100, 0, 100, 100); in test90Quadrants() local
38 assertPathMatches(expected, path); in test90Quadrants()
40 expected = arcWithPoint(100, 0, 0, -100, 0, 0); in test90Quadrants()
42 assertPathMatches(expected, path); in test90Quadrants()
44 expected = arcWithPoint(0, -100, -100, 0, 0, 0); in test90Quadrants()
46 assertPathMatches(expected, path); in test90Quadrants()
48 expected = arcWithPoint(-100, 0, 0, 100, -100, 100); in test90Quadrants()
50 assertPathMatches(expected, path); in test90Quadrants()
58 Path expected; in test345Triangles() local
61 expected = arcWithPoint(0, 120, 160, 0, 125, 120); in test345Triangles()
[all …]
/cts/tests/tests/net/src/android/net/cts/
DNetworkInfo_DetailedStateTest.java39 DetailedState[] expected = DetailedState.values(); in testValues() local
40 assertEquals(13, expected.length); in testValues()
41 assertEquals(DetailedState.IDLE, expected[0]); in testValues()
42 assertEquals(DetailedState.SCANNING, expected[1]); in testValues()
43 assertEquals(DetailedState.CONNECTING, expected[2]); in testValues()
44 assertEquals(DetailedState.AUTHENTICATING, expected[3]); in testValues()
45 assertEquals(DetailedState.OBTAINING_IPADDR, expected[4]); in testValues()
46 assertEquals(DetailedState.CONNECTED, expected[5]); in testValues()
47 assertEquals(DetailedState.SUSPENDED, expected[6]); in testValues()
48 assertEquals(DetailedState.DISCONNECTING, expected[7]); in testValues()
[all …]
DNetworkInfo_StateTest.java34 State[] expected = State.values(); in testValues() local
35 assertEquals(6, expected.length); in testValues()
36 assertEquals(State.CONNECTING, expected[0]); in testValues()
37 assertEquals(State.CONNECTED, expected[1]); in testValues()
38 assertEquals(State.SUSPENDED, expected[2]); in testValues()
39 assertEquals(State.DISCONNECTING, expected[3]); in testValues()
40 assertEquals(State.DISCONNECTED, expected[4]); in testValues()
41 assertEquals(State.UNKNOWN, expected[5]); in testValues()
/cts/tests/camera/utils/src/android/hardware/camera2/cts/helpers/
DCameraErrorCollector.java141 public <T> boolean expectEquals(String msg, T expected, T actual) { in expectEquals() argument
142 if (expected == null) { in expectEquals()
146 if (!Objects.equals(expected, actual)) { in expectEquals()
147 addMessage(String.format("%s (expected = %s, actual = %s) ", msg, expected, in expectEquals()
163 public <T> boolean expectNotEquals(String msg, T expected, T actual) { in expectNotEquals() argument
164 if (Objects.equals(expected, actual)) { in expectNotEquals()
165 addMessage(String.format("%s (expected = %s, actual = %s) ", msg, expected, in expectNotEquals()
183 public <T> boolean expectEquals(String msg, T[] expected, T[] actual) { in expectEquals() argument
184 if (expected == null) { in expectEquals()
188 if (!Arrays.deepEquals(expected, actual)) { in expectEquals()
[all …]
/cts/tests/tests/provider/src/android/provider/cts/contacts/
DContactsContract_SearchSnippetsTest.java102 final ContentValues expected = new ContentValues(); in testSearchSnippets_MatchEmailAddressCorrectSnippet() local
103 expected.put(Contacts._ID, ids[1]); in testSearchSnippets_MatchEmailAddressCorrectSnippet()
104 expected.put(SearchSnippets.SNIPPET, "eggs@[farmers].org"); in testSearchSnippets_MatchEmailAddressCorrectSnippet()
105 assertCursorStoredValuesWithContactsFilter(uri, ids, expected); in testSearchSnippets_MatchEmailAddressCorrectSnippet()
114 final ContentValues expected = new ContentValues(); in testEnterpriseSearchSnippets_MatchEmailAddressCorrectSnippet() local
115 expected.put(Contacts._ID, ids[1]); in testEnterpriseSearchSnippets_MatchEmailAddressCorrectSnippet()
116 expected.put(SearchSnippets.SNIPPET, "eggs@[farmers].org"); in testEnterpriseSearchSnippets_MatchEmailAddressCorrectSnippet()
117 assertCursorStoredValuesWithContactsFilter(uri, ids, expected); in testEnterpriseSearchSnippets_MatchEmailAddressCorrectSnippet()
125 final ContentValues expected = new ContentValues(); in testSearchSnippets_MatchPhoneNumberCorrectSnippet() local
126 expected.put(Contacts._ID, ids[0]); in testSearchSnippets_MatchPhoneNumberCorrectSnippet()
[all …]
DContactsContract_PhoneLookup.java144 final ContentValues expected = new ContentValues(); in testPhoneLookup_found1() local
145 expected.put(PhoneLookup._ID, ids[0].contactId); in testPhoneLookup_found1()
146 expected.put(PhoneLookup.CONTACT_ID, ids[0].contactId); in testPhoneLookup_found1()
147 expected.put(PhoneLookup.DATA_ID, ids[0].dataId); in testPhoneLookup_found1()
148 expected.put(PhoneLookup.NUMBER, "1111222333444"); in testPhoneLookup_found1()
150 assertCursorStoredValuesWithContactsFilter(uri, ids, expected); in testPhoneLookup_found1()
161 final ContentValues expected = new ContentValues(); in testPhoneLookup_found2() local
162 expected.put(PhoneLookup._ID, ids[1].contactId); in testPhoneLookup_found2()
163 expected.put(PhoneLookup.CONTACT_ID, ids[1].contactId); in testPhoneLookup_found2()
164 expected.put(PhoneLookup.DATA_ID, ids[1].dataId); in testPhoneLookup_found2()
[all …]
/cts/tests/tests/text/src/android/text/format/cts/
DTimeTest.java169 @Test(expected=NullPointerException.class)
175 @Test(expected=NullPointerException.class)
191 } catch (TimeFormatException expected) { in testBug16002()
206 } catch (TimeFormatException expected) { in testBug22225()
380 Time expected = new Time(tz); in testNormalize1() local
381 Fields.setDateTime(expected, test.year2, test.month2, test.day2, test.hour2, in testNormalize1()
384 Fields.MAIN_DATE_TIME, expected, local); in testNormalize1()
393 expected = new Time(tz); in testNormalize1()
394 Fields.setDateTime(expected, test.year2, test.month2, test.day2, test.hour2, in testNormalize1()
397 Fields.MAIN_DATE_TIME, expected, local); in testNormalize1()
[all …]
/cts/tests/tests/telephony/src/android/telephony/cts/
DSimRestrictedApisTest.java50 } catch (SecurityException expected) { in testInjectSmsPdu()
65 } catch (SecurityException expected) { in testSetLine1NumberForDisplay()
80 } catch (SecurityException expected) { in testSetLine1NumberForDisplay2()
95 } catch (SecurityException expected) { in testIccOpenLogicalChannel()
110 } catch (SecurityException expected) { in testIccCloseLogicalChannel()
125 } catch (SecurityException expected) { in testIccTransmitApduLogicalChannel()
140 } catch (SecurityException expected) { in testIccTransmitApduBasicChannel()
155 } catch (SecurityException expected) { in testSendEnvelopeWithStatus()
169 } catch (SecurityException expected) { in testNvReadItem()
183 } catch (SecurityException expected) { in testNvWriteItem()
[all …]
/cts/tests/tests/content/src/android/content/res/cts/
DArrayTest.java35 final Object expected) { in checkEntry() argument
37 + " at index " + index, expected, res); in checkEntry()
40 private void checkStringArray(final int resid, final String[] expected) { in checkStringArray() argument
42 assertEquals(res.length, expected.length); in checkStringArray()
43 for (int i = 0; i < expected.length; i++) { in checkStringArray()
44 checkEntry(resid, i, res[i], expected[i]); in checkStringArray()
48 private void checkTextArray(final int resid, final String[] expected) { in checkTextArray() argument
50 assertEquals(res.length, expected.length); in checkTextArray()
51 for (int i = 0; i < expected.length; i++) { in checkTextArray()
52 checkEntry(resid, i, res[i], expected[i]); in checkTextArray()
[all …]
DPrimitiveTest.java35 private void tryEnum(final int resid, final int expected) { in tryEnum() argument
40 assertEquals("Expecting value " + expected + " got " + value in tryEnum()
41 + ": in resource 0x" + Integer.toHexString(resid), expected, value); in tryEnum()
52 private void tryFlag(final int resid, final int expected) { in tryFlag() argument
57 assertEquals("Expecting value " + expected + " got " + value in tryFlag()
58 + ": in resource 0x" + Integer.toHexString(resid), expected, value); in tryFlag()
70 private void tryBoolean(final int resid, final boolean expected) { in tryBoolean() argument
74 assertEquals("Expecting boolean value " + expected + " got " + v in tryBoolean()
76 expected, v.data != 0); in tryBoolean()
77 assertEquals("Expecting boolean value " + expected + " got " + v in tryBoolean()
[all …]
/cts/tests/tests/os/src/android/os/cts/
DMessageTest.java66 Message expected = Message.obtain(mHandler, mRunnable); in testAccessMessageProperties() local
67 assertEquals(mRunnable, expected.getCallback()); in testAccessMessageProperties()
95 Message expected = Message.obtain(message); in testObtain2() local
97 assertEquals(message.getTarget(), expected.getTarget()); in testObtain2()
98 assertEquals(message.what, expected.what); in testObtain2()
99 assertEquals(message.arg1, expected.arg1); in testObtain2()
100 assertEquals(message.arg2, expected.arg2); in testObtain2()
101 assertEquals(message.obj, expected.obj); in testObtain2()
105 Message expected = Message.obtain(mHandler); in testObtain3() local
106 assertEquals(mHandler, expected.getTarget()); in testObtain3()
[all …]
DSharedMemoryTest.java117 byte expected = 5; in testReadWrite()
118 buffer.put(0, expected); in testReadWrite()
119 assertEquals(expected, buffer.get(0)); in testReadWrite()
122 assertEquals(expected, mRemote.read(0)); in testReadWrite()
123 expected = 10; in testReadWrite()
124 mRemote.write(0, expected); in testReadWrite()
127 assertEquals(expected, buffer.get(0)); in testReadWrite()
139 byte expected = 15; in testReadOnly()
140 buffer.put(0, expected); in testReadOnly()
141 assertEquals(expected, buffer.get(0)); in testReadOnly()
[all …]
DFileObserverTest.java106 int[] expected = null; in helpTestFileObserver() local
121 expected = new int[] {FileObserver.MODIFY, FileObserver.OPEN, FileObserver.MODIFY, in helpTestFileObserver()
125 assertEventsContains(expected, moveEvents); in helpTestFileObserver()
127 assertEventsEquals(expected, moveEvents); in helpTestFileObserver()
135 expected = new int[] {UNDEFINED}; in helpTestFileObserver()
138 assertEventsContains(expected, moveEvents); in helpTestFileObserver()
140 assertEventsEquals(expected, moveEvents); in helpTestFileObserver()
155 expected = new int[] {FileObserver.CREATE, in helpTestFileObserver()
160 assertEventsContains(expected, moveEvents); in helpTestFileObserver()
162 assertEventsEquals(expected, moveEvents); in helpTestFileObserver()
[all …]
/cts/common/device-side/util/src/com/android/compatibility/common/util/
DColorUtils.java25 public static void verifyColor(int expected, int observed) { in verifyColor() argument
26 verifyColor(expected, observed, 0); in verifyColor()
29 public static void verifyColor(int expected, int observed, int tolerance) { in verifyColor() argument
30 String s = "expected " + Integer.toHexString(expected) in verifyColor()
33 assertEquals(s, Color.red(expected), Color.red(observed), tolerance); in verifyColor()
34 assertEquals(s, Color.green(expected), Color.green(observed), tolerance); in verifyColor()
35 assertEquals(s, Color.blue(expected), Color.blue(observed), tolerance); in verifyColor()
36 assertEquals(s, Color.alpha(expected), Color.alpha(observed), tolerance); in verifyColor()
/cts/tools/vm-tests-tf/src/dot/junit/
DDxAbstractMain.java111 static public void assertEquals(int expected, int actual) { in assertEquals() argument
112 if (expected != actual) in assertEquals()
114 "not equals. Expected " + expected + " actual " + actual); in assertEquals()
117 static public void assertEquals(String message, int expected, int actual) { in assertEquals() argument
118 if (expected != actual) in assertEquals()
120 "not equals: " + message + " Expected " + expected + " actual " + actual); in assertEquals()
123 static public void assertEquals(long expected, long actual) { in assertEquals() argument
124 if (expected != actual) in assertEquals()
126 "not equals. Expected " + expected + " actual " + actual); in assertEquals()
129 static public void assertEquals(double expected, double actual, double delta) { in assertEquals() argument
[all …]
/cts/tests/tests/permission/src/android/permission/cts/
DNoWallpaperPermissionsTest.java62 } catch (SecurityException expected) { /* expected */ } in testSetResource()
67 } catch (SecurityException expected) { /* expected */ } in testSetResource()
84 } catch (SecurityException expected) { /* expected */ } in testSetBitmap()
89 } catch (SecurityException expected) { /* expected */ } in testSetBitmap()
94 } catch (SecurityException expected) { /* expected */ } in testSetBitmap()
111 } catch (SecurityException expected) { /* expected */ } in testSetStream()
116 } catch (SecurityException expected) { /* expected */ } in testSetStream()
121 } catch (SecurityException expected) { /* expected */ } in testSetStream()
136 } catch (SecurityException expected) { /* expected */ } in testClearWallpaper()
141 } catch (SecurityException expected) { /* expected */ } in testClearWallpaper()
[all …]
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/
DAccessibilityEndToEndTest.java99 final AccessibilityEvent expected = AccessibilityEvent.obtain(); in testTypeViewSelectedAccessibilityEvent() local
100 expected.setEventType(AccessibilityEvent.TYPE_VIEW_SELECTED); in testTypeViewSelectedAccessibilityEvent()
101 expected.setClassName(ListView.class.getName()); in testTypeViewSelectedAccessibilityEvent()
102 expected.setPackageName(getActivity().getPackageName()); in testTypeViewSelectedAccessibilityEvent()
103 expected.getText().add(getActivity().getString(R.string.second_list_item)); in testTypeViewSelectedAccessibilityEvent()
104 expected.setItemCount(2); in testTypeViewSelectedAccessibilityEvent()
105 expected.setCurrentItemIndex(1); in testTypeViewSelectedAccessibilityEvent()
106 expected.setEnabled(true); in testTypeViewSelectedAccessibilityEvent()
107 expected.setScrollable(false); in testTypeViewSelectedAccessibilityEvent()
108 expected.setFromIndex(0); in testTypeViewSelectedAccessibilityEvent()
[all …]
/cts/tests/tests/graphics/src/android/graphics/cts/
DRegion_OpTest.java47 Op[] expected = { in testValues() local
55 assertEquals(expected.length, actual.length); in testValues()
56 assertEquals(expected[0], actual[0]); in testValues()
57 assertEquals(expected[1], actual[1]); in testValues()
58 assertEquals(expected[2], actual[2]); in testValues()
59 assertEquals(expected[3], actual[3]); in testValues()
60 assertEquals(expected[4], actual[4]); in testValues()
61 assertEquals(expected[5], actual[5]); in testValues()
/cts/tests/sensor/src/android/hardware/cts/helpers/sensorverification/
DMeanVerificationTest.java46 float[] expected = {2.0f, 3.0f, 6.0f}; in testVerify() local
51 getVerification(expected, upperThresholds, lowerThresholds, values); in testVerify()
56 expected = new float[]{2.4f, 3.3f, 6.4f}; in testVerify()
59 verification = getVerification(expected, upperThresholds, lowerThresholds, values); in testVerify()
65 verification = getVerification(expected, upperThresholds, lowerThresholds, values); in testVerify()
76 verification = getVerification(expected, upperThresholds, lowerThresholds, values); in testVerify()
87 verification = getVerification(expected, upperThresholds, lowerThresholds, values); in testVerify()
97 expected = new float[]{1.5f, 2.8f, 5.7f}; in testVerify()
101 verification = getVerification(expected, upperThresholds, lowerThresholds, values); in testVerify()
107 verification = getVerification(expected, upperThresholds, lowerThresholds, values); in testVerify()
[all …]
/cts/tests/openglperf2/test/
DMatrixTest.cpp51 float expected[] = { in TEST() local
57 checkValues(m.mData, expected, Matrix::MATRIX_SIZE); in TEST()
129 float expected[] = { in TEST() local
134 checkValues(m3.mData, expected, Matrix::MATRIX_SIZE); in TEST()
157 float expected[] = { in TEST() local
163 checkValues(m->mData, expected, Matrix::MATRIX_SIZE); in TEST()
178 float expected[] = { in TEST() local
184 checkValues(m->mData, expected, Matrix::MATRIX_SIZE); in TEST()
191 float expected[] = { in TEST() local
197 checkValues(m->mData, expected, Matrix::MATRIX_SIZE); in TEST()
[all …]

12345678910>>...21