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

Side by Side Diff: mojo/public/cpp/environment/tests/logging_unittest.cc

Issue 612243002: Mojo: NULL -> nullptr in mojo/public/cpp outside of bindings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « mojo/public/cpp/environment/lib/environment.cc ('k') | mojo/public/cpp/system/buffer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdlib.h> 5 #include <stdlib.h>
6 6
7 #include <sstream> 7 #include <sstream>
8 #include <string> 8 #include <string>
9 9
10 #include "mojo/public/cpp/environment/environment.h" 10 #include "mojo/public/cpp/environment/environment.h"
(...skipping 13 matching lines...) Expand all
24 int member; 24 int member;
25 }; 25 };
26 26
27 bool DcheckTestHelper(bool* was_called) { 27 bool DcheckTestHelper(bool* was_called) {
28 *was_called = true; 28 *was_called = true;
29 return false; 29 return false;
30 } 30 }
31 31
32 class LoggingTest : public testing::Test { 32 class LoggingTest : public testing::Test {
33 public: 33 public:
34 LoggingTest() : environment_(NULL, &kMockLogger) { 34 LoggingTest() : environment_(nullptr, &kMockLogger) {
35 minimum_log_level_ = MOJO_LOG_LEVEL_INFO; 35 minimum_log_level_ = MOJO_LOG_LEVEL_INFO;
36 ResetMockLogger(); 36 ResetMockLogger();
37 } 37 }
38 virtual ~LoggingTest() {} 38 virtual ~LoggingTest() {}
39 39
40 protected: 40 protected:
41 // Note: Does not reset |minimum_log_level_|. 41 // Note: Does not reset |minimum_log_level_|.
42 static void ResetMockLogger() { 42 static void ResetMockLogger() {
43 log_message_was_called_ = false; 43 log_message_was_called_ = false;
44 last_log_level_ = MOJO_LOG_LEVEL_INFO; 44 last_log_level_ = MOJO_LOG_LEVEL_INFO;
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 ResetMockLogger(); 465 ResetMockLogger();
466 466
467 // Also try to make sure that we parenthesize the condition properly. 467 // Also try to make sure that we parenthesize the condition properly.
468 bool x = true; 468 bool x = true;
469 MOJO_DCHECK(false || x) << "hello"; 469 MOJO_DCHECK(false || x) << "hello";
470 EXPECT_FALSE(log_message_was_called()); 470 EXPECT_FALSE(log_message_was_called());
471 } 471 }
472 472
473 } // namespace 473 } // namespace
474 } // namespace mojo 474 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/environment/lib/environment.cc ('k') | mojo/public/cpp/system/buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698