Home
last modified time | relevance | path

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

12345678910>>...20

/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/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.versionCode, actual.versionCode); 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/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/accessibilityservice/src/android/accessibilityservice/cts/
DAccessibilityEndToEndTest.java64 final AccessibilityEvent expected = AccessibilityEvent.obtain(); in testTypeViewSelectedAccessibilityEvent() local
65 expected.setEventType(AccessibilityEvent.TYPE_VIEW_SELECTED); in testTypeViewSelectedAccessibilityEvent()
66 expected.setClassName(ListView.class.getName()); in testTypeViewSelectedAccessibilityEvent()
67 expected.setPackageName(getActivity().getPackageName()); in testTypeViewSelectedAccessibilityEvent()
68 expected.getText().add(getActivity().getString(R.string.second_list_item)); in testTypeViewSelectedAccessibilityEvent()
69 expected.setItemCount(2); in testTypeViewSelectedAccessibilityEvent()
70 expected.setCurrentItemIndex(1); in testTypeViewSelectedAccessibilityEvent()
71 expected.setEnabled(true); in testTypeViewSelectedAccessibilityEvent()
72 expected.setScrollable(false); in testTypeViewSelectedAccessibilityEvent()
73 expected.setFromIndex(0); in testTypeViewSelectedAccessibilityEvent()
[all …]
/cts/tests/camera/utils/src/android/hardware/camera2/cts/helpers/
DCameraErrorCollector.java143 public <T> boolean expectEquals(String msg, T expected, T actual) { in expectEquals() argument
144 if (expected == null) { in expectEquals()
148 if (!Objects.equals(expected, actual)) { in expectEquals()
149 addMessage(String.format("%s (expected = %s, actual = %s) ", msg, expected, in expectEquals()
165 public <T> boolean expectNotEquals(String msg, T expected, T actual) { in expectNotEquals() argument
166 if (Objects.equals(expected, actual)) { in expectNotEquals()
167 addMessage(String.format("%s (expected = %s, actual = %s) ", msg, expected, in expectNotEquals()
185 public <T> boolean expectEquals(String msg, T[] expected, T[] actual) { in expectEquals() argument
186 if (expected == null) { in expectEquals()
190 if (!Arrays.deepEquals(expected, actual)) { in expectEquals()
[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/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/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/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/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 …]
DFileObserverTest.java92 int[] expected = null; in testFileObserver() local
103 expected = new int[] {FileObserver.MODIFY, FileObserver.OPEN, FileObserver.MODIFY, in testFileObserver()
106 assertEventsEquals(expected, moveEvents); in testFileObserver()
114 expected = new int[] {UNDEFINED}; in testFileObserver()
116 assertEventsEquals(expected, moveEvents); in testFileObserver()
132 expected = new int[] {FileObserver.CREATE, in testFileObserver()
136 assertEventsEquals(expected, moveEvents); in testFileObserver()
156 expected = new int[] {FileObserver.MOVE_SELF}; in testFileObserver()
158 assertEventsEquals(expected, moveEvents); in testFileObserver()
160 expected = new int[] {FileObserver.MOVED_FROM}; in testFileObserver()
[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/tools/vm-tests-tf/src/dot/junit/
DDxAbstractMain.java111 static public void assertEquals(int expected, int actual) { in assertEquals() argument
112 …if (expected != actual) throw new RuntimeException("AssertionFailedError: not equals. Expected " +… in assertEquals()
115 static public void assertEquals(String message, int expected, int actual) { in assertEquals() argument
116 …if (expected != actual) throw new RuntimeException("AssertionFailedError: not equals: " + message … in assertEquals()
119 static public void assertEquals(long expected, long actual) { in assertEquals() argument
120 …if (expected != actual) throw new RuntimeException("AssertionFailedError: not equals. Expected " +… in assertEquals()
123 static public void assertEquals(double expected, double actual, double delta) { in assertEquals() argument
124 …if(!(Math.abs(expected-actual) <= delta)) throw new RuntimeException("AssertionFailedError: not wi… in assertEquals()
127 static public void assertEquals(Object expected, Object actual) { in assertEquals() argument
128 if (expected == null && actual == null) in assertEquals()
[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/tests/sensor/src/android/hardware/cts/helpers/sensorverification/
DMeanVerificationTest.java45 float[] expected = {2.0f, 3.0f, 6.0f}; in testVerify() local
48 MeanVerification verification = getVerification(expected, threshold, values); in testVerify()
52 expected = new float[]{2.5f, 2.5f, 5.5f}; in testVerify()
55 verification = getVerification(expected, threshold, values); in testVerify()
59 expected = new float[]{2.5f, 2.5f, 5.5f}; in testVerify()
62 verification = getVerification(expected, threshold, values); in testVerify()
71 expected = new float[]{2.5f, 2.5f, 5.5f}; in testVerify()
74 verification = getVerification(expected, threshold, values); in testVerify()
85 verification = getVerification(expected, threshold, values); in testVerify()
95 private static MeanVerification getVerification(float[] expected, float[] threshold, in getVerification() argument
[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/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 …]
/cts/tests/tests/telecom/src/android/telecom/cts/
DVideoCallTest.java615 public Object expected() { in assertVideoState()
642 public Object expected() { in assertVideoCallbackRegistered()
668 public Object expected() { in assertCameraCapabilitiesReceived()
695 public Object expected() { in assertCallDataUsageReceived()
722 public Object expected() { in assertVideoQualityReceived()
749 public Object expected() { in assertCallSessionEventReceived()
776 public Object expected() { in assertPeerWidthChanged()
797 final int expected) { in assertDeviceOrientationChanged() argument
801 public Object expected() { in assertDeviceOrientationChanged()
802 return expected; in assertDeviceOrientationChanged()
[all …]
/cts/tests/tests/util/src/android/util/cts/
DRangeTest.java52 @Test(expected=NullPointerException.class)
57 @Test(expected=NullPointerException.class)
62 @Test(expected=NullPointerException.class)
67 @Test(expected=IllegalArgumentException.class)
72 @Test(expected=IllegalArgumentException.class)
133 private static <T extends Comparable<? super T>> void verifyUpper(Range<T> object, T expected) { in verifyUpper() argument
134 verifyAction("upper", object, expected, object.getUpper()); in verifyUpper()
137 private static <T extends Comparable<? super T>> void verifyLower(Range<T> object, T expected) { in verifyLower() argument
138 verifyAction("lower", object, expected, object.getLower()); in verifyLower()
141 private static <T, T2> void verifyAction(String action, T object, T2 expected, in verifyAction() argument
[all …]

12345678910>>...20