summaryrefslogtreecommitdiff
path: root/logd/SerializedLogChunkTest.cpp
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2020-10-07 03:12:49 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2020-10-07 03:12:49 +0000
commit3f452134da2a4d4578b46a254f41dbd008a72f82 (patch)
tree8344596b0fdf26a8a3c7a2120a8f16dce0a855d0 /logd/SerializedLogChunkTest.cpp
parent4c7104ab2a797d20971833fb73fd3fbb0374e34e (diff)
parent340afd38cba548fc25392bf43bb179faefac89bc (diff)
Merge "logd: fix bad test assumptions"
Diffstat (limited to 'logd/SerializedLogChunkTest.cpp')
-rw-r--r--logd/SerializedLogChunkTest.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/logd/SerializedLogChunkTest.cpp b/logd/SerializedLogChunkTest.cpp
index 3b451252d..862c3fe31 100644
--- a/logd/SerializedLogChunkTest.cpp
+++ b/logd/SerializedLogChunkTest.cpp
@@ -99,13 +99,9 @@ TEST(SerializedLogChunk, three_logs) {
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF" // Timestamp
"\x0C\x00last message"; // msg_len + message
- for (size_t i = 0; i < chunk_size; ++i) {
- if (i < sizeof(expected_buffer_data)) {
- EXPECT_EQ(static_cast<uint8_t>(expected_buffer_data[i]), chunk.data()[i])
- << "position: " << i;
- } else {
- EXPECT_EQ(0, chunk.data()[i]) << "position: " << i;
- }
+ for (size_t i = 0; i < sizeof(expected_buffer_data); ++i) {
+ EXPECT_EQ(static_cast<uint8_t>(expected_buffer_data[i]), chunk.data()[i])
+ << "position: " << i;
}
}