Home
last modified time | relevance | path

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

1234

/system/core/libunwindstack/tests/
DDwarfCfaLogTest.cpp83 std::string expected = "4 unwind Illegal\n"; in TYPED_TEST_P() local
84 expected += android::base::StringPrintf("4 unwind Raw Data: 0x%02x\n", i); in TYPED_TEST_P()
85 ASSERT_EQ(expected, GetFakeLogPrint()); in TYPED_TEST_P()
94 std::string expected = in TYPED_TEST_P() local
97 ASSERT_EQ(expected, GetFakeLogPrint()); in TYPED_TEST_P()
105 std::string expected = in TYPED_TEST_P() local
108 ASSERT_EQ(expected, GetFakeLogPrint()); in TYPED_TEST_P()
115 expected = in TYPED_TEST_P()
118 ASSERT_EQ(expected, GetFakeLogPrint()); in TYPED_TEST_P()
126 std::string expected = in TYPED_TEST_P() local
[all …]
/system/netd/libnetdutils/
DSyscallsTest.cpp72 sockaddr_nl expected = {}; in TEST_F() local
77 .WillOnce(Invoke([expected](Fd, sockaddr* addr, socklen_t* addrlen) { in TEST_F()
78 memcpy(addr, &expected, sizeof(expected)); in TEST_F()
79 EXPECT_EQ(*addrlen, static_cast<socklen_t>(sizeof(expected))); in TEST_F()
84 EXPECT_EQ(expected, result.value()); in TEST_F()
96 sockaddr_nl expected = {}; in TEST_F() local
100 EXPECT_CALL(mSyscalls, setsockopt(kFd, kLevel, kOptname, &expected, sizeof(expected))) in TEST_F()
102 EXPECT_EQ(status::ok, sys.setsockopt(kFd, kLevel, kOptname, expected)); in TEST_F()
106 EXPECT_CALL(mSyscalls, setsockopt(kFd, kLevel, kOptname, &expected, sizeof(expected))) in TEST_F()
108 EXPECT_EQ(kError, sys.setsockopt(kFd, kLevel, kOptname, expected)); in TEST_F()
[all …]
/system/update_engine/payload_generator/
Dextent_ranges_unittest.cc35 const uint64_t* expected, in ExpectRangeEq() argument
40 blocks += expected[i]; in ExpectRangeEq()
48 EXPECT_EQ(expected[i], it->start_block()) << "line: " << line; in ExpectRangeEq()
49 EXPECT_EQ(expected[i + 1], it->num_blocks()) << "line: " << line; in ExpectRangeEq()
143 static const uint64_t expected[] = {}; in TEST() local
145 ExpectRangeEq(ranges, expected, 0, __LINE__); in TEST()
149 static const uint64_t expected[] = {}; in TEST() local
151 ExpectRangeEq(ranges, expected, 0, __LINE__); in TEST()
160 static const uint64_t expected[] = {0, 2, 3, 1}; in TEST() local
161 EXPECT_RANGE_EQ(ranges, expected); in TEST()
[all …]
/system/core/libcutils/tests/
Dtrace-dev_test.cpp59 std::string expected = android::base::StringPrintf("B|%d|fake_name", getpid()); in TEST_F() local
60 ASSERT_STREQ(expected.c_str(), actual.c_str()); in TEST_F()
64 std::string expected = android::base::StringPrintf("B|%d|", getpid()); in TEST_F() local
65 std::string name = MakeName(ATRACE_MESSAGE_LENGTH - expected.length() - 1); in TEST_F()
73 expected += name; in TEST_F()
74 ASSERT_STREQ(expected.c_str(), actual.c_str()); in TEST_F()
83 ASSERT_STREQ(expected.c_str(), actual.c_str()); in TEST_F()
87 std::string expected = android::base::StringPrintf("B|%d|", getpid()); in TEST_F() local
96 int expected_len = ATRACE_MESSAGE_LENGTH - expected.length() - 1; in TEST_F()
97 expected += android::base::StringPrintf("%.*s", expected_len, name.c_str()); in TEST_F()
[all …]
/system/chre/apps/chqts/src/shared/
Dnano_string_test.cc39 uint8_t expected[kMemsetBufferLen]; in testMemset() local
40 uint8_t actual[arrayLength(expected)]; in testMemset()
42 static_assert(kLenToSet <= arrayLength(expected), "Bad test invocation"); in testMemset()
44 ::memset(expected, kUnsetValue, sizeof(expected)); in testMemset()
47 ::memset(expected, kNewValue, kLenToSet); in testMemset()
50 EXPECT_EQ(0, memcmp(expected, actual, sizeof(expected))); in testMemset()
72 uint8_t expected[arrayLength(kMemcpySrc)]; in testMemcpy() local
73 uint8_t actual[arrayLength(expected)]; in testMemcpy()
77 ::memset(expected, kUnsetValue, sizeof(expected)); in testMemcpy()
80 ::memcpy(expected, kMemcpySrc, kLenToCopy); in testMemcpy()
[all …]
/system/netd/server/
DIdletimerControllerTest.cpp44 std::vector<std::string> expected = { in TEST_F() local
54 expectIptablesRestoreCommands(expected); in TEST_F()
57 expectIptablesRestoreCommands(expected); in TEST_F()
60 expectIptablesRestoreCommands(expected); in TEST_F()
63 expectIptablesRestoreCommands(expected); in TEST_F()
82 auto expected = makeAddRemoveCommands(true); in TEST_F() local
84 expectIptablesRestoreCommands(expected); in TEST_F()
87 expectIptablesRestoreCommands(expected); in TEST_F()
89 expected = makeAddRemoveCommands(false); in TEST_F()
91 expectIptablesRestoreCommands(expected); in TEST_F()
[all …]
DBandwidthControllerTest.cpp103 ExpectedIptablesCommands expected = {{ V4, expectedList }}; in expectSetupCommands() local
105 expected.push_back({ V4V6, expectedClean }); in expectSetupCommands()
107 expected.push_back({ V4V6, expectedFlush }); in expectSetupCommands()
109 expected.push_back({ V4V6, expectedAccounting }); in expectSetupCommands()
112 expectIptablesRestoreCommands(expected); in expectSetupCommands()
246 std::string expected = { in TEST_F() local
253 {V4, expected}, in TEST_F()
254 {V6, expected}, in TEST_F()
314 std::string expected = in TEST_F() local
319 ASSERT_EQ(expected, readSocketClientResponse(socketPair[1])); in TEST_F()
[all …]
DControllersTest.cpp72 ExpectedIptablesCommands expected = { in TEST_F() local
192 expectIptablesRestoreCommands(expected); in TEST_F()
200 for (size_t i = 0; i < expected.size(); i++) { in TEST_F()
218 ASSERT_NE(std::string::npos, expected[7].second.find("*filter\n-S OUTPUT\n")); in TEST_F()
228 ASSERT_NE(std::string::npos, expected[9].second.find("*filter\n-S OUTPUT\n")); in TEST_F()
233 DELETE_SUBSTRING("-A OUTPUT -j oem_out\n", expected[10].second); in TEST_F()
234 DELETE_SUBSTRING("-A OUTPUT -j st_OUTPUT\n", expected[10].second); in TEST_F()
238 ASSERT_NE(std::string::npos, expected[13].second.find("*mangle\n-S POSTROUTING\n")); in TEST_F()
247 DELETE_SUBSTRING("-A POSTROUTING -j oem_mangle_post\n", expected[14].second); in TEST_F()
248 DELETE_SUBSTRING("-A POSTROUTING -j bw_mangle_POSTROUTING\n", expected[14].second); in TEST_F()
[all …]
DFirewallControllerTest.cpp107 ExpectedIptablesCommands expected = { in TEST_F() local
111 expectIptablesRestoreCommands(expected); in TEST_F()
113 expected = { in TEST_F()
117 expectIptablesRestoreCommands(expected); in TEST_F()
121 ExpectedIptablesCommands expected = { in TEST_F() local
125 expectIptablesRestoreCommands(expected); in TEST_F()
127 expected = { in TEST_F()
131 expectIptablesRestoreCommands(expected); in TEST_F()
135 ExpectedIptablesCommands expected = { in TEST_F() local
142 expectIptablesRestoreCommands(expected); in TEST_F()
[all …]
DNatControllerTest.cpp177 ExpectedIptablesCommands expected; in TEST_F() local
180 expected.insert(expected.end(), setupFirstNatCommands.begin(), setupFirstNatCommands.end()); in TEST_F()
181 expected.insert(expected.end(), startFirstNatCommands.begin(), startFirstNatCommands.end()); in TEST_F()
183 expectIptablesRestoreCommands(expected); in TEST_F()
193 expected = stopNatCommands("usb0", "rmnet0"); in TEST_F()
194 expected.insert(expected.end(), FLUSH_COMMANDS.begin(), FLUSH_COMMANDS.end()); in TEST_F()
196 expectIptablesRestoreCommands(expected); in TEST_F()
DStrictControllerTest.cpp103 std::vector<std::pair<IptablesTarget, std::string>> expected = { in TEST_F() local
108 expectIptablesRestoreCommands(expected); in TEST_F()
114 const std::string expected = in TEST_F() local
122 expectIptablesRestoreCommands({ expected }); in TEST_F()
/system/core/adb/
Dadb_io_test.cpp47 const char expected[] = "Foobar"; in POSIX_TEST() local
51 ASSERT_TRUE(android::base::WriteStringToFd(expected, tf.fd)) << strerror(errno); in POSIX_TEST()
55 char buf[sizeof(expected)] = {}; in POSIX_TEST()
57 EXPECT_STREQ(expected, buf); in POSIX_TEST()
61 const char expected[] = "Foobar"; in POSIX_TEST() local
65 ASSERT_TRUE(android::base::WriteStringToFd(expected, tf.fd)) << strerror(errno); in POSIX_TEST()
69 char buf[sizeof(expected) + 1] = {}; in POSIX_TEST()
86 std::string expected(input); in POSIX_TEST() local
87 expected.pop_back(); in POSIX_TEST()
88 EXPECT_STREQ(expected.c_str(), buf); in POSIX_TEST()
[all …]
/system/core/libpixelflinger/tests/gglmul/
Dgglmul_test.cpp123 GGLfixed actual, expected; in gglMulx_test() local
132 expected = in gglMulx_test()
134 if(actual == expected) in gglMulx_test()
138 actual, expected); in gglMulx_test()
166 GGLfixed actual, expected; in gglMulAddx_test() local
175 expected = (((int64_t)test->x * test->y) >> test->shift) + test->a; in gglMulAddx_test()
177 if(actual == expected) in gglMulAddx_test()
181 actual, expected); in gglMulAddx_test()
209 GGLfixed actual, expected; in gglMulSubx_test() local
218 expected = (((int64_t)test->x * test->y) >> test->shift) - test->a; in gglMulSubx_test()
[all …]
/system/tools/hidl/test/java_test/
Dhidl_test_java_native.cpp352 hidl_vec<bool> someBoolVector, expected; in TEST_F() local
354 expected.resize(4); in TEST_F()
358 expected[i] = !someBoolVector[i]; in TEST_F()
365 EXPECT_EQ(expected, result); in TEST_F()
388 hidl_array<int32_t, 32> expected; in TEST_F() local
391 param[i] = expected[15 + i] = i; in TEST_F()
392 expected[i] = 2 * i; in TEST_F()
395 expected[30] = 1; in TEST_F()
396 expected[31] = 2; in TEST_F()
402 EXPECT_EQ(expected, result); in TEST_F()
[all …]
/system/update_engine/update_manager/
Dreal_time_provider_unittest.cc69 const Time expected = Time::FromLocalExploded(exploded); in TEST_F() local
72 UmTestUtils::ExpectVariableHasValue(expected, provider_->var_curr_date()); in TEST_F()
77 Time::Exploded expected; in TEST_F() local
78 now.LocalExplode(&expected); in TEST_F()
80 UmTestUtils::ExpectVariableHasValue(expected.hour, in TEST_F()
/system/nvram/core/tests/
Dgtest_stubs.h40 #define ASSERT_EQ(expected, actual) ASSERT_MSG(expected == actual) argument
48 #define EXPECT_EQ(expected, actual) EXPECT_MSG((expected) == (actual)) argument
49 #define EXPECT_NE(expected, actual) EXPECT_MSG((expected) != (actual)) argument
/system/core/base/
Dchrono_utils_test.cpp49 void ExpectAboutEqual(T expected, T actual) { in ExpectAboutEqual() argument
50 auto expected_upper_bound = expected * 1.05f; in ExpectAboutEqual()
51 auto expected_lower_bound = expected * .95; in ExpectAboutEqual()
63 auto expected = std::chrono::duration_cast<std::chrono::milliseconds>(stop - start); in TEST() local
64 ExpectAboutEqual(expected, stop_timer); in TEST()
Dutf8_test.cpp182 std::wstring expected(convert_cases[i].wide); in TEST() local
183 EXPECT_EQ(expected, converted); in TEST()
251 std::string expected(convert_cases[i].utf8); in TEST() local
252 EXPECT_EQ(expected, converted); in TEST()
287 std::string expected(convert_cases[i].utf8); in TEST() local
288 EXPECT_EQ(expected, converted); in TEST()
330 std::string expected; in TEST() local
331 memcpy(WriteInto(&expected, arraysize(multi)), multi, sizeof(multi)); in TEST()
332 EXPECT_EQ(arraysize(multi) - 1, expected.length()); in TEST()
335 EXPECT_EQ(expected, converted); in TEST()
/system/core/libcutils/
Dstrdup8to16.c72 int expected = 0; in strlen8to16() local
83 expected--; in strlen8to16()
84 if (expected < 0) { in strlen8to16()
89 expected = UTF8_SEQ_LENGTH(ic) - 1; in strlen8to16()
92 if (expected == 3) { in strlen8to16()
/system/keymaster/
Dhkdf_test.cpp65 const string expected = hex2str(test.output_hex); in TEST() local
66 size_t output_len = expected.size(); in TEST()
73 EXPECT_EQ(0, memcmp(output, expected.data(), output_len)); in TEST()
/system/connectivity/wifilogd/tests/
Dbyte_buffer_unittest.cpp57 const std::string expected{"helloworld"}; in TEST_F() local
58 EXPECT_EQ(0, std::memcmp(buffer_.data(), expected.data(), expected.size())); in TEST_F()
79 const std::string expected{"helloworld"}; in TEST_F() local
80 EXPECT_EQ(0, std::memcmp(buffer_.data(), expected.data(), expected.size())); in TEST_F()
/system/extras/verity/
Dverify_boot_signature.c167 BIGNUM expected; in validate_signature_block() local
175 BN_init(&expected); in validate_signature_block()
179 if (!BN_set_word(&expected, FORMAT_VERSION)) { in validate_signature_block()
186 if (BN_cmp(&expected, &value) != 0) { in validate_signature_block()
191 BN_clear(&expected); in validate_signature_block()
197 BN_bin2bn((const unsigned char *) &length, sizeof(length), &expected); in validate_signature_block()
201 if (BN_cmp(&expected, &value) != 0) { in validate_signature_block()
209 BN_free(&expected); in validate_signature_block()
/system/extras/simpleperf/
Dsample_tree_test.cpp97 const SampleEntry& expected, in SampleMatchExpectation() argument
100 ASSERT_EQ(expected.pid, sample.pid); in SampleMatchExpectation()
101 ASSERT_EQ(expected.tid, sample.tid); in SampleMatchExpectation()
102 ASSERT_STREQ(expected.thread_comm, sample.thread_comm); in SampleMatchExpectation()
103 ASSERT_EQ(expected.dso_name, sample.dso_name); in SampleMatchExpectation()
104 ASSERT_EQ(expected.map_start_addr, sample.map_start_addr); in SampleMatchExpectation()
105 ASSERT_EQ(expected.sample_count, sample.sample_count); in SampleMatchExpectation()
/system/tools/aidl/tests/
Daidl_test_client_file_descriptors.cpp72 bool DoRead(const string& name, const unique_fd& fd, const string& expected) { in DoRead() argument
73 size_t length = expected.size(); in DoRead()
85 if (buf != expected) { in DoRead()
86 cerr << "Expected '" << expected << "' got '" << buf << "'" << endl; in DoRead()
/system/update_engine/
Dchrome_browser_proxy_resolver_unittest.cc111 deque<string>& expected = outputs[i]; in TEST_F() local
112 EXPECT_EQ(results.size(), expected.size()) << "i = " << i; in TEST_F()
113 if (expected.size() != results.size()) in TEST_F()
115 for (size_t j = 0; j < expected.size(); j++) { in TEST_F()
116 EXPECT_EQ(expected[j], results[j]) << "i = " << i; in TEST_F()

1234