/system/core/libunwindstack/tests/ |
D | DwarfCfaLogTest.cpp | 84 std::string expected = "4 unwind Illegal\n"; in TYPED_TEST_P() local 85 expected += android::base::StringPrintf("4 unwind Raw Data: 0x%02x\n", i); in TYPED_TEST_P() 86 ASSERT_EQ(expected, GetFakeLogPrint()); in TYPED_TEST_P() 95 std::string expected = in TYPED_TEST_P() local 98 ASSERT_EQ(expected, GetFakeLogPrint()); in TYPED_TEST_P() 106 std::string expected = in TYPED_TEST_P() local 109 ASSERT_EQ(expected, GetFakeLogPrint()); in TYPED_TEST_P() 116 expected = in TYPED_TEST_P() 119 ASSERT_EQ(expected, GetFakeLogPrint()); in TYPED_TEST_P() 127 std::string expected = in TYPED_TEST_P() local [all …]
|
/system/core/init/ |
D | ueventd_parser_test.cpp | 28 void TestSubsystems(const Subsystem& expected, const Subsystem& test) { in TestSubsystems() argument 29 EXPECT_EQ(expected.name_, test.name_); in TestSubsystems() 30 EXPECT_EQ(expected.devname_source_, test.devname_source_) << expected.name_; in TestSubsystems() 31 EXPECT_EQ(expected.dir_name_, test.dir_name_) << expected.name_; in TestSubsystems() 34 void TestPermissions(const Permissions& expected, const Permissions& test) { in TestPermissions() argument 35 EXPECT_EQ(expected.name_, test.name_); in TestPermissions() 36 EXPECT_EQ(expected.perm_, test.perm_) << expected.name_; in TestPermissions() 37 EXPECT_EQ(expected.uid_, test.uid_) << expected.name_; in TestPermissions() 38 EXPECT_EQ(expected.gid_, test.gid_) << expected.name_; in TestPermissions() 39 EXPECT_EQ(expected.prefix_, test.prefix_) << expected.name_; in TestPermissions() [all …]
|
D | persistent_properties_test.cpp | 46 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/ |
D | SyscallsTest.cpp | 71 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/ |
D | extent_ranges_unittest.cc | 36 const uint64_t* expected, in ExpectRangeEq() argument 41 blocks += expected[i]; in ExpectRangeEq() 49 EXPECT_EQ(expected[i], it->start_block()) << "line: " << line; in ExpectRangeEq() 50 EXPECT_EQ(expected[i + 1], it->num_blocks()) << "line: " << line; in ExpectRangeEq() 128 static const uint64_t expected[] = {}; in TEST() local 130 ExpectRangeEq(ranges, expected, 0, __LINE__); in TEST() 134 static const uint64_t expected[] = {}; in TEST() local 136 ExpectRangeEq(ranges, expected, 0, __LINE__); in TEST() 145 static const uint64_t expected[] = {0, 2, 3, 1}; in TEST() local 146 EXPECT_RANGE_EQ(ranges, expected); in TEST() [all …]
|
/system/chre/apps/chqts/src/shared/ |
D | nano_string_test.cc | 39 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/core/libcutils/ |
D | trace-dev_test.cpp | 58 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 …]
|
/system/netd/server/ |
D | FirewallControllerTest.cpp | 115 ExpectedIptablesCommands expected = { in TEST_F() local 119 expectIptablesRestoreCommands(expected); in TEST_F() 121 expected = { in TEST_F() 125 expectIptablesRestoreCommands(expected); in TEST_F() 129 ExpectedIptablesCommands expected = { in TEST_F() local 133 expectIptablesRestoreCommands(expected); in TEST_F() 135 expected = { in TEST_F() 139 expectIptablesRestoreCommands(expected); in TEST_F() 143 ExpectedIptablesCommands expected = { in TEST_F() local 150 expectIptablesRestoreCommands(expected); in TEST_F() [all …]
|
D | BandwidthControllerTest.cpp | 161 ExpectedIptablesCommands expected = {{ V4, expectedList }}; in expectSetupCommands() local 163 expected.push_back({ V4V6, expectedClean }); in expectSetupCommands() 165 expected.push_back({ V4V6, expectedFlush }); in expectSetupCommands() 167 expected.push_back({ V4V6, expectedAccounting }); in expectSetupCommands() 170 expectIptablesRestoreCommands(expected); in expectSetupCommands() 302 std::string expected = { in TEST_F() local 308 {V4, expected}, in TEST_F() 309 {V6, expected}, in TEST_F() 353 std::vector<std::string> expected = makeInterfaceQuotaCommands(iface, 1, kOldQuota); in TEST_F() local 356 expectIptablesRestoreCommands(expected); in TEST_F() [all …]
|
D | ControllersTest.cpp | 72 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 …]
|
D | IdletimerControllerTest.cpp | 59 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()
|
D | StrictControllerTest.cpp | 103 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/libbase/include/android-base/ |
D | expected.h | 54 class expected; variable 86 class _NODISCARD_ expected { 93 using rebind = expected<U, error_type>; 96 constexpr expected() = default; 97 constexpr expected(const expected& rhs) = default; 98 constexpr expected(expected&& rhs) noexcept = default; 103 !std::is_constructible_v<T, expected<U, G>&> && 104 !std::is_constructible_v<T, expected<U, G>&&> && 105 !std::is_constructible_v<T, const expected<U, G>&> && 106 !std::is_constructible_v<T, const expected<U, G>&&> && [all …]
|
/system/testing/gtest_extras/tests/ |
D | SystemTests.cpp | 273 std::string expected = in TEST_F() local 280 ASSERT_NO_FATAL_FAILURE(Verify("*.DISABLED_pass", expected, 0)); in TEST_F() 284 std::string expected = in TEST_F() local 292 Verify("*.DISABLED_pass", expected, 0, std::vector<const char*>{"--gtest_print_time=0"})); in TEST_F() 296 std::string expected = in TEST_F() local 304 Verify("*.DISABLED_pass", expected, 0, std::vector<const char*>{"--gtest_color=yes"})); in TEST_F() 308 std::string expected = in TEST_F() local 318 ASSERT_NO_FATAL_FAILURE(Verify("*.DISABLED_skip_no_message", expected, 0)); in TEST_F() 322 std::string expected = in TEST_F() local 333 ASSERT_NO_FATAL_FAILURE(Verify("*.DISABLED_skip_with_message", expected, 0)); in TEST_F() [all …]
|
/system/core/adb/ |
D | adb_io_test.cpp | 46 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/update_engine/update_manager/ |
D | real_time_provider_unittest.cc | 71 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()
|
/system/core/libpixelflinger/tests/gglmul/ |
D | gglmul_test.cpp | 123 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/core/adb/fastdeploy/deploypatchgenerator/ |
D | patch_utils_test.cpp | 65 const char expected[] = {0x77, 0x66, 0x55, 0x44, 0x33, 0x22, 0x11, 0x00}; in TEST() local 66 EXPECT_TRUE(FileMatchesContent(output.fd, expected, 8)); in TEST() 70 std::string expected("Some Data"); in TEST() local 74 WriteFdExactly(input.fd, expected); in TEST() 77 PatchUtils::Pipe(input.fd, output.fd, expected.size()); in TEST() 79 EXPECT_TRUE(FileMatchesContent(output.fd, expected.c_str(), expected.size())); in TEST() 97 APKMetaData expected; in TEST() local 98 EXPECT_TRUE(expected.ParseFromString(expectedMetadata)); in TEST() 101 expected.set_absolute_path(actual.absolute_path()); in TEST() 106 expected.SerializeToString(&expectedMetadata); in TEST()
|
/system/core/logd/ |
D | LogBufferTest.cpp | 51 static std::vector<std::string> CompareLoggerEntries(const logger_entry& expected, in CompareLoggerEntries() argument 54 if (!ignore_len && expected.len != result.len) { in CompareLoggerEntries() 56 StringPrintf("len: expected %" PRIu16 " vs %" PRIu16, expected.len, result.len)); in CompareLoggerEntries() 58 if (expected.hdr_size != result.hdr_size) { in CompareLoggerEntries() 59 errors.emplace_back(StringPrintf("hdr_size: %" PRIu16 " vs %" PRIu16, expected.hdr_size, in CompareLoggerEntries() 62 if (expected.pid != result.pid) { in CompareLoggerEntries() 64 StringPrintf("pid: expected %" PRIi32 " vs %" PRIi32, expected.pid, result.pid)); in CompareLoggerEntries() 66 if (expected.tid != result.tid) { in CompareLoggerEntries() 68 StringPrintf("tid: expected %" PRIu32 " vs %" PRIu32, expected.tid, result.tid)); in CompareLoggerEntries() 70 if (expected.sec != result.sec) { in CompareLoggerEntries() [all …]
|
/system/nvram/core/tests/ |
D | gtest_stubs.h | 40 #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/ |
D | expected.h | 263 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/libbase/ |
D | chrono_utils_test.cpp | 49 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()
|
D | logging_splitters_test.cpp | 148 std::vector expected = {ReduceToMaxSize(tag, long_string_x), ReduceToMaxSize(tag, long_string_y), in TEST() local 151 TestLogdChunkSplitter(tag, "", long_strings, expected); in TEST() 156 std::vector expected = { in TEST() local 162 auto long_strings = Join(expected, '\n'); in TEST() 164 TestLogdChunkSplitter("tag", "", long_strings, expected); in TEST() 195 std::vector expected = {first_string + '\n' + second_string, exact_string, in TEST() local 202 TestLogdChunkSplitter(tag, "", long_strings, expected); in TEST() 223 std::vector expected = { in TEST() local 231 TestLogdChunkSplitter(tag, file, long_strings, expected); in TEST() 249 std::vector expected = {ReduceToMaxSize(tag, long_file), ReduceToMaxSize(tag, long_file)}; in TEST() local [all …]
|
/system/libziparchive/cli-tests/ |
D | zipinfo.test | 11 expected-stdout: 23 expected-stdout: 30 expected-stdout: 37 expected-stdout: 44 expected-stdout: 51 expected-stdout:
|
/system/update_engine/ |
D | dynamic_partition_control_android_unittest.cc | 175 const PartitionSuffixSizes& expected) { in UpdatePartitionMetadata() argument 179 PartitionSuffixSizesToManifest(expected)); in UpdatePartitionMetadata() 184 const DeltaArchiveManifest& expected) { in UpdatePartitionMetadata() argument 186 source_manifest, update_manifest, MetadataMatches(expected)); in UpdatePartitionMetadata() 229 PartitionSuffixSizes expected{{S("system"), 2_GiB}, in TEST_P() local 235 UpdatePartitionMetadata(source_metadata, update_metadata, expected)); in TEST_P() 246 PartitionSuffixSizes expected{{S("system"), 2_GiB}, in TEST_P() local 252 UpdatePartitionMetadata(source_metadata, update_metadata, expected)); in TEST_P() 258 PartitionSuffixSizes expected{{T("system"), 2_GiB}, {T("vendor"), 1_GiB}}; in TEST_P() local 261 UpdatePartitionMetadata(source_metadata, update_metadata, expected)); in TEST_P() [all …]
|