Fix error case to print newlines properly.

Bug: 32640542

Test: Built and ran on a failing device.
Change-Id: I81a578af7608c741819062bd54aa8e348a621b83
This commit is contained in:
Christopher Ferris 2016-11-08 14:05:18 -08:00
parent 8bfaac0f8a
commit 4dd2785f05
1 changed files with 2 additions and 1 deletions

View File

@ -53,7 +53,8 @@ TEST(sys_prctl, bug_20017123) {
ASSERT_EQ(2, sscanf(lines[i].c_str(), "%" SCNxPTR "-%" SCNxPTR " ", &start, &end)) ASSERT_EQ(2, sscanf(lines[i].c_str(), "%" SCNxPTR "-%" SCNxPTR " ", &start, &end))
<< "Failed to parse line: " << lines[i]; << "Failed to parse line: " << lines[i];
// This will never fail on the first line, so no need to do any special checking. // This will never fail on the first line, so no need to do any special checking.
ASSERT_GE(start, last_end) << "Overlapping map detected:\n" << lines[i -1] << lines[i]; ASSERT_GE(start, last_end)
<< "Overlapping map detected:\n" << lines[i -1] << '\n' << lines[i] << '\n';
last_start = start; last_start = start;
last_end = end; last_end = end;
} }