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

Unified Diff: tools/gn/value_unittest.cc

Issue 798333005: tools/gn: Pass clang-modernize -use-nullptr over it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address Brett's review - revert some clang-format changes Created 6 years 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 | « tools/gn/value.cc ('k') | tools/gn/visibility_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/value_unittest.cc
diff --git a/tools/gn/value_unittest.cc b/tools/gn/value_unittest.cc
index 3fa990d4a28e915190c927f4fd36153f0a8c9b02..9cbdaa2dda3699cede165227ec355163c4bcd85c 100644
--- a/tools/gn/value_unittest.cc
+++ b/tools/gn/value_unittest.cc
@@ -7,7 +7,7 @@
#include "tools/gn/value.h"
TEST(Value, ToString) {
- Value strval(NULL, "hi\" $me\\you\\$\\\"");
+ Value strval(nullptr, "hi\" $me\\you\\$\\\"");
EXPECT_EQ("hi\" $me\\you\\$\\\"", strval.ToString(false));
EXPECT_EQ("\"hi\\\" \\$me\\you\\\\\\$\\\\\\\"\"", strval.ToString(true));
@@ -15,11 +15,11 @@ TEST(Value, ToString) {
EXPECT_EQ("<void>", Value().ToString(false));
// Test lists, bools, and ints.
- Value listval(NULL, Value::LIST);
- listval.list_value().push_back(Value(NULL, "hi\"me"));
- listval.list_value().push_back(Value(NULL, true));
- listval.list_value().push_back(Value(NULL, false));
- listval.list_value().push_back(Value(NULL, static_cast<int64>(42)));
+ Value listval(nullptr, Value::LIST);
+ listval.list_value().push_back(Value(nullptr, "hi\"me"));
+ listval.list_value().push_back(Value(nullptr, true));
+ listval.list_value().push_back(Value(nullptr, false));
+ listval.list_value().push_back(Value(nullptr, static_cast<int64>(42)));
// Printing lists always causes embedded strings to be quoted (ignoring the
// quote flag), or else they wouldn't make much sense.
EXPECT_EQ("[\"hi\\\"me\", true, false, 42]", listval.ToString(false));
@@ -28,11 +28,11 @@ TEST(Value, ToString) {
// Scopes.
TestWithScope setup;
Scope* scope = new Scope(setup.scope());
- Value scopeval(NULL, scoped_ptr<Scope>(scope));
+ Value scopeval(nullptr, scoped_ptr<Scope>(scope));
EXPECT_EQ("{ }", scopeval.ToString(false));
- scope->SetValue("a", Value(NULL, static_cast<int64>(42)), NULL);
- scope->SetValue("b", Value(NULL, "hello, world"), NULL);
+ scope->SetValue("a", Value(nullptr, static_cast<int64>(42)), nullptr);
+ scope->SetValue("b", Value(nullptr, "hello, world"), nullptr);
EXPECT_EQ("{\n a = 42\n b = \"hello, world\"\n}", scopeval.ToString(false));
}
« no previous file with comments | « tools/gn/value.cc ('k') | tools/gn/visibility_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698