liblog: use EXPECTED_STREQ for strings
These tests are flaky, but we're not seeing what the failure strings are. Bug: 142041379 Test: force a failure and see the right error message Change-Id: Icd7777e5c309cac3b98ce65925980965a3cc3753
This commit is contained in:
parent
3d8fbfada6
commit
0de52e92dc
1 changed files with 2 additions and 3 deletions
|
@ -2664,8 +2664,7 @@ static void create_android_logger(const char* (*fn)(uint32_t tag,
|
|||
print_barrier();
|
||||
}
|
||||
EXPECT_EQ(0, buffer_to_string);
|
||||
EXPECT_EQ(strlen(expected_string), strlen(msgBuf));
|
||||
EXPECT_EQ(0, strcmp(expected_string, msgBuf));
|
||||
EXPECT_STREQ(expected_string, msgBuf);
|
||||
}
|
||||
|
||||
EXPECT_EQ(1, count);
|
||||
|
@ -2858,7 +2857,7 @@ static ssize_t __pmsg_fn(log_id_t logId, char prio, const char* filename,
|
|||
EXPECT_EQ(ANDROID_LOG_VERBOSE, prio);
|
||||
EXPECT_FALSE(NULL == strstr(__pmsg_file, filename));
|
||||
EXPECT_EQ(len, sizeof(max_payload_buf));
|
||||
EXPECT_EQ(0, strcmp(max_payload_buf, buf));
|
||||
EXPECT_STREQ(max_payload_buf, buf);
|
||||
|
||||
++signaled;
|
||||
if ((len != sizeof(max_payload_buf)) || strcmp(max_payload_buf, buf)) {
|
||||
|
|
Loading…
Reference in a new issue