From 4dd2785f056f885e6dc9a022b867f511c2e83c3c Mon Sep 17 00:00:00 2001 From: Christopher Ferris Date: Tue, 8 Nov 2016 14:05:18 -0800 Subject: [PATCH] Fix error case to print newlines properly. Bug: 32640542 Test: Built and ran on a failing device. Change-Id: I81a578af7608c741819062bd54aa8e348a621b83 --- tests/sys_prctl_test.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/sys_prctl_test.cpp b/tests/sys_prctl_test.cpp index 8fdd28fb7..205db86b0 100644 --- a/tests/sys_prctl_test.cpp +++ b/tests/sys_prctl_test.cpp @@ -53,7 +53,8 @@ TEST(sys_prctl, bug_20017123) { ASSERT_EQ(2, sscanf(lines[i].c_str(), "%" SCNxPTR "-%" SCNxPTR " ", &start, &end)) << "Failed to parse line: " << lines[i]; // 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_end = end; }