Home
last modified time | relevance | path

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

123456

/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/core/init/
Dueventd_parser_test.cpp26 void TestSubsystems(const Subsystem& expected, const Subsystem& test) { in TestSubsystems() argument
27 EXPECT_EQ(expected.name_, test.name_); in TestSubsystems()
28 EXPECT_EQ(expected.devname_source_, test.devname_source_) << expected.name_; in TestSubsystems()
29 EXPECT_EQ(expected.dir_name_, test.dir_name_) << expected.name_; in TestSubsystems()
32 void TestPermissions(const Permissions& expected, const Permissions& test) { in TestPermissions() argument
33 EXPECT_EQ(expected.name_, test.name_); in TestPermissions()
34 EXPECT_EQ(expected.perm_, test.perm_) << expected.name_; in TestPermissions()
35 EXPECT_EQ(expected.uid_, test.uid_) << expected.name_; in TestPermissions()
36 EXPECT_EQ(expected.gid_, test.gid_) << expected.name_; in TestPermissions()
37 EXPECT_EQ(expected.prefix_, test.prefix_) << expected.name_; in TestPermissions()
[all …]
Dpersistent_properties_test.cpp46 void CheckPropertiesEqual(std::vector<std::pair<std::string, std::string>> expected, in CheckPropertiesEqual() argument
49 auto it = std::find_if(expected.begin(), expected.end(), in CheckPropertiesEqual()
54 ASSERT_TRUE(it != expected.end()) in CheckPropertiesEqual()
57 expected.erase(it); in CheckPropertiesEqual()
66 EXPECT_TRUE(expected.empty()) << "Did not find expected properties:" << joiner(expected); in CheckPropertiesEqual()
/system/netd/libnetdutils/
DSyscallsTest.cpp71 sockaddr_nl expected = {}; in TEST_F() local
76 .WillOnce(Invoke([expected](Fd, sockaddr* addr, socklen_t* addrlen) { in TEST_F()
77 memcpy(addr, &expected, sizeof(expected)); in TEST_F()
78 EXPECT_EQ(*addrlen, static_cast<socklen_t>(sizeof(expected))); in TEST_F()
83 EXPECT_EQ(expected, result.value()); in TEST_F()
95 sockaddr_nl expected = {}; in TEST_F() local
99 EXPECT_CALL(mSyscalls, setsockopt(kFd, kLevel, kOptname, &expected, sizeof(expected))) in TEST_F()
101 EXPECT_EQ(status::ok, sys.setsockopt(kFd, kLevel, kOptname, expected)); in TEST_F()
105 EXPECT_CALL(mSyscalls, setsockopt(kFd, kLevel, kOptname, &expected, sizeof(expected))) in TEST_F()
107 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()
127 static const uint64_t expected[] = {}; in TEST() local
129 ExpectRangeEq(ranges, expected, 0, __LINE__); in TEST()
133 static const uint64_t expected[] = {}; in TEST() local
135 ExpectRangeEq(ranges, expected, 0, __LINE__); in TEST()
144 static const uint64_t expected[] = {0, 2, 3, 1}; in TEST() local
145 EXPECT_RANGE_EQ(ranges, expected); in TEST()
[all …]
/system/core/libcutils/
Dtrace-dev_test.cpp58 std::string expected = android::base::StringPrintf("B|%d|fake_name", getpid()); in TEST_F() local
59 ASSERT_STREQ(expected.c_str(), actual.c_str()); in TEST_F()
63 std::string expected = android::base::StringPrintf("B|%d|", getpid()); in TEST_F() local
64 std::string name = MakeName(ATRACE_MESSAGE_LENGTH - expected.length() - 1); in TEST_F()
72 expected += name; in TEST_F()
73 ASSERT_STREQ(expected.c_str(), actual.c_str()); in TEST_F()
82 ASSERT_STREQ(expected.c_str(), actual.c_str()); in TEST_F()
86 std::string expected = android::base::StringPrintf("B|%d|", getpid()); in TEST_F() local
95 int expected_len = ATRACE_MESSAGE_LENGTH - expected.length() - 1; in TEST_F()
96 expected += android::base::StringPrintf("%.*s", expected_len, name.c_str()); in TEST_F()
[all …]
Dstrdup8to16.cpp73 int expected = 0; in strlen8to16() local
84 expected--; in strlen8to16()
85 if (expected < 0) { in strlen8to16()
90 expected = UTF8_SEQ_LENGTH(ic) - 1; in strlen8to16()
93 if (expected == 3) { in strlen8to16()
/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/testing/gtest_extras/tests/
DSystemTests.cpp189 std::string expected = in TEST_F() local
196 Verify("*.DISABLED_pass", expected, 0, std::vector<const char*>{"--no_gtest_format"})); in TEST_F()
200 std::string expected = in TEST_F() local
207 Verify("*.DISABLED_pass", expected, 0, in TEST_F()
212 std::string expected = in TEST_F() local
219 Verify("*.DISABLED_pass", expected, 0, in TEST_F()
224 std::string expected = in TEST_F() local
231 ASSERT_NO_FATAL_FAILURE(Verify("*.DISABLED_pass", expected, 0)); in TEST_F()
235 std::string expected = in TEST_F() local
243 Verify("*.DISABLED_pass", expected, 0, std::vector<const char*>{"--gtest_print_time=0"})); in TEST_F()
[all …]
/system/netd/server/
DFirewallControllerTest.cpp118 ExpectedIptablesCommands expected = { in TEST_F() local
122 expectIptablesRestoreCommands(expected); in TEST_F()
124 expected = { in TEST_F()
128 expectIptablesRestoreCommands(expected); in TEST_F()
132 ExpectedIptablesCommands expected = { in TEST_F() local
136 expectIptablesRestoreCommands(expected); in TEST_F()
138 expected = { in TEST_F()
142 expectIptablesRestoreCommands(expected); in TEST_F()
146 ExpectedIptablesCommands expected = { in TEST_F() local
153 expectIptablesRestoreCommands(expected); in TEST_F()
[all …]
DBandwidthControllerTest.cpp159 ExpectedIptablesCommands expected = {{ V4, expectedList }}; in expectSetupCommands() local
161 expected.push_back({ V4V6, expectedClean }); in expectSetupCommands()
163 expected.push_back({ V4V6, expectedFlush }); in expectSetupCommands()
165 expected.push_back({ V4V6, expectedAccounting }); in expectSetupCommands()
168 expectIptablesRestoreCommands(expected); in expectSetupCommands()
300 std::string expected = { in TEST_F() local
307 {V4, expected}, in TEST_F()
308 {V6, expected}, in TEST_F()
352 std::vector<std::string> expected = makeInterfaceQuotaCommands(iface, 1, kOldQuota); in TEST_F() local
355 expectIptablesRestoreCommands(expected); in TEST_F()
[all …]
DControllersTest.cpp72 ExpectedIptablesCommands expected = { in TEST_F() local
198 expectIptablesRestoreCommands(expected); in TEST_F()
206 for (size_t i = 0; i < expected.size(); i++) { in TEST_F()
224 ASSERT_NE(std::string::npos, expected[7].second.find("*filter\n-S OUTPUT\n")); in TEST_F()
234 ASSERT_NE(std::string::npos, expected[9].second.find("*filter\n-S OUTPUT\n")); in TEST_F()
239 DELETE_SUBSTRING("-A OUTPUT -j oem_out\n", expected[10].second); in TEST_F()
240 DELETE_SUBSTRING("-A OUTPUT -j st_OUTPUT\n", expected[10].second); in TEST_F()
244 ASSERT_NE(std::string::npos, expected[13].second.find("*mangle\n-S POSTROUTING\n")); in TEST_F()
253 DELETE_SUBSTRING("-A POSTROUTING -j oem_mangle_post\n", expected[14].second); in TEST_F()
254 DELETE_SUBSTRING("-A POSTROUTING -j bw_mangle_POSTROUTING\n", expected[14].second); in TEST_F()
[all …]
DIdletimerControllerTest.cpp59 auto expected = makeAddRemoveCommands(true); in TEST_F() local
61 expectIptablesRestoreCommands(expected); in TEST_F()
64 expectIptablesRestoreCommands(expected); in TEST_F()
66 expected = makeAddRemoveCommands(false); in TEST_F()
68 expectIptablesRestoreCommands(expected); in TEST_F()
71 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.cpp46 const char expected[] = "Foobar"; in POSIX_TEST() local
50 ASSERT_TRUE(android::base::WriteStringToFd(expected, tf.fd)) << strerror(errno); in POSIX_TEST()
54 char buf[sizeof(expected)] = {}; in POSIX_TEST()
56 EXPECT_STREQ(expected, buf); in POSIX_TEST()
60 const char expected[] = "Foobar"; in POSIX_TEST() local
64 ASSERT_TRUE(android::base::WriteStringToFd(expected, tf.fd)) << strerror(errno); in POSIX_TEST()
68 char buf[sizeof(expected) + 1] = {}; in POSIX_TEST()
85 std::string expected(input); in POSIX_TEST() local
86 expected.pop_back(); in POSIX_TEST()
87 EXPECT_STREQ(expected.c_str(), buf); in POSIX_TEST()
[all …]
/system/bt/vendor_libs/test_vendor_lib/packets/hci/test/
Devent_builder_test.cc56 std::vector<uint8_t> expected({ in TEST() local
72 expected.push_back(payload[0]); in TEST()
73 expected.push_back(rssi); in TEST()
75 ASSERT_EQ(expected.size(), le_adv->size()); in TEST()
76 ASSERT_EQ(expected, *le_adv->ToVector()); in TEST()
90 std::vector<uint8_t> expected({ in TEST() local
107 expected.push_back(count[i]); in TEST()
109 expected.push_back(rssi); in TEST()
112 ASSERT_EQ(expected, *raw_adv); in TEST()
124 std::vector<uint8_t> expected({ in TEST() local
[all …]
/system/update_engine/update_manager/
Dreal_time_provider_unittest.cc71 Time expected; in TEST_F() local
72 ignore_result(Time::FromLocalExploded(exploded, &expected)); in TEST_F()
75 UmTestUtils::ExpectVariableHasValue(expected, provider_->var_curr_date()); in TEST_F()
80 Time::Exploded expected; in TEST_F() local
81 now.LocalExplode(&expected); in TEST_F()
83 UmTestUtils::ExpectVariableHasValue(expected.hour, in TEST_F()
89 Time::Exploded expected; in TEST_F() local
90 now.LocalExplode(&expected); in TEST_F()
92 UmTestUtils::ExpectVariableHasValue(expected.minute, in TEST_F()
Dpolicy_test_utils.h58 void ExpectStatus(EvalStatus expected, T method, R* result, Args... args) { in ExpectStatus() argument
61 EXPECT_EQ(expected, in ExpectStatus()
80 void ExpectPolicyStatus(EvalStatus expected, in ExpectPolicyStatus() argument
86 EXPECT_EQ(expected, in ExpectPolicyStatus()
/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/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/iorap/src/common/
Dexpected.h263 struct expected {
266 constexpr expected() noexcept(noexcept(T{})) : expected(T{}) {}
268 constexpr expected(const T& value) : data_{value, detail::expected_tag_right{}} {}
269 constexpr expected(T&& value) : data_{std::move(value), detail::expected_tag_right{}} {}
270 constexpr expected(const E& error) : data_{error, detail::expected_tag_error{}} {}
271 constexpr expected(E&& error) : data_{std::move(error), detail::expected_tag_error{}} {}
274 constexpr expected(unexpected<G> const& u) : expected{u.value()} {}
277 constexpr expected(unexpected<G>&& u) : expected{std::move(u.value())} {}
340 static_assert(std::is_trivially_destructible_v<expected<int, /*error*/double> >);
341 static_assert(!std::is_trivially_destructible_v<expected<TestType, /*error*/double> >);
[all …]
/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()
/system/timezone/tzlookup_generator/src/test/java/com/android/libcore/timezone/tzlookup/
DZoneTabFileTest.java97 } catch (IOException expected) {} in parseMalformedFile()
108 Map<String, List<String>> expected = new HashMap<>(); in createCountryToOlsonIdsMap() local
109 addIds(expected, "GB", "Europe/London"); in createCountryToOlsonIdsMap()
110 addIds(expected, "US", "America/New_York", "America/Los_Angeles"); in createCountryToOlsonIdsMap()
114 assertEquals(expected, actual); in createCountryToOlsonIdsMap()
/system/extras/simpleperf/
Drecord_test.cpp103 SampleRecord expected(event_attr, 0, 1, 2, 3, 4, 5, 6, {1, PERF_CONTEXT_USER, 2, 3, 4, 5}, {}, in TEST_F() local
109 CheckRecordEqual(r, expected); in TEST_F()
118 SampleRecord expected(event_attr, 0, 1, 2, 3, 4, 5, 6, {1, PERF_CONTEXT_USER, 3, 4, 5}, {}, 0); in TEST_F() local
119 CheckRecordEqual(r, expected); in TEST_F()
128 SampleRecord expected(event_attr, 0, 1, 2, 3, 4, 5, 6, in TEST_F() local
131 expected.header.misc = PERF_RECORD_MISC_KERNEL; in TEST_F()
132 CheckRecordEqual(r, expected); in TEST_F()
/system/keymaster/tests/
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()

123456