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

Unified Diff: tools/gn/function_write_file_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/function_toolchain.cc ('k') | tools/gn/functions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/function_write_file_unittest.cc
diff --git a/tools/gn/function_write_file_unittest.cc b/tools/gn/function_write_file_unittest.cc
index e2e50e6b68c36601ade0bff9cb4be4b1c9f04fef..90bfa4c81eb8f6f46014a1a51e0536e4cb4b5351 100644
--- a/tools/gn/function_write_file_unittest.cc
+++ b/tools/gn/function_write_file_unittest.cc
@@ -18,7 +18,7 @@ bool CallWriteFile(Scope* scope,
Err err;
std::vector<Value> args;
- args.push_back(Value(NULL, filename));
+ args.push_back(Value(nullptr, filename));
args.push_back(data);
FunctionCallNode function_call;
@@ -39,7 +39,7 @@ TEST(WriteFile, WithData) {
setup.build_settings()->SetRootPath(temp_dir.path());
setup.build_settings()->SetBuildDir(SourceDir("//out/"));
- Value some_string(NULL, "some string contents");
+ Value some_string(nullptr, "some string contents");
// Should refuse to write files outside of the output dir.
EXPECT_FALSE(CallWriteFile(setup.scope(), "//in_root.txt", some_string));
@@ -55,9 +55,9 @@ TEST(WriteFile, WithData) {
EXPECT_EQ(some_string.string_value(), result_contents);
// Update the contents with a list of a string and a number.
- Value some_list(NULL, Value::LIST);
- some_list.list_value().push_back(Value(NULL, "line 1"));
- some_list.list_value().push_back(Value(NULL, static_cast<int64>(2)));
+ Value some_list(nullptr, Value::LIST);
+ some_list.list_value().push_back(Value(nullptr, "line 1"));
+ some_list.list_value().push_back(Value(nullptr, static_cast<int64>(2)));
EXPECT_TRUE(CallWriteFile(setup.scope(), "//out/foo.txt", some_list));
EXPECT_TRUE(base::ReadFileToString(foo_name, &result_contents));
EXPECT_EQ("line 1\n2\n", result_contents);
« no previous file with comments | « tools/gn/function_toolchain.cc ('k') | tools/gn/functions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698