Home
last modified time | relevance | path

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

12345678910>>...25

/cts/tests/tests/content/src/android/content/cts/
DContentValuesTest.java101 Long expected = 10L; in testGetAsLong() local
102 mContentValues.put("Long", expected); in testGetAsLong()
103 assertEquals(expected, mContentValues.getAsLong("Long")); in testGetAsLong()
105 expected = -1000L; in testGetAsLong()
106 mContentValues.put("Long", expected); in testGetAsLong()
107 assertEquals(expected, mContentValues.getAsLong("Long")); in testGetAsLong()
115 Byte expected = 'a'; in testGetAsByte() local
116 mContentValues.put("Byte", expected); in testGetAsByte()
117 assertEquals(expected, mContentValues.getAsByte("Byte")); in testGetAsByte()
119 expected = 'z'; in testGetAsByte()
[all …]
DIntentTest.java121 final CharSequence expected = "CharSequencetest"; in testGetCharSequenceExtra() local
122 mIntent.putExtra(TEST_EXTRA_NAME, expected); in testGetCharSequenceExtra()
123 assertEquals(expected, mIntent.getCharSequenceExtra(TEST_EXTRA_NAME)); in testGetCharSequenceExtra()
149 final ArrayList<Intent> expected = new ArrayList<Intent>(); in testGetParcelableArrayListExtra() local
151 expected.add(intent); in testGetParcelableArrayListExtra()
153 mIntent.putParcelableArrayListExtra(TEST_EXTRA_NAME, expected); in testGetParcelableArrayListExtra()
155 assertEquals(expected.size(), target.size()); in testGetParcelableArrayListExtra()
156 assertEquals(expected, target); in testGetParcelableArrayListExtra()
176 final ArrayList<Integer> expected = new ArrayList<Integer>(); in testGetIntegerArrayListExtra() local
177 expected.add(0); in testGetIntegerArrayListExtra()
[all …]
/cts/tests/tests/content/src/android/content/pm/cts/
DPackageInfoTest.java66 private void checkPkgInfoSame(PackageInfo expected, PackageInfo actual) { in checkPkgInfoSame() argument
67 assertEquals(expected.packageName, actual.packageName); in checkPkgInfoSame()
68 assertEquals(expected.getLongVersionCode(), actual.getLongVersionCode()); in checkPkgInfoSame()
69 assertEquals(expected.versionName, actual.versionName); in checkPkgInfoSame()
70 assertEquals(expected.sharedUserId, actual.sharedUserId); in checkPkgInfoSame()
71 assertEquals(expected.sharedUserLabel, actual.sharedUserLabel); in checkPkgInfoSame()
72 if (expected.applicationInfo != null) { in checkPkgInfoSame()
74 checkAppInfo(expected.applicationInfo, actual.applicationInfo); in checkPkgInfoSame()
78 assertTrue(Arrays.equals(expected.gids, actual.gids)); in checkPkgInfoSame()
79 checkInfoArray(expected.activities, actual.activities); in checkPkgInfoSame()
[all …]
/cts/tests/tests/transition/src/android/transition/cts/
DArcMotionTest.java37 Path expected = arcWithPoint(0, 100, 100, 0, 100, 100); in test90Quadrants() local
39 assertPathMatches(expected, path); in test90Quadrants()
41 expected = arcWithPoint(100, 0, 0, -100, 0, 0); in test90Quadrants()
43 assertPathMatches(expected, path); in test90Quadrants()
45 expected = arcWithPoint(0, -100, -100, 0, 0, 0); in test90Quadrants()
47 assertPathMatches(expected, path); in test90Quadrants()
49 expected = arcWithPoint(-100, 0, 0, 100, -100, 100); in test90Quadrants()
51 assertPathMatches(expected, path); in test90Quadrants()
59 Path expected; in test345Triangles() local
62 expected = arcWithPoint(0, 120, 160, 0, 125, 120); in test345Triangles()
[all …]
/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.java180 @Test(expected=NullPointerException.class)
186 @Test(expected=NullPointerException.class)
202 } catch (TimeFormatException expected) { in testBug16002()
217 } catch (TimeFormatException expected) { in testBug22225()
391 Time expected = new Time(tz); in testNormalize1() local
392 Fields.setDateTime(expected, test.year2, test.month2, test.day2, test.hour2, in testNormalize1()
395 Fields.MAIN_DATE_TIME, expected, local); in testNormalize1()
404 expected = new Time(tz); in testNormalize1()
405 Fields.setDateTime(expected, test.year2, test.month2, test.day2, test.hour2, in testNormalize1()
408 Fields.MAIN_DATE_TIME, expected, local); in testNormalize1()
[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/common/device-side/util/src/com/android/compatibility/common/util/
DColorUtils.java30 public static void verifyColor(int expected, int observed) { in verifyColor() argument
31 verifyColor(expected, observed, 0); in verifyColor()
34 public static void verifyColor(int expected, int observed, int tolerance) { in verifyColor() argument
35 verifyColor("", expected, observed, tolerance); in verifyColor()
46 public static void verifyColor(@NonNull String s, int expected, int observed, int tolerance) { in verifyColor() argument
47 s += " expected 0x" + Integer.toHexString(expected) in verifyColor()
50 String red = verifyChannel("red", expected, observed, tolerance, (i) -> Color.red(i)); in verifyColor()
51 String green = verifyChannel("green", expected, observed, tolerance, (i) -> Color.green(i)); in verifyColor()
52 String blue = verifyChannel("blue", expected, observed, tolerance, (i) -> Color.blue(i)); in verifyColor()
53 String alpha = verifyChannel("alpha", expected, observed, tolerance, (i) -> Color.alpha(i)); in verifyColor()
[all …]
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DColorUtils.java30 public static void verifyColor(int expected, int observed) { in verifyColor() argument
31 verifyColor(expected, observed, 0); in verifyColor()
34 public static void verifyColor(int expected, int observed, int tolerance) { in verifyColor() argument
35 verifyColor("", expected, observed, tolerance); in verifyColor()
46 public static void verifyColor(@NonNull String s, int expected, int observed, int tolerance) { in verifyColor() argument
47 s += " expected 0x" + Integer.toHexString(expected) in verifyColor()
50 String red = verifyChannel("red", expected, observed, tolerance, (i) -> Color.red(i)); in verifyColor()
51 String green = verifyChannel("green", expected, observed, tolerance, (i) -> Color.green(i)); in verifyColor()
52 String blue = verifyChannel("blue", expected, observed, tolerance, (i) -> Color.blue(i)); in verifyColor()
53 String alpha = verifyChannel("alpha", expected, observed, tolerance, (i) -> Color.alpha(i)); in verifyColor()
[all …]
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/
DCanvasTests.java169 @Test(expected = IllegalArgumentException.class)
176 @Test(expected = IllegalArgumentException.class)
186 @Test(expected = IllegalArgumentException.class)
200 @Test(expected = IllegalArgumentException.class)
213 @Test(expected = IllegalArgumentException.class)
226 @Test(expected = IllegalStateException.class)
232 @Test(expected = RuntimeException.class)
241 @Test(expected = IllegalStateException.class)
247 @Test(expected = RuntimeException.class)
255 @Test(expected = IllegalStateException.class)
[all …]
/cts/tests/tests/telephony4/src/android/telephony4/cts/
DSimRestrictedApisTest.java55 } catch (SecurityException expected) { in testInjectSmsPdu()
71 } catch (SecurityException expected) { in testSetLine1NumberForDisplay()
88 } catch (SecurityException expected) { in testIccOpenLogicalChannel()
105 } catch (SecurityException expected) { in testIccOpenLogicalChannelBySlot()
121 } catch (SecurityException expected) { in testIccCloseLogicalChannel()
137 } catch (SecurityException expected) { in testIccCloseLogicalChannelBySlot()
153 } catch (SecurityException expected) { in testIccTransmitApduBasicChannel()
169 } catch (SecurityException expected) { in testIccTransmitApduBasicChannelBySlot()
185 } catch (SecurityException expected) { in testIccTransmitApduLogicalChannel()
201 } catch (SecurityException expected) { in testIccTransmitApduLogicalChannelBySlot()
[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.java120 int[] expected = null; in helpTestFileObserver() local
139 expected = new int[] {UNDEFINED}; in helpTestFileObserver()
142 assertEventsContains(expected, moveEvents); in helpTestFileObserver()
144 assertEventsEquals(expected, moveEvents); in helpTestFileObserver()
174 expected = new int[] { in helpTestFileObserver()
181 assertEventsContains(expected, moveEvents); in helpTestFileObserver()
183 assertEventsEquals(expected, moveEvents); in helpTestFileObserver()
200 final int[] expected = { in verifyTriggeredEventsOnFile() local
209 assertEventsContains(expected, moveEvents); in verifyTriggeredEventsOnFile()
211 assertEventsEquals(expected, moveEvents); in verifyTriggeredEventsOnFile()
[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) 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/rcs/src/android/telephony/ims/cts/
DRcsEventTest.java174 private boolean matches(RcsGroupThreadParticipantJoinedEvent expected, RcsEvent actual) { in matches() argument
181 return matchesGroupThreadEvent(expected, actualParticipantJoinedEvent) in matches()
183 == expected.getJoinedParticipant().getId(); in matches()
187 private boolean matches(RcsGroupThreadNameChangedEvent expected, RcsEvent actual) { in matches() argument
194 return matchesGroupThreadEvent(expected, actualGroupThreadNameChangedEvent) in matches()
195 && actualGroupThreadNameChangedEvent.getNewName().equals(expected.getNewName()); in matches()
198 private boolean matches(RcsGroupThreadParticipantLeftEvent expected, RcsEvent actual) { in matches() argument
205 return matchesGroupThreadEvent(expected, actualParticipantLeftEvent) in matches()
207 == expected.getLeavingParticipant().getId(); in matches()
211 private boolean matches(RcsGroupThreadIconChangedEvent expected, RcsEvent actual) { in matches() 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/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/framework/base/windowmanager/src/android/server/wm/intent/
DStateComparisonException.java30 public StateComparisonException(Persistence.StateDump expected, in StateComparisonException() argument
32 mExpected = expected; in StateComparisonException()
63 public static void assertEndStatesEqual(Persistence.StateDump expected, in assertEndStatesEqual() argument
65 compareAndThrow(expected, actual, "Different endSates"); in assertEndStatesEqual()
68 public static void assertInitialStateEqual(Persistence.StateDump expected, in assertInitialStateEqual() argument
70 compareAndThrow(expected, actual, "Different initial states"); in assertInitialStateEqual()
73 private static void compareAndThrow(Persistence.StateDump expected, in compareAndThrow() argument
75 if (!expected.equals(actual)) { in compareAndThrow()
76 throw new StateComparisonException(expected, actual, stage); in compareAndThrow()
/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>>...25