Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1545)

Unified Diff: util/thread/thread_log_messages_test.cc

Issue 1047813002: Fix ThreadLogMessages’ test (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/thread/thread_log_messages_test.cc
diff --git a/util/thread/thread_log_messages_test.cc b/util/thread/thread_log_messages_test.cc
index f23928709122c94e424ef67d8143db5da553d100..4ffe1fc8e950ba5b69717290c460e633409b7580 100644
--- a/util/thread/thread_log_messages_test.cc
+++ b/util/thread/thread_log_messages_test.cc
@@ -143,7 +143,7 @@ class LoggingTestThread : public Thread {
ThreadLogMessages thread_log_messages;
std::vector<std::string> expected_messages;
- for (int index = start_; index <= start_ + count_; ++index) {
+ for (int index = start_; index < start_ + count_; ++index) {
std::string message = base::StringPrintf("message %d", index);
expected_messages.push_back(message);
LOG(WARNING) << message;
@@ -152,7 +152,7 @@ class LoggingTestThread : public Thread {
const std::vector<std::string>& log_messages =
thread_log_messages.log_messages();
- ASSERT_EQ(expected_messages.size(), log_messages.size());
+ ASSERT_EQ(static_cast<size_t>(count_), log_messages.size());
for (size_t index = 0; index < log_messages.size(); ++index) {
EXPECT_EQ(expected_messages[index], MessageString(log_messages[index]))
<< "thread_number_ " << thread_number_ << ", index " << index;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698