/frameworks/base/test-junit/src/junit/framework/ |
D | Assert.java | 62 static public void assertEquals(String message, Object expected, Object actual) { in assertEquals() argument 63 if (expected == null && actual == null) in assertEquals() 65 if (expected != null && expected.equals(actual)) in assertEquals() 67 failNotEquals(message, expected, actual); in assertEquals() 73 static public void assertEquals(Object expected, Object actual) { in assertEquals() argument 74 assertEquals(null, expected, actual); in assertEquals() 79 static public void assertEquals(String message, String expected, String actual) { in assertEquals() argument 80 if (expected == null && actual == null) in assertEquals() 82 if (expected != null && expected.equals(actual)) in assertEquals() 85 throw new ComparisonFailure(cleanMessage, expected, actual); in assertEquals() [all …]
|
/frameworks/base/core/tests/coretests/src/android/view/textclassifier/ |
D | TextClassifierEventTest.java | 49 final SelectionEvent expected = SelectionEvent.createSelectionStartedEvent( in toSelectionEvent_selectionStarted() local 51 expected.setTextClassificationSessionContext(TC_CONTEXT); in toSelectionEvent_selectionStarted() 52 expected.setSessionId(sessionId); in toSelectionEvent_selectionStarted() 60 assertEquals(expected, event.toSelectionEvent()); in toSelectionEvent_selectionStarted() 68 final SelectionEvent expected = SelectionEvent.createSelectionModifiedEvent( in toSelectionEvent_smartSelectionMulti() local 70 expected.setInvocationMethod(SelectionEvent.INVOCATION_MANUAL); in toSelectionEvent_smartSelectionMulti() 71 expected.setEventType(SelectionEvent.EVENT_SMART_SELECTION_MULTI); in toSelectionEvent_smartSelectionMulti() 72 expected.setStart(start); in toSelectionEvent_smartSelectionMulti() 73 expected.setEnd(end); in toSelectionEvent_smartSelectionMulti() 74 expected.setEventIndex(eventIndex); in toSelectionEvent_smartSelectionMulti() [all …]
|
/frameworks/native/libs/vr/libpdx/ |
D | serialization_tests.cpp | 117 Payload expected; in TEST() local 123 expected = {ENCODING_TYPE_TRUE}; in TEST() 124 EXPECT_EQ(expected, result); in TEST() 130 expected = {ENCODING_TYPE_FALSE}; in TEST() 131 EXPECT_EQ(expected, result); in TEST() 137 Payload expected; in TEST() local 143 expected = {ENCODING_TYPE_POSITIVE_FIXINT_MIN}; in TEST() 144 EXPECT_EQ(expected, result); in TEST() 150 expected = {ENCODING_TYPE_POSITIVE_FIXINT_MAX}; in TEST() 151 EXPECT_EQ(expected, result); in TEST() [all …]
|
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/helpers/ |
D | CameraErrorCollector.java | 147 public <T> boolean expectEquals(String msg, T expected, T actual) { in expectEquals() argument 148 if (expected == null) { in expectEquals() 152 if (!Objects.equals(expected, actual)) { in expectEquals() 153 addMessage(String.format("%s (expected = %s, actual = %s) ", msg, expected, in expectEquals() 169 public <T> boolean expectNotEquals(String msg, T expected, T actual) { in expectNotEquals() argument 170 if (Objects.equals(expected, actual)) { in expectNotEquals() 171 addMessage(String.format("%s (expected = %s, actual = %s) ", msg, expected, in expectNotEquals() 189 public <T> boolean expectEquals(String msg, T[] expected, T[] actual) { in expectEquals() argument 190 if (expected == null) { in expectEquals() 194 if (!Arrays.deepEquals(expected, actual)) { in expectEquals() [all …]
|
/frameworks/base/test-runner/src/android/test/ |
D | MoreAsserts.java | 46 public static void assertAssignableFrom(Class<?> expected, Object actual) { in assertAssignableFrom() argument 47 assertAssignableFrom(expected, actual.getClass()); in assertAssignableFrom() 55 public static void assertAssignableFrom(Class<?> expected, Class<?> actual) { in assertAssignableFrom() argument 57 "Expected " + expected.getCanonicalName() + in assertAssignableFrom() 59 expected.isAssignableFrom(actual)); in assertAssignableFrom() 87 String message, byte[] expected, byte[] actual) { in assertEquals() argument 88 if (expected.length != actual.length) { in assertEquals() 89 failWrongLength(message, expected.length, actual.length); in assertEquals() 91 for (int i = 0; i < expected.length; i++) { in assertEquals() 92 if (expected[i] != actual[i]) { in assertEquals() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/ |
D | PasswordSlotManagerTests.java | 60 Set<Integer> expected = new HashSet<Integer>(); in testBasicSlotUse() local 61 expected.add(0); in testBasicSlotUse() 62 expected.add(1); in testBasicSlotUse() 63 assertEquals(expected, mManager.getUsedSlots()); in testBasicSlotUse() 67 expected = new HashSet<Integer>(); in testBasicSlotUse() 68 expected.add(0); in testBasicSlotUse() 69 assertEquals(expected, mManager.getUsedSlots()); in testBasicSlotUse() 91 Set<Integer> expected = new HashSet<Integer>(); in testMergeSlots() local 92 expected.add(1); in testMergeSlots() 93 expected.add(3); in testMergeSlots() [all …]
|
D | RebootEscrowDataTest.java | 69 @Test(expected = NullPointerException.class) 74 @Test(expected = NullPointerException.class) 77 RebootEscrowData expected = RebootEscrowData.fromSyntheticPassword(mKey, (byte) 2, testSp, in fromEncryptedData_failsOnNullData() local 79 RebootEscrowKey key = RebootEscrowKey.fromKeyBytes(expected.getKey().getKeyBytes()); in fromEncryptedData_failsOnNullData() 83 @Test(expected = NullPointerException.class) 86 RebootEscrowData expected = RebootEscrowData.fromSyntheticPassword(mKey, (byte) 2, testSp, in fromEncryptedData_failsOnNullKey() local 88 RebootEscrowData.fromEncryptedData(null, expected.getBlob(), mKeyStoreEncryptionKey); in fromEncryptedData_failsOnNullKey() 94 RebootEscrowData expected = RebootEscrowData.fromSyntheticPassword(mKey, (byte) 2, testSp, in fromEntries_loopback_success() local 97 RebootEscrowKey key = RebootEscrowKey.fromKeyBytes(expected.getKey().getKeyBytes()); in fromEntries_loopback_success() 98 RebootEscrowData actual = RebootEscrowData.fromEncryptedData(key, expected.getBlob(), in fromEntries_loopback_success() [all …]
|
/frameworks/native/libs/vr/libdvrcommon/include/private/dvr/test/ |
D | test_macros.h | 16 const A& expected, const B& actual, const T& tolerance) { in CmpArrayLikeFloatEq() argument 18 if (!IsEqual(expected[i], actual[i], tolerance)) { in CmpArrayLikeFloatEq() 23 << " Expected \"" << expected[i] << "\", was \"" << actual[i] in CmpArrayLikeFloatEq() 34 const A& expected, const B& actual, const T& tolerance) { in CmpMatrixLikeFloatEq() argument 37 if (!IsEqual(expected(r, c), actual(r, c), tolerance)) { in CmpMatrixLikeFloatEq() 42 << " Expected \"" << expected(r, c) << "\", was \"" in CmpMatrixLikeFloatEq() 54 const A& expected, const B& actual, const T& tolerance) { in CmpArrayLikeFloatNe() argument 56 if (!IsEqual(expected[i], actual[i], tolerance)) { in CmpArrayLikeFloatNe() 72 const A& expected, const B& actual, const T& tolerance) { in CmpMatrixLikeFloatNe() argument 75 if (!IsEqual(expected(r, c), actual(r, c), tolerance)) { in CmpMatrixLikeFloatNe() [all …]
|
/frameworks/base/services/tests/PackageManagerServiceTests/server/src/com/android/server/pm/ |
D | PackageInstallerSessionTest.kt | 272 private fun assertSessionParamsEquivalent(expected: SessionParams, actual: SessionParams) { in <lambda>() 273 assertThat(expected.mode).isEqualTo(actual.mode) in <lambda>() 274 assertThat(expected.installFlags).isEqualTo(actual.installFlags) in <lambda>() 275 assertThat(expected.installLocation).isEqualTo(actual.installLocation) in <lambda>() 276 assertThat(expected.installReason).isEqualTo(actual.installReason) in <lambda>() 277 assertThat(expected.sizeBytes).isEqualTo(actual.sizeBytes) in <lambda>() 278 assertThat(expected.appPackageName).isEqualTo(actual.appPackageName) in <lambda>() 279 assertThat(expected.appIcon).isEqualTo(actual.appIcon) in <lambda>() 280 assertThat(expected.originatingUri).isEqualTo(actual.originatingUri) in <lambda>() 281 assertThat(expected.originatingUid).isEqualTo(actual.originatingUid) in <lambda>() [all …]
|
/frameworks/base/cmds/incident_helper/tests/ |
D | ih_util_test.cpp | 29 header_t result, expected; in TEST() local 31 EXPECT_EQ(expected, result); in TEST() 34 expected = { "100", "00", "opq", "wqrw" }; in TEST() 35 EXPECT_EQ(expected, result); in TEST() 38 expected = { "100 00", "oooh", "wtf" }; in TEST() 39 EXPECT_EQ(expected, result); in TEST() 42 expected = { "123", "456", "78_9" }; in TEST() 43 EXPECT_EQ(expected, result); in TEST() 47 record_t result, expected; in TEST() local 49 EXPECT_EQ(expected, result); in TEST() [all …]
|
D | SystemPropertiesParser_test.cpp | 55 SystemPropertiesProto expected; in TEST_F() local 57 expected.mutable_aac_drc()->set_cut(123); in TEST_F() 58 expected.mutable_aaudio()->set_hw_burst_min_usec(2000); in TEST_F() 59 expected.mutable_aaudio()->set_mmap_exclusive_policy(2); in TEST_F() 60 expected.mutable_dalvik_vm()->set_appimageformat("lz4"); in TEST_F() 61 expected.set_drm_64bit_enabled(false); in TEST_F() 62 expected.mutable_init_svc()->set_adbd( in TEST_F() 64 expected.mutable_init_svc()->set_lmkd( in TEST_F() 66 expected.set_media_mediadrmservice_enable(true); in TEST_F() 68 SystemPropertiesProto::Ro* ro = expected.mutable_ro(); in TEST_F() [all …]
|
D | ProcrankParser_test.cpp | 55 ProcrankProto expected; in TEST_F() local 57 ProcrankProto::Process* process1 = expected.add_processes(); in TEST_F() 69 ProcrankProto::Process* process2 = expected.add_processes(); in TEST_F() 81 ProcrankProto::Process* total = expected.mutable_summary()->mutable_total(); in TEST_F() 90 expected.mutable_summary()->mutable_zram() in TEST_F() 92 expected.mutable_summary()->mutable_ram() in TEST_F() 100 EXPECT_EQ(GetCapturedStdout(), expected.SerializeAsString()); in TEST_F() 107 ProcrankProto expected; in TEST_F() local 109 ProcrankProto::Process* process1 = expected.add_processes(); in TEST_F() 117 ProcrankProto::Process* process2 = expected.add_processes(); in TEST_F() [all …]
|
/frameworks/native/services/surfaceflinger/tests/ |
D | LayerCallback_test.cpp | 179 ExpectedResult expected; in TEST_F() local 180 expected.addSurface(ExpectedResult::Transaction::PRESENTED, layer); in TEST_F() 181 EXPECT_NO_FATAL_FAILURE(waitForCallback(callback, expected, true)); in TEST_F() 201 ExpectedResult expected; in TEST_F() local 202 expected.addSurface(ExpectedResult::Transaction::NOT_PRESENTED, layer, in TEST_F() 204 EXPECT_NO_FATAL_FAILURE(waitForCallback(callback, expected, true)); in TEST_F() 224 ExpectedResult expected; in TEST_F() local 225 expected.addSurface(ExpectedResult::Transaction::PRESENTED, layer); in TEST_F() 226 EXPECT_NO_FATAL_FAILURE(waitForCallback(callback, expected, true)); in TEST_F() 246 ExpectedResult expected; in TEST_F() local [all …]
|
/frameworks/base/tools/split-select/ |
D | Grouper_test.cpp | 104 Vector<const char*> expected; in expectHasGroupWithSplits() local 105 expected.add(a); in expectHasGroupWithSplits() 106 expectHasGroupWithSplits(expected); in expectHasGroupWithSplits() 110 Vector<const char*> expected; in expectHasGroupWithSplits() local 111 expected.add(a); in expectHasGroupWithSplits() 112 expected.add(b); in expectHasGroupWithSplits() 113 expectHasGroupWithSplits(expected); in expectHasGroupWithSplits() 117 Vector<const char*> expected; in expectHasGroupWithSplits() local 118 expected.add(a); in expectHasGroupWithSplits() 119 expected.add(b); in expectHasGroupWithSplits() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/animation/back/ |
D | BackAnimationSpecTest.kt | 37 expected = BackTransformation(translateX = 0f, translateY = 0f, scale = 1f), in sysUi_floatingSystemSurfaces_animationValues() 42 expected = BackTransformation(translateX = -maxX, translateY = 0f, scale = minScale), in sysUi_floatingSystemSurfaces_animationValues() 47 expected = BackTransformation(translateX = maxX, translateY = 0f, scale = minScale), in sysUi_floatingSystemSurfaces_animationValues() 52 expected = BackTransformation(translateX = -maxX, translateY = -maxY, scale = minScale), in sysUi_floatingSystemSurfaces_animationValues() 57 expected = BackTransformation(translateX = 0f, translateY = -maxY, scale = 1f), in sysUi_floatingSystemSurfaces_animationValues() 62 expected = BackTransformation(translateX = 0f, translateY = maxY, scale = 1f), in sysUi_floatingSystemSurfaces_animationValues() 75 expected = in sysUi_bottomsheet_animationValues() 86 expected = in sysUi_bottomsheet_animationValues() 97 expected = in sysUi_bottomsheet_animationValues() 108 expected = in sysUi_bottomsheet_animationValues() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/connectivity/ |
D | CallbackHandlerTest.java | 95 WifiIndicators expected = indicatorArg.getValue(); in testSignalCallback_setWifiIndicators() local 97 assertEquals(enabled, expected.enabled); in testSignalCallback_setWifiIndicators() 98 assertEquals(status, expected.statusIcon); in testSignalCallback_setWifiIndicators() 99 assertEquals(qs, expected.qsIcon); in testSignalCallback_setWifiIndicators() 100 assertEquals(in, expected.activityIn); in testSignalCallback_setWifiIndicators() 101 assertEquals(out, expected.activityOut); in testSignalCallback_setWifiIndicators() 102 assertEquals(description, expected.description); in testSignalCallback_setWifiIndicators() 103 assertTrue(expected.isTransient); in testSignalCallback_setWifiIndicators() 104 assertEquals(secondaryLabel, expected.statusLabel); in testSignalCallback_setWifiIndicators() 130 MobileDataIndicators expected = indicatorArg.getValue(); in testSignalCallback_setMobileDataIndicators() local [all …]
|
/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/ |
D | ValidateNotificationPeopleTest.java | 82 String[] expected = { "foobar" }; in testSingleString() local 84 bundle.putString(Notification.EXTRA_PEOPLE_LIST, expected[0]); in testSingleString() 86 assertStringArrayEquals("string should be in result[0]", expected, result); in testSingleString() 91 String[] expected = { "foobar" }; in testSingleCharArray() local 93 bundle.putCharArray(Notification.EXTRA_PEOPLE_LIST, expected[0].toCharArray()); in testSingleCharArray() 95 assertStringArrayEquals("char[] should be in result[0]", expected, result); in testSingleCharArray() 100 String[] expected = { "foobar" }; in testSingleCharSequence() local 102 bundle.putCharSequence(Notification.EXTRA_PEOPLE_LIST, new SpannableString(expected[0])); in testSingleCharSequence() 104 assertStringArrayEquals("charSequence should be in result[0]", expected, result); in testSingleCharSequence() 110 String[] expected = { "foobar" }; in testStringArraySingle() local [all …]
|
D | GlobalSortKeyComparatorTest.java | 71 final List<NotificationRecord> expected = new ArrayList<>(); in testComparator() local 72 expected.add(left); in testComparator() 73 expected.add(right); in testComparator() 74 expected.add(last); in testComparator() 77 actual.addAll(expected); in testComparator() 82 assertEquals(expected, actual); in testComparator() 102 final List<NotificationRecord> expected = new ArrayList<>(); in testNoCrash_leftNull() local 103 expected.add(right); in testNoCrash_leftNull() 104 expected.add(left); in testNoCrash_leftNull() 107 actual.addAll(expected); in testNoCrash_leftNull() [all …]
|
D | ArchiveTest.java | 92 List<String> expected = new ArrayList<>(); in testRecordAndRead() local 96 expected.add(sbn.getKey()); in testRecordAndRead() 101 assertThat(actual).hasSize(expected.size()); in testRecordAndRead() 103 assertThat(expected).contains(sbn.getKey()); in testRecordAndRead() 125 List<String> expected = new ArrayList<>(); in testRecordAndRead_overLimit() local 130 expected.add(sbn.getKey()); in testRecordAndRead_overLimit() 136 assertThat(actual).hasSize(expected.size()); in testRecordAndRead_overLimit() 138 assertThat(expected).contains(sbn.getKey()); in testRecordAndRead_overLimit() 145 List<String> expected = new ArrayList<>(); in testDoesNotRecordIfHistoryDisabled() local 151 expected.add(sbn.getKey()); in testDoesNotRecordIfHistoryDisabled() [all …]
|
/frameworks/base/tools/aapt2/cmd/ |
D | Dump_test.cpp | 55 std::string expected; in TEST_F() local 58 ::android::base::ReadFileToString(expected_path, &expected); in TEST_F() 59 ASSERT_EQ(output, expected); in TEST_F() 70 std::string expected; in TEST_F() local 74 ::android::base::ReadFileToString(expected_path, &expected); in TEST_F() 75 ASSERT_EQ(output, expected); in TEST_F() 86 std::string expected; in TEST_F() local 90 ::android::base::ReadFileToString(expected_path, &expected); in TEST_F() 91 ASSERT_EQ(output, expected); in TEST_F() 103 std::string expected; in TEST_F() local [all …]
|
/frameworks/opt/setupwizard/library/test/instrumentation/src/com/android/setupwizardlib/test/ |
D | GlifPatternDrawableTest.java | 88 Matrix expected = new Matrix(canvas.getMatrix()); in testScaleToCanvasSquare() local 96 expected.postScale(0.5f, 0.5f); in testScaleToCanvasSquare() 98 assertEquals("Matrices should match", expected, canvas.getMatrix()); in testScaleToCanvasSquare() 104 final Matrix expected = new Matrix(canvas.getMatrix()); in testScaleToCanvasTall() local 112 expected.postScale(1f, 1f); in testScaleToCanvasTall() 113 expected.postTranslate(-99.718f, 0f); in testScaleToCanvasTall() 115 assertEquals("Matrices should match", expected, canvas.getMatrix()); in testScaleToCanvasTall() 121 final Matrix expected = new Matrix(canvas.getMatrix()); in testScaleToCanvasWide() local 129 expected.postScale(1f, 1f); in testScaleToCanvasWide() 130 expected.postTranslate(0f, -87.552f); in testScaleToCanvasWide() [all …]
|
/frameworks/base/core/tests/coretests/src/android/text/ |
D | StaticLayoutDirectionsTest.java | 84 private static Directions[] expected = { field in StaticLayoutDirectionsTest 127 checkDirections(b.build(), i, b.text, expected, f); in testDirections() local 145 Directions expected = dirs(0, LVL1_1, 1, LVL2_1, 2, 3 | (1 << Layout.RUN_LEVEL_SHIFT)); in testTrailingWhitespace() local 146 expectDirections("split line", expected, result); in testTrailingWhitespace() 160 int[] expected = { 0, 1, 4, 3, 2, 5 }; in testNextToRightOf() local 163 for (int i = 1; i < expected.length; ++i) { in testNextToRightOf() 165 if (t != expected[i]) { in testNextToRightOf() 167 expected[i] + " got: " + t); in testNextToRightOf() 177 int[] expected = { 0, 1, 4, 3, 2, 5 }; in testNextToLeftOf() local 180 for (int i = expected.length - 1; --i >= 0;) { in testNextToLeftOf() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/util/kotlin/ |
D | PackageManagerExtComponentEnabledTest.kt | 58 .isEqualTo(testCase.expected) in testComponentActuallyEnabled() 64 val expected: Boolean, constant in com.android.systemui.util.kotlin.PackageManagerExtComponentEnabledTest.TestCase 70 "EXPECTED = $expected" in toString() 94 expected = true, 99 expected = false, 104 expected = false, 110 expected = false, 115 expected = true, 124 expected = true, 129 expected = false, [all …]
|
/frameworks/base/core/tests/utiltests/src/com/android/internal/util/ |
D | QuickSelectTest.java | 113 private void test(List<Integer> input, int k, Integer expected) throws Exception { in test() argument 114 test(input, 0, input == null ? 0 : input.size(), k, expected); in test() 117 private void test(List<Integer> input, int start, int length, int k, Integer expected) in test() argument 121 assertEquals(expected, result); in test() 123 if (expected != null) { in test() 129 private void test(int[] input, int k, Integer expected) throws Exception { in test() argument 130 test(input, 0, input == null ? 0 : input.length, k, expected); in test() 133 private void test(int[] input, int start, int length, int k, Integer expected) in test() argument 137 assertEquals((int) expected, result); in test() 139 if (expected != null) { in test() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/wifi/ui/viewmodel/ |
D | WifiViewModelIconParameterizedTest.kt | 143 when (testCase.expected) { in <lambda>() 150 assertThat(actualIconVisible.icon.res).isEqualTo(testCase.expected.iconResource) in <lambda>() 152 testCase.expected.contentDescription.invoke(context) in <lambda>() 186 val expected: Expected? in <lambda>() constant in com.android.systemui.statusbar.pipeline.wifi.ui.viewmodel.WifiViewModelIconParameterizedTest.TestCase 195 "EXPECTED($expected)" in <lambda>() 209 expected = null, in <lambda>() 214 expected = null, in <lambda>() 219 expected = null, in <lambda>() 224 expected = null, in <lambda>() 232 expected = null, in <lambda>() [all …]
|