/cts/tests/tests/content/src/android/content/pm/cts/ |
D | PackageInfoTest.java | 82 private void checkPkgInfoSame(PackageInfo expected, PackageInfo actual) { in checkPkgInfoSame() argument 83 assertEquals(expected.packageName, actual.packageName); in checkPkgInfoSame() 84 assertEquals(expected.getLongVersionCode(), actual.getLongVersionCode()); in checkPkgInfoSame() 85 assertEquals(expected.versionName, actual.versionName); in checkPkgInfoSame() 86 assertEquals(expected.sharedUserId, actual.sharedUserId); in checkPkgInfoSame() 87 assertEquals(expected.sharedUserLabel, actual.sharedUserLabel); in checkPkgInfoSame() 88 if (expected.applicationInfo != null) { in checkPkgInfoSame() 90 checkAppInfo(expected.applicationInfo, actual.applicationInfo); in checkPkgInfoSame() 94 assertTrue(Arrays.equals(expected.gids, actual.gids)); in checkPkgInfoSame() 95 checkInfoArray(expected.activities, actual.activities); in checkPkgInfoSame() [all …]
|
/cts/tests/tests/transition/src/android/transition/cts/ |
D | ArcMotionTest.java | 37 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 …]
|
D | PatternPathMotionTest.java | 41 Path expected = new Path(); in testStraightPath() local 42 expected.moveTo(0, 0); in testStraightPath() 43 expected.lineTo(100, 100); in testStraightPath() 45 assertPathMatches(expected, pathMotion.getPath(0, 0, 100, 100)); in testStraightPath() 56 Path expected = new Path(); in testCurve() local 57 expected.addArc(-50, 0, 50, 100, -90, 180); in testCurve() 59 assertPathMatches(expected, pathMotion.getPath(0, 0, 0, 100)); in testCurve()
|
/cts/tests/tests/content/src/android/content/cts/ |
D | ContentValuesTest.java | 101 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 …]
|
D | IntentTest.java | 121 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/camera/utils/src/android/hardware/camera2/cts/helpers/ |
D | CameraErrorCollector.java | 141 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/contactsprovider/src/android/provider/cts/contacts/ |
D | ContactsContract_SearchSnippetsTest.java | 102 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 …]
|
D | ContactsContract_PhoneLookup.java | 144 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/common/device-side/util-axt/src/com/android/compatibility/common/util/ |
D | ColorUtils.java | 30 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/telephony4/src/android/telephony4/cts/ |
D | SimRestrictedApisTest.java | 55 } 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/content/src/android/content/res/cts/ |
D | ArrayTest.java | 35 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 …]
|
D | PrimitiveTest.java | 35 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/text/src/android/text/format/cts/ |
D | TimeTest.java | 184 @Test(expected=NullPointerException.class) 190 @Test(expected=NullPointerException.class) 206 } catch (TimeFormatException expected) { in testBug16002() 221 } catch (TimeFormatException expected) { in testBug22225() 428 Time expected = new Time(tz); in testNormalize1() local 429 Fields.setDateTime(expected, test.year2, test.month2, test.day2, test.hour2, in testNormalize1() 432 Fields.MAIN_DATE_TIME, expected, local); in testNormalize1() 441 expected = new Time(tz); in testNormalize1() 442 Fields.setDateTime(expected, test.year2, test.month2, test.day2, test.hour2, in testNormalize1() 445 Fields.MAIN_DATE_TIME, expected, local); in testNormalize1() [all …]
|
/cts/hostsidetests/car/src/android/car/cts/powerpolicy/ |
D | PowerPolicyTestHelper.java | 51 public void checkCurrentState(int expected) { in checkCurrentState() argument 53 .that(expected == mFrameCpms.getCurrentState()).isTrue(); in checkCurrentState() 57 boolean expected = expectedPolicyId.equals(mFrameCpms.getCurrentPolicyId()); in checkCurrentPolicy() 58 if (!expected) { in checkCurrentPolicy() 62 assertWithMessage(CURRENT_POLICY_ASSERT_MSG).that(expected).isTrue(); in checkCurrentPolicy() 65 public void checkSilentModeStatus(boolean expected) { in checkSilentModeStatus() argument 67 .that(mFrameCpms.getForcedSilentMode() == expected).isTrue(); in checkSilentModeStatus() 70 public void checkSilentModeFull(SilentModeInfo expected) { in checkSilentModeFull() argument 71 boolean status = expected.equals(mSilentMode); in checkSilentModeFull() 73 CLog.e("PowerPolicyTestHelper expected silent mode: %s", expected.toString()); in checkSilentModeFull() [all …]
|
/cts/tests/tests/os/src/android/os/cts/ |
D | MessageTest.java | 66 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 …]
|
D | SharedMemoryTest.java | 117 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 …]
|
/cts/tests/tests/permission/src/android/permission/cts/ |
D | NoWallpaperPermissionsTest.java | 58 } catch (SecurityException expected) { /* expected */ } in testSetResource() 63 } catch (SecurityException expected) { /* expected */ } in testSetResource() 80 } catch (SecurityException expected) { /* expected */ } in testSetBitmap() 85 } catch (SecurityException expected) { /* expected */ } in testSetBitmap() 90 } catch (SecurityException expected) { /* expected */ } in testSetBitmap() 107 } catch (SecurityException expected) { /* expected */ } in testSetStream() 112 } catch (SecurityException expected) { /* expected */ } in testSetStream() 117 } catch (SecurityException expected) { /* expected */ } in testSetStream() 132 } catch (SecurityException expected) { /* expected */ } in testClearWallpaper() 137 } catch (SecurityException expected) { /* expected */ } in testClearWallpaper() [all …]
|
/cts/tools/vm-tests-tf/src/dot/junit/ |
D | DxAbstractMain.java | 111 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/uirendering/src/android/uirendering/cts/testclasses/ |
D | CanvasTests.java | 210 @Test(expected = IllegalArgumentException.class) 217 @Test(expected = IllegalArgumentException.class) 227 @Test(expected = IllegalArgumentException.class) 241 @Test(expected = IllegalArgumentException.class) 254 @Test(expected = IllegalArgumentException.class) 267 @Test(expected = IllegalStateException.class) 273 @Test(expected = RuntimeException.class) 282 @Test(expected = IllegalStateException.class) 288 @Test(expected = RuntimeException.class) 296 @Test(expected = IllegalStateException.class) [all …]
|
/cts/tests/framework/base/windowmanager/src/android/server/wm/intent/ |
D | StateComparisonException.java | 30 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/tests/graphics/src/android/graphics/cts/ |
D | MatrixTest.java | 70 @Test(expected = IllegalStateException.class) 77 @Test(expected = IllegalStateException.class) 82 @Test(expected = IllegalStateException.class) 87 @Test(expected = IllegalStateException.class) 92 @Test(expected = IllegalStateException.class) 97 @Test(expected = IllegalStateException.class) 102 @Test(expected = IllegalStateException.class) 107 @Test(expected = IllegalStateException.class) 112 @Test(expected = IllegalStateException.class) 117 @Test(expected = IllegalStateException.class) [all …]
|
D | Region_OpTest.java | 48 Op[] expected = { in testValues() local 56 assertEquals(expected.length, actual.length); in testValues() 57 assertEquals(expected[0], actual[0]); in testValues() 58 assertEquals(expected[1], actual[1]); in testValues() 59 assertEquals(expected[2], actual[2]); in testValues() 60 assertEquals(expected[3], actual[3]); in testValues() 61 assertEquals(expected[4], actual[4]); in testValues() 62 assertEquals(expected[5], actual[5]); in testValues()
|
/cts/tests/sensor/src/android/hardware/cts/helpers/sensorverification/ |
D | MeanVerificationTest.java | 46 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 …]
|
D | MeanLargerThanVerificationTest.java | 43 float[] expected = {2.0f, 1.7f, 2.5f}; in testVerify() local 46 MeanLargerThanVerification verification = getVerification(expected, thresholds, values); in testVerify() 51 expected = new float[] {2.5f, 1.5f, 3.5f}; in testVerify() 54 verification = getVerification(expected, thresholds, values); in testVerify() 59 expected = new float[] {2.5f, 2.0f, 3.0f}; in testVerify() 62 verification = getVerification(expected, thresholds, values); in testVerify() 69 verification = getVerification(expected, thresholds, values); in testVerify() 80 float[] expected, float[] thresholds, float[]... values) { in getVerification() argument 86 new MeanLargerThanVerification(expected, thresholds); in getVerification()
|
/cts/hostsidetests/scopedstorage/libs/ScopedStorageTestLib/src/android/scopedstorage/cts/lib/ |
D | RedactionTestHelper.java | 81 @NonNull HashMap<String, String> actual, @NonNull HashMap<String, String> expected) { in assertExifMetadataMatch() argument 83 assertMetadataEntryMatch(tag, actual.get(tag), expected.get(tag)); in assertExifMetadataMatch() 91 @NonNull HashMap<String, String> actual, @NonNull HashMap<String, String> expected) { in assertExifMetadataMismatch() argument 93 assertMetadataEntryMismatch(tag, actual.get(tag), expected.get(tag)); in assertExifMetadataMismatch() 97 private static void assertMetadataEntryMatch(String tag, String actual, String expected) { in assertMetadataEntryMatch() argument 98 if (!Objects.equals(actual, expected)) { in assertMetadataEntryMatch() 100 + "expected:" + expected + "\n" in assertMetadataEntryMatch() 105 private static void assertMetadataEntryMismatch(String tag, String actual, String expected) { in assertMetadataEntryMismatch() argument 106 if (Objects.equals(actual, expected)) { in assertMetadataEntryMismatch() 108 + "expected not to be:" + expected); in assertMetadataEntryMismatch()
|