Merge "logd: fix bad test assumptions" am: 3f452134da

Original change: https://android-review.googlesource.com/c/platform/system/core/+/1452015

Change-Id: I4988c897ab5e9c5e5dc9f2d6d3040e56d89abf7d
This commit is contained in:
Treehugger Robot 2020-10-07 07:53:32 +00:00 committed by Automerger Merge Worker
commit c4b150d176

View file

@ -99,13 +99,9 @@ TEST(SerializedLogChunk, three_logs) {
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF" // Timestamp "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF" // Timestamp
"\x0C\x00last message"; // msg_len + message "\x0C\x00last message"; // msg_len + message
for (size_t i = 0; i < chunk_size; ++i) { for (size_t i = 0; i < sizeof(expected_buffer_data); ++i) {
if (i < sizeof(expected_buffer_data)) { EXPECT_EQ(static_cast<uint8_t>(expected_buffer_data[i]), chunk.data()[i])
EXPECT_EQ(static_cast<uint8_t>(expected_buffer_data[i]), chunk.data()[i]) << "position: " << i;
<< "position: " << i;
} else {
EXPECT_EQ(0, chunk.data()[i]) << "position: " << i;
}
} }
} }