Home
last modified time | relevance | path

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

12345678910>>...24

/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/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/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/base/services/tests/uiservicestests/src/com/android/server/notification/
DValidateNotificationPeopleTest.java50 String[] expected = { "foobar" }; in testSingleString() local
52 bundle.putString(Notification.EXTRA_PEOPLE_LIST, expected[0]); in testSingleString()
54 assertStringArrayEquals("string should be in result[0]", expected, result); in testSingleString()
59 String[] expected = { "foobar" }; in testSingleCharArray() local
61 bundle.putCharArray(Notification.EXTRA_PEOPLE_LIST, expected[0].toCharArray()); in testSingleCharArray()
63 assertStringArrayEquals("char[] should be in result[0]", expected, result); in testSingleCharArray()
68 String[] expected = { "foobar" }; in testSingleCharSequence() local
70 bundle.putCharSequence(Notification.EXTRA_PEOPLE_LIST, new SpannableString(expected[0])); in testSingleCharSequence()
72 assertStringArrayEquals("charSequence should be in result[0]", expected, result); in testSingleCharSequence()
78 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/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/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/
DWifiConfigurationTestUtil.java546 WifiConfiguration expected, WifiConfiguration actual) { in assertCommonConfigurationElementsEqual() argument
547 assertNotNull(expected); in assertCommonConfigurationElementsEqual()
549 assertEquals(expected.SSID, actual.SSID); in assertCommonConfigurationElementsEqual()
550 assertEquals(expected.BSSID, actual.BSSID); in assertCommonConfigurationElementsEqual()
551 assertEquals(expected.preSharedKey, actual.preSharedKey); in assertCommonConfigurationElementsEqual()
552 assertEquals(expected.wepKeys, actual.wepKeys); in assertCommonConfigurationElementsEqual()
553 assertEquals(expected.wepTxKeyIndex, actual.wepTxKeyIndex); in assertCommonConfigurationElementsEqual()
554 assertEquals(expected.hiddenSSID, actual.hiddenSSID); in assertCommonConfigurationElementsEqual()
555 assertEquals(expected.requirePMF, actual.requirePMF); in assertCommonConfigurationElementsEqual()
556 assertEquals(expected.allowedKeyManagement, actual.allowedKeyManagement); in assertCommonConfigurationElementsEqual()
[all …]
DScanTestUtil.java295 String prefix, ScanResult expected, ScanResult actual) { in assertScanResultEquals() argument
296 assertEquals(prefix + "SSID", expected.SSID, actual.SSID); in assertScanResultEquals()
297 assertEquals(prefix + "wifiSsid", expected.wifiSsid.toString(), actual.wifiSsid.toString()); in assertScanResultEquals()
298 assertEquals(prefix + "BSSID", expected.BSSID, actual.BSSID); in assertScanResultEquals()
299 assertEquals(prefix + "capabilities", expected.capabilities, actual.capabilities); in assertScanResultEquals()
300 assertEquals(prefix + "level", expected.level, actual.level); in assertScanResultEquals()
301 assertEquals(prefix + "frequency", expected.frequency, actual.frequency); in assertScanResultEquals()
302 assertEquals(prefix + "timestamp", expected.timestamp, actual.timestamp); in assertScanResultEquals()
303 assertEquals(prefix + "seen", expected.seen, actual.seen); in assertScanResultEquals()
306 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/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/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.java55 Set<Integer> expected = new HashSet<Integer>(); in testBasicSlotUse() local
56 expected.add(0); in testBasicSlotUse()
57 expected.add(1); in testBasicSlotUse()
58 assertEquals(expected, mManager.getUsedSlots()); in testBasicSlotUse()
62 expected = new HashSet<Integer>(); in testBasicSlotUse()
63 expected.add(0); in testBasicSlotUse()
64 assertEquals(expected, mManager.getUsedSlots()); in testBasicSlotUse()
85 Set<Integer> expected = new HashSet<Integer>(); in testMergeSlots() local
86 expected.add(1); in testMergeSlots()
87 expected.add(3); in testMergeSlots()
[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/rs/rsov/tests/RSoVTest/src/com/android/rs/rsov/test/
DUT_global.java44 int expected = 65536; in testIntTypes() local
46 s.set_g_int(expected); in testIntTypes()
47 s.invoke_int_test(A, expected); in testIntTypes()
51 Int2 expected = new Int2(65536, 65537);; in testIntTypes() local
53 s.set_g_int2(expected); in testIntTypes()
54 s.invoke_int2_test(A, expected); in testIntTypes()
58 Int4 expected = new Int4(65536, 65537, 65538, 65539); in testIntTypes() local
60 s.set_g_int4(expected); in testIntTypes()
61 s.invoke_int4_test(A, expected); in testIntTypes()
71 float expected = 3.141593f; in testFloatTypes() local
[all …]
Dutils.rsh9 checkEq(T expected, T actual) { \
10 return (expected == actual); \
15 checkEq(T##2 expected, T##2 actual) { \
16 return (expected.x == actual.x && expected.y == actual.y); \
21 checkEq(T##4 expected, T##4 actual) { \
22 return (expected.x == actual.x && \
23 expected.y == actual.y && \
24 expected.z == actual.z && \
25 expected.w == actual.w); \
/frameworks/opt/gamesdk/third_party/protobuf-3.0.0/src/google/protobuf/compiler/objectivec/
Dobjectivec_helpers_unittest.cc44 string expected; in TEST() local
50 expected = string("\0zbcdefghIJ\0", 12); in TEST()
53 EXPECT_EQ(expected, result); in TEST()
56 expected = string("\0abcdezghIJ\0", 12); in TEST()
59 EXPECT_EQ(expected, result); in TEST()
64 expected = string("\0abcdefghI\0", 11); in TEST()
67 EXPECT_EQ(expected, result); in TEST()
72 expected = string("\0abcdefghIJz\0", 13); in TEST()
75 EXPECT_EQ(expected, result); in TEST()
81 string expected; in TEST() local
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/
DPackageInstallerSessionTest.java250 private void assertSessionParamsEquivalent(PackageInstaller.SessionParams expected, in assertSessionParamsEquivalent() argument
252 assertEquals(expected.mode, actual.mode); in assertSessionParamsEquivalent()
253 assertEquals(expected.installFlags, actual.installFlags); in assertSessionParamsEquivalent()
254 assertEquals(expected.installLocation, actual.installLocation); in assertSessionParamsEquivalent()
255 assertEquals(expected.installReason, actual.installReason); in assertSessionParamsEquivalent()
256 assertEquals(expected.sizeBytes, actual.sizeBytes); in assertSessionParamsEquivalent()
257 assertEquals(expected.appPackageName, actual.appPackageName); in assertSessionParamsEquivalent()
258 assertEquals(expected.appIcon, actual.appIcon); in assertSessionParamsEquivalent()
259 assertEquals(expected.originatingUri, actual.originatingUri); in assertSessionParamsEquivalent()
260 assertEquals(expected.originatingUid, actual.originatingUid); in assertSessionParamsEquivalent()
[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/opt/gamesdk/third_party/protobuf-3.0.0/java/util/src/test/java/com/google/protobuf/util/
DFieldMaskTreeTest.java124 NestedTestAllTypes.Builder expected = NestedTestAllTypes.newBuilder(); in testMerge() local
125 expected.getPayloadBuilder().setOptionalInt32(1234); in testMerge()
126 assertEquals(expected.build(), builder.build()); in testMerge()
132 expected = NestedTestAllTypes.newBuilder(); in testMerge()
133 expected.getPayloadBuilder().setOptionalNestedMessage(NestedMessage.newBuilder().setBb(5678)); in testMerge()
134 assertEquals(expected.build(), builder.build()); in testMerge()
138 expected = NestedTestAllTypes.newBuilder(); in testMerge()
139 expected.getPayloadBuilder().addRepeatedInt32(4321); in testMerge()
140 assertEquals(expected.build(), builder.build()); in testMerge()
146 expected = NestedTestAllTypes.newBuilder(); in testMerge()
[all …]
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/hotspot2/
DUtilsTest.java34 String expected = "000001, 000002, 0000800000"; in testRoamingConsortiumsToStringLong() local
36 assertEquals(expected, result); in testRoamingConsortiumsToStringLong()
47 String expected = "000001, 000002, 0000800000"; in testRoamingConsortiumsToStringCollection() local
49 assertEquals(expected, result); in testRoamingConsortiumsToStringCollection()
75 String expected = "ab cd ef"; in testToHexString() local
77 assertEquals(expected, result.toLowerCase()); in testToHexString()
85 String expected = "abcdef"; in testToHex() local
87 assertEquals(expected, result.toLowerCase()); in testToHex()
96 byte[] expected = {(byte) 0xab, (byte) 0xcd}; in testHexToBytes()
98 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 …]

12345678910>>...24