Home
last modified time | relevance | path

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

12345678910>>...25

/frameworks/base/test-base/src/junit/framework/
DAssert.java62 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/
DTextClassifierEventTest.java49 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/base/services/tests/servicestests/src/com/android/server/power/batterysaver/
DCpuFrequenciesTest.java34 private void check(ArrayMap<String, String> expected, String config) { in check() argument
35 assertEquals(expected, (new CpuFrequencies().parseString(config)) in check()
43 final ArrayMap<String, String> expected = new ArrayMap<>(); in test() local
45 expected.clear(); in test()
46 expected.put("/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq", "0"); in test()
47 check(expected, "0:0"); in test()
49 expected.clear(); in test()
50 expected.put("/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq", "0"); in test()
51 expected.put("/sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq", "1"); in test()
52 check(expected, "0:0/1:1"); in test()
[all …]
/frameworks/native/libs/vr/libpdx/
Dserialization_tests.cpp117 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/wifi/tests/src/android/net/wifi/
DWifiUsabilityStatsEntryTest.java83 WifiUsabilityStatsEntry expected, in assertWifiUsabilityStatsEntryEquals() argument
85 assertEquals(expected.getTimeStampMillis(), actual.getTimeStampMillis()); in assertWifiUsabilityStatsEntryEquals()
86 assertEquals(expected.getRssi(), actual.getRssi()); in assertWifiUsabilityStatsEntryEquals()
87 assertEquals(expected.getLinkSpeedMbps(), actual.getLinkSpeedMbps()); in assertWifiUsabilityStatsEntryEquals()
88 assertEquals(expected.getTotalTxSuccess(), actual.getTotalTxSuccess()); in assertWifiUsabilityStatsEntryEquals()
89 assertEquals(expected.getTotalTxRetries(), actual.getTotalTxRetries()); in assertWifiUsabilityStatsEntryEquals()
90 assertEquals(expected.getTotalTxBad(), actual.getTotalTxBad()); in assertWifiUsabilityStatsEntryEquals()
91 assertEquals(expected.getTotalRxSuccess(), actual.getTotalRxSuccess()); in assertWifiUsabilityStatsEntryEquals()
92 assertEquals(expected.getTotalRadioOnTimeMillis(), actual.getTotalRadioOnTimeMillis()); in assertWifiUsabilityStatsEntryEquals()
93 assertEquals(expected.getTotalRadioTxTimeMillis(), actual.getTotalRadioTxTimeMillis()); in assertWifiUsabilityStatsEntryEquals()
[all …]
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/helpers/
DCameraErrorCollector.java147 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/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/
DWifiConfigurationTestUtil.java601 WifiConfiguration expected, WifiConfiguration actual) { in assertCommonConfigurationElementsEqual() argument
602 assertNotNull(expected); in assertCommonConfigurationElementsEqual()
604 assertEquals(expected.SSID, actual.SSID); in assertCommonConfigurationElementsEqual()
605 assertEquals(expected.BSSID, actual.BSSID); in assertCommonConfigurationElementsEqual()
606 assertEquals(expected.preSharedKey, actual.preSharedKey); in assertCommonConfigurationElementsEqual()
607 assertEquals(expected.wepKeys, actual.wepKeys); in assertCommonConfigurationElementsEqual()
608 assertEquals(expected.wepTxKeyIndex, actual.wepTxKeyIndex); in assertCommonConfigurationElementsEqual()
609 assertEquals(expected.hiddenSSID, actual.hiddenSSID); in assertCommonConfigurationElementsEqual()
610 assertEquals(expected.requirePmf, actual.requirePmf); in assertCommonConfigurationElementsEqual()
611 assertEquals(expected.allowedKeyManagement, actual.allowedKeyManagement); in assertCommonConfigurationElementsEqual()
[all …]
DScanTestUtil.java283 String prefix, ScanResult expected, ScanResult actual) { in assertScanResultEquals() argument
284 assertEquals(prefix + "SSID", expected.SSID, actual.SSID); in assertScanResultEquals()
285 assertEquals(prefix + "wifiSsid", expected.wifiSsid.toString(), actual.wifiSsid.toString()); in assertScanResultEquals()
286 assertEquals(prefix + "BSSID", expected.BSSID, actual.BSSID); in assertScanResultEquals()
287 assertEquals(prefix + "capabilities", expected.capabilities, actual.capabilities); in assertScanResultEquals()
288 assertEquals(prefix + "level", expected.level, actual.level); in assertScanResultEquals()
289 assertEquals(prefix + "frequency", expected.frequency, actual.frequency); in assertScanResultEquals()
290 assertEquals(prefix + "timestamp", expected.timestamp, actual.timestamp); in assertScanResultEquals()
291 assertEquals(prefix + "seen", expected.seen, actual.seen); in assertScanResultEquals()
294 private static void assertScanResultsEquals(String prefix, ScanResult[] expected, in assertScanResultsEquals() argument
[all …]
DWifiMetricsTestUtil.java42 public static void assertHistogramBucketsEqual(HistogramBucketInt32[] expected, in assertHistogramBucketsEqual() argument
44 assertEquals("Number of buckets do not match!", expected.length, actual.length); in assertHistogramBucketsEqual()
46 for (int i = 0; i < expected.length; i++) { in assertHistogramBucketsEqual()
47 HistogramBucketInt32 expectedBucket = expected[i]; in assertHistogramBucketsEqual()
74 public static void assertKeyCountsEqual(Int32Count[] expected, Int32Count[] actual) { in assertKeyCountsEqual() argument
75 assertEquals("Number of key counts do not match!", expected.length, actual.length); in assertKeyCountsEqual()
77 for (int i = 0; i < expected.length; i++) { in assertKeyCountsEqual()
78 Int32Count expectedKeyCount = expected[i]; in assertKeyCountsEqual()
103 LinkProbeFailureReasonCount[] expected, LinkProbeFailureReasonCount[] actual) { in assertLinkProbeFailureReasonCountsEqual() argument
105 expected.length, actual.length); in assertLinkProbeFailureReasonCountsEqual()
[all …]
/frameworks/base/test-runner/src/android/test/
DMoreAsserts.java46 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/
DPasswordSlotManagerTests.java59 Set<Integer> expected = new HashSet<Integer>(); in testBasicSlotUse() local
60 expected.add(0); in testBasicSlotUse()
61 expected.add(1); in testBasicSlotUse()
62 assertEquals(expected, mManager.getUsedSlots()); in testBasicSlotUse()
66 expected = new HashSet<Integer>(); in testBasicSlotUse()
67 expected.add(0); in testBasicSlotUse()
68 assertEquals(expected, mManager.getUsedSlots()); in testBasicSlotUse()
90 Set<Integer> expected = new HashSet<Integer>(); in testMergeSlots() local
91 expected.add(1); in testMergeSlots()
92 expected.add(3); in testMergeSlots()
[all …]
DRebootEscrowDataTest.java48 @Test(expected = NullPointerException.class)
53 @Test(expected = NullPointerException.class)
56 RebootEscrowData expected = RebootEscrowData.fromSyntheticPassword(mKey, (byte) 2, testSp); in fromEncryptedData_failsOnNullData() local
57 RebootEscrowKey key = RebootEscrowKey.fromKeyBytes(expected.getKey().getKeyBytes()); in fromEncryptedData_failsOnNullData()
61 @Test(expected = NullPointerException.class)
64 RebootEscrowData expected = RebootEscrowData.fromSyntheticPassword(mKey, (byte) 2, testSp); in fromEncryptedData_failsOnNullKey() local
65 RebootEscrowData.fromEncryptedData(null, expected.getBlob()); in fromEncryptedData_failsOnNullKey()
71 RebootEscrowData expected = RebootEscrowData.fromSyntheticPassword(mKey, (byte) 2, testSp); in fromEntries_loopback_success() local
73 RebootEscrowKey key = RebootEscrowKey.fromKeyBytes(expected.getKey().getKeyBytes()); in fromEntries_loopback_success()
74 RebootEscrowData actual = RebootEscrowData.fromEncryptedData(key, expected.getBlob()); in fromEntries_loopback_success()
[all …]
/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/
DValidateNotificationPeopleTest.java63 String[] expected = { "foobar" }; in testSingleString() local
65 bundle.putString(Notification.EXTRA_PEOPLE_LIST, expected[0]); in testSingleString()
67 assertStringArrayEquals("string should be in result[0]", expected, result); in testSingleString()
72 String[] expected = { "foobar" }; in testSingleCharArray() local
74 bundle.putCharArray(Notification.EXTRA_PEOPLE_LIST, expected[0].toCharArray()); in testSingleCharArray()
76 assertStringArrayEquals("char[] should be in result[0]", expected, result); in testSingleCharArray()
81 String[] expected = { "foobar" }; in testSingleCharSequence() local
83 bundle.putCharSequence(Notification.EXTRA_PEOPLE_LIST, new SpannableString(expected[0])); in testSingleCharSequence()
85 assertStringArrayEquals("charSequence should be in result[0]", expected, result); in testSingleCharSequence()
91 String[] expected = { "foobar" }; in testStringArraySingle() local
[all …]
DGlobalSortKeyComparatorTest.java71 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 …]
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/
DPackageInstallerSessionTest.java261 private void assertSessionParamsEquivalent(PackageInstaller.SessionParams expected, in assertSessionParamsEquivalent() argument
263 assertEquals(expected.mode, actual.mode); in assertSessionParamsEquivalent()
264 assertEquals(expected.installFlags, actual.installFlags); in assertSessionParamsEquivalent()
265 assertEquals(expected.installLocation, actual.installLocation); in assertSessionParamsEquivalent()
266 assertEquals(expected.installReason, actual.installReason); in assertSessionParamsEquivalent()
267 assertEquals(expected.sizeBytes, actual.sizeBytes); in assertSessionParamsEquivalent()
268 assertEquals(expected.appPackageName, actual.appPackageName); in assertSessionParamsEquivalent()
269 assertEquals(expected.appIcon, actual.appIcon); in assertSessionParamsEquivalent()
270 assertEquals(expected.originatingUri, actual.originatingUri); in assertSessionParamsEquivalent()
271 assertEquals(expected.originatingUid, actual.originatingUid); in assertSessionParamsEquivalent()
[all …]
/frameworks/native/libs/vr/libdvrcommon/include/private/dvr/test/
Dtest_macros.h16 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/cmds/incident_helper/tests/
Dih_util_test.cpp29 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 …]
DSystemPropertiesParser_test.cpp55 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 …]
/frameworks/native/services/surfaceflinger/tests/
DLayerCallback_test.cpp101 ExpectedResult expected; in TEST_F() local
102 expected.addSurface(ExpectedResult::Transaction::PRESENTED, layer); in TEST_F()
103 EXPECT_NO_FATAL_FAILURE(waitForCallback(callback, expected, true)); in TEST_F()
120 ExpectedResult expected; in TEST_F() local
121 expected.addSurface(ExpectedResult::Transaction::NOT_PRESENTED, layer, in TEST_F()
123 EXPECT_NO_FATAL_FAILURE(waitForCallback(callback, expected, true)); in TEST_F()
140 ExpectedResult expected; in TEST_F() local
141 expected.addSurface(ExpectedResult::Transaction::PRESENTED, layer); in TEST_F()
142 EXPECT_NO_FATAL_FAILURE(waitForCallback(callback, expected, true)); in TEST_F()
159 ExpectedResult expected; in TEST_F() local
[all …]
/frameworks/base/tools/split-select/
DGrouper_test.cpp104 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/tools/protologtool/tests/com/android/protolog/tool/
DCommandOptionsTest.kt45 @Test(expected = InvalidCommandException::class)
50 @Test(expected = InvalidCommandException::class)
74 @Test(expected = InvalidCommandException::class)
85 @Test(expected = InvalidCommandException::class)
95 @Test(expected = InvalidCommandException::class)
105 @Test(expected = InvalidCommandException::class)
115 @Test(expected = InvalidCommandException::class)
125 @Test(expected = InvalidCommandException::class)
136 @Test(expected = InvalidCommandException::class)
147 @Test(expected = InvalidCommandException::class)
[all …]
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/hotspot2/
DUtilsTest.java36 String expected = "000001, 000002, 0000800000"; in testRoamingConsortiumsToStringLong() local
38 assertEquals(expected, result); in testRoamingConsortiumsToStringLong()
49 String expected = "000001, 000002, 0000800000"; in testRoamingConsortiumsToStringCollection() local
51 assertEquals(expected, result); in testRoamingConsortiumsToStringCollection()
77 String expected = "ab cd ef"; in testToHexString() local
79 assertEquals(expected, result.toLowerCase()); in testToHexString()
87 String expected = "abcdef"; in testToHex() local
89 assertEquals(expected, result.toLowerCase()); in testToHex()
98 byte[] expected = {(byte) 0xab, (byte) 0xcd}; in testHexToBytes()
100 assertArrayEquals(expected, result); in testHexToBytes()
[all …]
/frameworks/opt/setupwizard/library/test/instrumentation/src/com/android/setupwizardlib/test/
DGlifPatternDrawableTest.java88 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/
DStaticLayoutDirectionsTest.java84 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/startop/scripts/iorap/
Dcompiler_test.py42 def assert_compile_result(output, expected, *extra_argv): argument
47 with open(output, 'rb') as f1, open(expected, 'rb') as f2:
52 expected = os.path.join(DIR,
58 with open(output, 'rb') as f1, open(expected, 'rb') as f2:
66 expected = os.path.join(DIR,
68 assert_compile_result(output, expected)
71 expected = os.path.join(DIR,
73 assert_compile_result(output, expected, '--duration', '10000')
76 expected = os.path.join(DIR,
78 assert_compile_result(output, expected, '--duration', '30000')

12345678910>>...25