Home
last modified time | relevance | path

Searched refs:actual (Results 1 – 25 of 243) sorted by relevance

12345678910

/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/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
58 " to be assignable from actual class " + actual.getCanonicalName(), in assertAssignableFrom()
59 expected.isAssignableFrom(actual)); in assertAssignableFrom()
67 String message, Object unexpected, Object actual) { in assertNotEqual() argument
68 if (equal(unexpected, actual)) { in assertNotEqual()
77 public static void assertNotEqual(Object unexpected, Object actual) { in assertNotEqual() argument
78 assertNotEqual(null, unexpected, actual); in assertNotEqual()
87 String message, byte[] expected, byte[] actual) { in assertEquals() argument
[all …]
/frameworks/minikin/tests/unittest/
DOptimalLineBreakerTest.cpp119 auto actual = doLineBreak(textBuf, HIGH_QUALITY, NO_HYPHENATION, LINE_WIDTH); in TEST_F() local
120 EXPECT_TRUE(sameLineBreak(expect, actual)) << toString(expect) << std::endl in TEST_F()
122 << toString(textBuf, actual); in TEST_F()
123 actual = doLineBreak(textBuf, HIGH_QUALITY, NORMAL_HYPHENATION, LINE_WIDTH); in TEST_F()
124 EXPECT_TRUE(sameLineBreak(expect, actual)) << toString(expect) << std::endl in TEST_F()
126 << toString(textBuf, actual); in TEST_F()
127 actual = doLineBreak(textBuf, BALANCED, NO_HYPHENATION, LINE_WIDTH); in TEST_F()
128 EXPECT_TRUE(sameLineBreak(expect, actual)) << toString(expect) << std::endl in TEST_F()
130 << toString(textBuf, actual); in TEST_F()
131 actual = doLineBreak(textBuf, BALANCED, NORMAL_HYPHENATION, LINE_WIDTH); in TEST_F()
[all …]
DGreedyLineBreakerTest.cpp109 const auto actual = doLineBreak(textBuf, NO_HYPHEN, LINE_WIDTH); in TEST_F() local
110 EXPECT_TRUE(sameLineBreak(expect, actual)) << toString(expect) << std::endl in TEST_F()
112 << toString(textBuf, actual); in TEST_F()
120 const auto actual = doLineBreak(textBuf, NO_HYPHEN, LINE_WIDTH); in TEST_F() local
121 EXPECT_TRUE(sameLineBreak(expect, actual)) << toString(expect) << std::endl in TEST_F()
123 << toString(textBuf, actual); in TEST_F()
134 const auto actual = doLineBreak(textBuf, NO_HYPHEN, LINE_WIDTH); in TEST_F() local
135 EXPECT_TRUE(sameLineBreak(expect, actual)) << toString(expect) << std::endl in TEST_F()
137 << toString(textBuf, actual); in TEST_F()
150 const auto actual = doLineBreak(textBuf, NO_HYPHEN, LINE_WIDTH); in TEST_F() local
[all …]
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/
DWifiConfigurationTestUtil.java547 WifiConfiguration expected, WifiConfiguration actual) { in assertCommonConfigurationElementsEqual() argument
549 assertNotNull(actual); in assertCommonConfigurationElementsEqual()
550 assertEquals(expected.SSID, actual.SSID); in assertCommonConfigurationElementsEqual()
551 assertEquals(expected.BSSID, actual.BSSID); in assertCommonConfigurationElementsEqual()
552 assertEquals(expected.preSharedKey, actual.preSharedKey); in assertCommonConfigurationElementsEqual()
553 assertEquals(expected.wepKeys, actual.wepKeys); in assertCommonConfigurationElementsEqual()
554 assertEquals(expected.wepTxKeyIndex, actual.wepTxKeyIndex); in assertCommonConfigurationElementsEqual()
555 assertEquals(expected.hiddenSSID, actual.hiddenSSID); in assertCommonConfigurationElementsEqual()
556 assertEquals(expected.requirePMF, actual.requirePMF); in assertCommonConfigurationElementsEqual()
557 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()
307 ScanResult[] actual) { in assertScanResultsEquals() argument
[all …]
DWifiMetricsTestUtil.java43 HistogramBucketInt32[] actual) { in assertHistogramBucketsEqual() argument
44 assertEquals("Number of buckets do not match!", expected.length, actual.length); in assertHistogramBucketsEqual()
48 HistogramBucketInt32 actualBucket = actual[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()
79 Int32Count actualKeyCount = actual[i]; in assertKeyCountsEqual()
103 LinkProbeFailureReasonCount[] expected, LinkProbeFailureReasonCount[] actual) { in assertLinkProbeFailureReasonCountsEqual() argument
105 expected.length, actual.length); in assertLinkProbeFailureReasonCountsEqual()
108 Arrays.sort(actual, Comparator.comparingInt(x -> x.failureReason)); in assertLinkProbeFailureReasonCountsEqual()
112 LinkProbeFailureReasonCount actualFailureReasonCount = actual[i]; in assertLinkProbeFailureReasonCountsEqual()
[all …]
/frameworks/base/wifi/tests/src/android/net/wifi/
DWifiUsabilityStatsEntryTest.java84 WifiUsabilityStatsEntry actual) { 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/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()
43 << actual(r, c) << "\"."; 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/servicestests/src/com/android/server/pm/
DPackageInstallerSessionTest.java256 PackageInstaller.SessionParams actual) { in assertSessionParamsEquivalent() argument
257 assertEquals(expected.mode, actual.mode); in assertSessionParamsEquivalent()
258 assertEquals(expected.installFlags, actual.installFlags); in assertSessionParamsEquivalent()
259 assertEquals(expected.installLocation, actual.installLocation); in assertSessionParamsEquivalent()
260 assertEquals(expected.installReason, actual.installReason); in assertSessionParamsEquivalent()
261 assertEquals(expected.sizeBytes, actual.sizeBytes); in assertSessionParamsEquivalent()
262 assertEquals(expected.appPackageName, actual.appPackageName); in assertSessionParamsEquivalent()
263 assertEquals(expected.appIcon, actual.appIcon); in assertSessionParamsEquivalent()
264 assertEquals(expected.originatingUri, actual.originatingUri); in assertSessionParamsEquivalent()
265 assertEquals(expected.originatingUid, actual.originatingUid); in assertSessionParamsEquivalent()
[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
152 if (!Objects.equals(expected, actual)) { in expectEquals()
154 actual)); in expectEquals()
169 public <T> boolean expectNotEquals(String msg, T expected, T actual) { in expectNotEquals() argument
170 if (Objects.equals(expected, actual)) { in expectNotEquals()
172 actual)); in expectNotEquals()
189 public <T> boolean expectEquals(String msg, T[] expected, T[] actual) { in expectEquals() argument
194 if (!Arrays.deepEquals(expected, actual)) { in expectEquals()
196 Arrays.deepToString(expected), Arrays.deepToString(actual))); in expectEquals()
214 public <T> boolean expectNotEquals(String msg, T[] expected, T[] actual) { in expectNotEquals() argument
[all …]
DAssertHelpers.java137 public static <T> void assertArrayContains(String message, T[] actual, T checkVals) { in assertArrayContains() argument
138 assertCollectionContainsAnyOf(message, buildList(actual), Arrays.asList(checkVals)); in assertArrayContains()
149 public static void assertArrayContains(String message, int[] actual, int checkVals) { in assertArrayContains() argument
150 assertCollectionContainsAnyOf(message, buildList(actual), Arrays.asList(checkVals)); in assertArrayContains()
161 public static <T> T assertArrayContainsAnyOf(String message, T[] actual, T[] checkVals) { in assertArrayContainsAnyOf() argument
162 return assertCollectionContainsAnyOf(message, buildList(actual), buildList(checkVals)); in assertArrayContainsAnyOf()
173 public static int assertArrayContainsAnyOf(String message, int[] actual, int[] checkVals) { in assertArrayContainsAnyOf() argument
174 return assertCollectionContainsAnyOf(message, buildList(actual), buildList(checkVals)); in assertArrayContainsAnyOf()
185 public static <T> T assertCollectionContainsAnyOf(String message, Collection<T> actual, in assertCollectionContainsAnyOf() argument
190 contains = actual.contains(check); in assertCollectionContainsAnyOf()
[all …]
/frameworks/ml/nn/runtime/test/
DTestTrivialModel.cpp94 int CompareMatrices(const Matrix3x4& expected, const Matrix3x4& actual) { in CompareMatrices() argument
98 if (expected[i][j] != actual[i][j]) { in CompareMatrices()
100 static_cast<double>(expected[i][j]), static_cast<double>(actual[i][j])); in CompareMatrices()
113 Matrix3x4 actual; in TEST_F() local
114 memset(&actual, 0, sizeof(actual)); in TEST_F()
120 ASSERT_EQ(execution.setOutput(0, actual, sizeof(Matrix3x4)), Result::NO_ERROR); in TEST_F()
122 ASSERT_EQ(CompareMatrices(expected2, actual), 0); in TEST_F()
142 Matrix3x4 actual; in TEST_F() local
143 memset(&actual, 0, sizeof(actual)); in TEST_F()
150 ASSERT_EQ(execution.setOutput(0, actual, sizeof(Matrix3x4)), Result::NO_ERROR); in TEST_F()
[all …]
/frameworks/base/tools/aapt2/
DResourceUtils_test.cpp45 ResourceNameRef actual; in TEST() local
47 EXPECT_TRUE(ResourceUtils::ParseResourceName("android:color/foo", &actual, &actual_priv)); in TEST()
48 EXPECT_THAT(actual, Eq(ResourceNameRef("android", ResourceType::kColor, "foo"))); in TEST()
51 EXPECT_TRUE(ResourceUtils::ParseResourceName("color/foo", &actual, &actual_priv)); in TEST()
52 EXPECT_THAT(actual, Eq(ResourceNameRef({}, ResourceType::kColor, "foo"))); in TEST()
55 EXPECT_TRUE(ResourceUtils::ParseResourceName("*android:color/foo", &actual, &actual_priv)); in TEST()
56 EXPECT_THAT(actual, Eq(ResourceNameRef("android", ResourceType::kColor, "foo"))); in TEST()
59 EXPECT_FALSE(ResourceUtils::ParseResourceName(android::StringPiece(), &actual, &actual_priv)); in TEST()
63 ResourceNameRef actual; in TEST() local
66 EXPECT_TRUE(ResourceUtils::ParseReference("@color/foo", &actual, &create, &private_ref)); in TEST()
[all …]
/frameworks/base/cmds/statsd/tests/external/
Dpuller_util_test.cpp86 vector<vector<int>> actual; in TEST() local
87 extractIntoVector(inputData, actual); in TEST()
89 EXPECT_EQ(1, (int)actual.size()); in TEST()
90 EXPECT_THAT(actual, Contains(expectedV1)); in TEST()
126 vector<vector<int>> actual; in TEST() local
127 extractIntoVector(inputData, actual); in TEST()
130 EXPECT_EQ(2, (int)actual.size()); in TEST()
131 EXPECT_THAT(actual, Contains(expectedV1)); in TEST()
132 EXPECT_THAT(actual, Contains(expectedV2)); in TEST()
162 vector<vector<int>> actual; in TEST() local
[all …]
/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/
DGlobalSortKeyComparatorTest.java76 List<NotificationRecord> actual = new ArrayList<>(); in testComparator() local
77 actual.addAll(expected); in testComparator()
78 Collections.shuffle(actual); in testComparator()
80 Collections.sort(actual, new GlobalSortKeyComparator()); in testComparator()
82 assertEquals(expected, actual); in testComparator()
106 List<NotificationRecord> actual = new ArrayList<>(); in testNoCrash_leftNull() local
107 actual.addAll(expected); in testNoCrash_leftNull()
108 Collections.shuffle(actual); in testNoCrash_leftNull()
110 Collections.sort(actual, new GlobalSortKeyComparator()); in testNoCrash_leftNull()
112 assertEquals(expected, actual); in testNoCrash_leftNull()
[all …]
/frameworks/base/core/tests/coretests/src/android/util/
DBase64Test.java65 private void assertEquals(byte[] expected, int len, byte[] actual) { in assertEquals() argument
66 assertEquals(len, actual.length); in assertEquals()
68 assertEquals(expected[i], actual[i]); in assertEquals()
73 private void assertEquals(byte[] expected, int len, byte[] actual, int alen) { in assertEquals() argument
76 assertEquals(expected[i], actual[i]); in assertEquals()
81 private void assertEquals(byte[] expected, byte[] actual) { in assertEquals() argument
82 assertEquals(expected.length, actual.length); in assertEquals()
84 assertEquals(expected[i], actual[i]); in assertEquals()
333 byte[] actual = new byte[plain.length * 2]; in testInputStream()
343 while ((b = b64is.read(actual, ap, actual.length-ap)) != -1) { in testInputStream()
[all …]
/frameworks/av/media/libnbaio/
DPipeReader.cpp65 ssize_t actual = mFifoReader.read(buffer, count, NULL /*timeout*/, &lost); in read() local
66 ALOG_ASSERT(actual <= count); in read()
67 if (actual == -EOVERFLOW || lost > 0) { in read()
70 actual = OVERRUN; in read()
72 if (actual <= 0) { in read()
73 return actual; in read()
75 mFramesRead += (size_t) actual; in read()
76 return actual; in read()
DMonoPipeReader.cpp49 ssize_t actual = mFifoReader.read(buffer, count); in read() local
50 ALOG_ASSERT(actual <= count); in read()
51 if (CC_UNLIKELY(actual <= 0)) { in read()
52 return actual; in read()
54 mFramesRead += (size_t) actual; in read()
55 return actual; in read()
DPipe.cpp54 ssize_t actual = mFifoWriter.write(buffer, count); in write() local
55 ALOG_ASSERT(actual <= count); in write()
56 if (actual <= 0) { in write()
57 return actual; in write()
59 mFramesWritten += (size_t) actual; in write()
60 return actual; in write()
DLibsndfileSource.cpp54 sf_count_t actual = sf_readf_short(mSndfile, (short *) buffer, (sf_count_t) count); in read() local
56 if (actual == 0) { in read()
69 mFramesRead += actual; in read()
70 if (actual >= mEstimatedFramesUntilEOF) { in read()
73 mEstimatedFramesUntilEOF -= actual; in read()
77 return actual; in read()
/frameworks/av/media/libaaudio/examples/input_monitor/src/
Dinput_monitor.cpp130 int actual = 0; in main() local
132 actual = AAudioStream_read(aaudioStream, shortData, minFrames, timeoutNanos); in main()
134 actual = AAudioStream_read(aaudioStream, floatData, minFrames, timeoutNanos); in main()
136 if (actual < 0) { in main()
137 fprintf(stderr, "ERROR - AAudioStream_read() returned %d\n", actual); in main()
138 result = actual; in main()
140 } else if (actual == 0) { in main()
141 fprintf(stderr, "WARNING - AAudioStream_read() returned %d\n", actual); in main()
144 framesLeft -= actual; in main()
145 frameCount += actual; in main()
[all …]
/frameworks/ml/nn/tools/test_generator/test_harness/include_legacy/
DTestHarness.h291 [&totalNumberOfErrors, fpAtol, fpRtol](float expected, float actual) {
295 EXPECT_NEAR(expected, actual, fpRange);
297 if (std::abs(expected - actual) > fpRange) {
302 [&totalNumberOfErrors](int32_t expected, int32_t actual) {
304 EXPECT_EQ(expected, actual);
306 if (expected != actual) {
311 [&totalNumberOfErrors, quant8AllowedError](uint8_t expected, uint8_t actual) {
313 EXPECT_NEAR(expected, actual, quant8AllowedError);
315 if (std::abs(expected - actual) > quant8AllowedError) {
320 [&totalNumberOfErrors](int16_t expected, int16_t actual) {
[all …]
/frameworks/base/core/tests/coretests/src/android/view/textclassifier/
DTextClassifierEventTest.java262 @Nullable SelectionEvent expected, @Nullable SelectionEvent actual) { in assertEquals() argument
263 if (expected == null && actual == null) return; in assertEquals()
264 if (expected == actual) return; in assertEquals()
265 assertWithMessage("actual").that(actual).isNotNull(); in assertEquals()
268 .that(actual.getEventType()).isEqualTo(expected.getEventType()); in assertEquals()
270 .that(actual.getPackageName()).isEqualTo(expected.getPackageName()); in assertEquals()
272 .that(actual.getWidgetType()).isEqualTo(expected.getWidgetType()); in assertEquals()
274 .that(actual.getWidgetVersion()).isEqualTo(expected.getWidgetVersion()); in assertEquals()
276 .that(actual.getInvocationMethod()).isEqualTo(expected.getInvocationMethod()); in assertEquals()
278 .that(actual.getResultId()).isEqualTo(expected.getResultId()); in assertEquals()
[all …]
/frameworks/base/core/tests/coretests/src/android/content/pm/
DLimitedLengthInputStreamTest.java85 byte[] actual = new byte[length]; in checkReadBytesWithOffsetAndLength_WithString1()
92 System.arraycopy(temp, 0, actual, 0, length); in checkReadBytesWithOffsetAndLength_WithString1()
93 assertTrue(Arrays.equals(expected, actual)); in checkReadBytesWithOffsetAndLength_WithString1()
127 byte[] actual = new byte[TEST_STRING1.length]; in testReadBytesWithOffsetAndLength_ZeroOffset_PastEnd_Success()
128 System.arraycopy(temp, 0, actual, 0, actual.length); in testReadBytesWithOffsetAndLength_ZeroOffset_PastEnd_Success()
129 assertTrue(Arrays.equals(TEST_STRING1, actual)); in testReadBytesWithOffsetAndLength_ZeroOffset_PastEnd_Success()
135 byte[] actual = new byte[length]; in checkReadBytes_WithString1()
142 System.arraycopy(temp, 0, actual, 0, length); in checkReadBytes_WithString1()
143 assertTrue(Arrays.equals(expected, actual)); in checkReadBytes_WithString1()

12345678910