Home
last modified time | relevance | path

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

12345678

/system/unwinding/libunwindstack/tests/
DDwarfCfaLogTest.cpp84 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/
Dueventd_parser_test.cpp28 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 …]
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/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 …]
/system/chre/apps/test/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()
71 uint8_t expected[arrayLength(kMemcpySrc)]; in testMemcpy() local
72 uint8_t actual[arrayLength(expected)]; in testMemcpy()
76 ::memset(expected, kUnsetValue, sizeof(expected)); in testMemcpy()
79 ::memcpy(expected, kMemcpySrc, kLenToCopy); in testMemcpy()
[all …]
/system/libbase/include/android-base/
Dexpected.h54 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/netd/server/
DBandwidthControllerTest.cpp93 ExpectedIptablesCommands expected = {{ V4, expectedList }}; in expectSetupCommands() local
95 expected.push_back({ V4V6, expectedClean }); in expectSetupCommands()
97 expected.push_back({ V4V6, expectedFlush }); in expectSetupCommands()
99 expected.push_back({ V4V6, expectedAccounting }); in expectSetupCommands()
102 expectIptablesRestoreCommands(expected); in expectSetupCommands()
251 std::string expected = { in TEST_F() local
257 {V4, expected}, in TEST_F()
258 {V6, expected}, in TEST_F()
302 std::vector<std::string> expected = makeInterfaceQuotaCommands(iface, 1, kOldQuota); in TEST_F() local
305 expectIptablesRestoreCommands(expected); in TEST_F()
[all …]
DControllersTest.cpp72 ExpectedIptablesCommands expected = { in TEST_F() local
196 expectIptablesRestoreCommands(expected); in TEST_F()
204 for (size_t i = 0; i < expected.size(); i++) { in TEST_F()
222 ASSERT_NE(std::string::npos, expected[7].second.find("*filter\n-S OUTPUT\n")); in TEST_F()
232 ASSERT_NE(std::string::npos, expected[9].second.find("*filter\n-S OUTPUT\n")); in TEST_F()
237 DELETE_SUBSTRING("-A OUTPUT -j oem_out\n", expected[10].second); in TEST_F()
238 DELETE_SUBSTRING("-A OUTPUT -j st_OUTPUT\n", expected[10].second); in TEST_F()
242 ASSERT_NE(std::string::npos, expected[13].second.find("*mangle\n-S POSTROUTING\n")); in TEST_F()
251 DELETE_SUBSTRING("-A POSTROUTING -j oem_mangle_post\n", expected[14].second); in TEST_F()
252 DELETE_SUBSTRING("-A POSTROUTING -j bw_mangle_POSTROUTING\n", expected[14].second); in TEST_F()
[all …]
DIdletimerControllerTest.cpp61 auto expected = makeAddRemoveCommands(true); in TEST_F() local
63 expectIptablesRestoreCommands(expected); in TEST_F()
66 expectIptablesRestoreCommands(expected); in TEST_F()
68 expected = makeAddRemoveCommands(false); in TEST_F()
70 expectIptablesRestoreCommands(expected); in TEST_F()
73 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/testing/gtest_extras/tests/
DSystemTests.cpp273 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/update_engine/payload_generator/
Dextent_ranges_unittest.cc36 const uint64_t* expected, in ExpectRangeEq() argument
41 blocks += expected[i]; in ExpectRangeEq()
49 ASSERT_EQ(expected[i], it->start_block()) << "line: " << line; in ExpectRangeEq()
50 ASSERT_EQ(expected[i + 1], it->num_blocks()) << "line: " << line; in ExpectRangeEq()
129 static constexpr uint64_t expected[] = {}; in TEST() local
131 ASSERT_NO_FATAL_FAILURE(ExpectRangeEq(ranges, expected, 0, __LINE__)); in TEST()
135 static constexpr uint64_t expected[] = {}; in TEST() local
137 ASSERT_NO_FATAL_FAILURE(ExpectRangeEq(ranges, expected, 0, __LINE__)); in TEST()
146 static constexpr uint64_t expected[] = {0, 2, 3, 1}; in TEST() local
147 ASSERT_RANGE_EQ(ranges, expected); in TEST()
[all …]
/system/chre/chpp/test/
Dpacket_util.cpp301 const ChppTransportHeader &expected) { in comparePacketHeader() argument
302 EXPECT_EQ(rx.flags, expected.flags); in comparePacketHeader()
303 EXPECT_EQ(rx.packetCode, expected.packetCode); in comparePacketHeader()
304 EXPECT_EQ(rx.ackSeq, expected.ackSeq); in comparePacketHeader()
305 EXPECT_EQ(rx.seq, expected.seq); in comparePacketHeader()
306 EXPECT_EQ(rx.length, expected.length); in comparePacketHeader()
308 return (memcmp(&rx, &expected, sizeof(rx)) == 0); in comparePacketHeader()
312 const ChppEmptyPacket &expected) { in comparePacket() argument
313 EXPECT_EQ(received.size(), sizeof(expected)); in comparePacket()
314 if (received.size() == sizeof(expected)) { in comparePacket()
[all …]
/system/logging/logd/
DLogBufferTest.cpp41 static std::vector<std::string> CompareLoggerEntries(const logger_entry& expected, in CompareLoggerEntries() argument
44 if (!ignore_len && expected.len != result.len) { in CompareLoggerEntries()
46 StringPrintf("len: expected %" PRIu16 " vs %" PRIu16, expected.len, result.len)); in CompareLoggerEntries()
48 if (expected.hdr_size != result.hdr_size) { in CompareLoggerEntries()
49 errors.emplace_back(StringPrintf("hdr_size: %" PRIu16 " vs %" PRIu16, expected.hdr_size, in CompareLoggerEntries()
52 if (expected.pid != result.pid) { in CompareLoggerEntries()
54 StringPrintf("pid: expected %" PRIi32 " vs %" PRIi32, expected.pid, result.pid)); in CompareLoggerEntries()
56 if (expected.tid != result.tid) { in CompareLoggerEntries()
58 StringPrintf("tid: expected %" PRIu32 " vs %" PRIu32, expected.tid, result.tid)); in CompareLoggerEntries()
60 if (expected.sec != result.sec) { in CompareLoggerEntries()
[all …]
/system/core/fastboot/
Dsuper_flash_helper_test.cpp70 std::string expected(get_file_size(real_super_fd), '\0'); in TEST() local
71 ASSERT_FALSE(expected.empty()); in TEST()
72 ASSERT_TRUE(android::base::ReadFully(real_super_fd, expected.data(), expected.size())); in TEST()
81 ASSERT_LE(actual.size(), expected.size()); in TEST()
83 ASSERT_EQ(actual[i], expected[i]) << "byte mismatch at position " << i; in TEST()
85 for (size_t i = actual.size(); i < expected.size(); i++) { in TEST()
86 ASSERT_EQ(expected[i], 0) << "byte mismatch at position " << i; in TEST()
/system/libziparchive/
Dzip_writer_test.cc26 static ::testing::AssertionResult AssertFileEntryContentsEq(const std::string& expected,
51 const char* expected = ""; in TEST_F() local
66 EXPECT_EQ(strlen(expected), data.compressed_length); in TEST_F()
67 ASSERT_EQ(strlen(expected), data.uncompressed_length); in TEST_F()
68 ASSERT_TRUE(AssertFileEntryContentsEq(expected, handle, &data)); in TEST_F()
76 const char* expected = ""; in TEST_F() local
91 ASSERT_EQ(strlen(expected), data.uncompressed_length); in TEST_F()
92 ASSERT_TRUE(AssertFileEntryContentsEq(expected, handle, &data)); in TEST_F()
100 const char* expected = "hello"; in TEST_F() local
117 EXPECT_EQ(strlen(expected), data.compressed_length); in TEST_F()
[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/libziparchive/cli-tests/
Dunzip.test12 expected-stdout:
24 expected-stdout:
35 expected-stdout:
47 expected-stdout:
59 expected-stdout:
71 expected-stdout:
78 expected-stdout:
86 expected-stdout:
115 expected-stdout:
122 expected-stdout:
[all …]
Dzipinfo.test11 expected-stdout:
23 expected-stdout:
30 expected-stdout:
37 expected-stdout:
44 expected-stdout:
51 expected-stdout:
/system/libbase/
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()
Dlogging_splitters_test.cpp148 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 …]
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/hardware/interfaces/suspend/1.0/default/
DSystemSuspendUnitTest.cpp263 void checkSleepTime(std::chrono::milliseconds expected) { in checkSleepTime() argument
269 ASSERT_EQ(actual.count(), expected.count()) << "incorrect sleep time"; in checkSleepTime()
1393 void checkSuspendInfo(const SuspendInfo& expected) { in checkSuspendInfo() argument
1397 ASSERT_EQ(actual.suspendAttemptCount, expected.suspendAttemptCount); in checkSuspendInfo()
1398 ASSERT_EQ(actual.failedSuspendCount, expected.failedSuspendCount); in checkSuspendInfo()
1399 ASSERT_EQ(actual.shortSuspendCount, expected.shortSuspendCount); in checkSuspendInfo()
1400 ASSERT_EQ(actual.suspendTimeMillis, expected.suspendTimeMillis); in checkSuspendInfo()
1401 ASSERT_EQ(actual.shortSuspendTimeMillis, expected.shortSuspendTimeMillis); in checkSuspendInfo()
1402 ASSERT_EQ(actual.suspendOverheadTimeMillis, expected.suspendOverheadTimeMillis); in checkSuspendInfo()
1403 ASSERT_EQ(actual.failedSuspendOverheadTimeMillis, expected.failedSuspendOverheadTimeMillis); in checkSuspendInfo()
[all …]
/system/timezone/input_tools/android/tzlookup_generator/src/test/java/com/android/libcore/timezone/tzlookup/
DZoneTabFileTest.java92 @Test(expected = ParseException.class)
107 Map<String, List<String>> expected = new HashMap<>(); in createCountryToOlsonIdsMap() local
108 addIds(expected, "GB", "Europe/London"); in createCountryToOlsonIdsMap()
109 addIds(expected, "US", "America/New_York", "America/Los_Angeles"); in createCountryToOlsonIdsMap()
113 assertEquals(expected, actual); in createCountryToOlsonIdsMap()
/system/update_engine/aosp/
Ddynamic_partition_control_android_unittest.cc182 const PartitionSuffixSizes& expected) { in UpdatePartitionMetadata() argument
186 PartitionSuffixSizesToManifest(expected)); in UpdatePartitionMetadata()
191 const DeltaArchiveManifest& expected) { in UpdatePartitionMetadata() argument
193 source_manifest, update_manifest, MetadataMatches(expected)); in UpdatePartitionMetadata()
238 PartitionSuffixSizes expected{{S("system"), 2_GiB}, in TEST_P() local
244 UpdatePartitionMetadata(source_metadata, update_metadata, expected)); in TEST_P()
255 PartitionSuffixSizes expected{{S("system"), 2_GiB}, in TEST_P() local
261 UpdatePartitionMetadata(source_metadata, update_metadata, expected)); in TEST_P()
267 PartitionSuffixSizes expected{{T("system"), 2_GiB}, {T("vendor"), 1_GiB}}; in TEST_P() local
270 UpdatePartitionMetadata(source_metadata, update_metadata, expected)); in TEST_P()
[all …]

12345678