update_engine: Replace NULL with nullptr
Replaced the usage of NULL with nullptr. This also makes it possible to
use standard gtest macros to compare pointers in Update Manager's unit tests.
So, there is no need in custom UMTEST_... macros which are replaced with the
gtest macros (see change in update_engine/update_manager/umtest_utils.h):
UMTEST_ASSERT_NULL(p) => ASSERT_EQ(nullptr, p)
UMTEST_ASSERT_NOT_NULL(p) => ASSERT_NE(nullptr, p)
UMTEST_EXPECT_NULL(p) => EXPECT_EQ(nullptr, p)
UMTEST_EXPECT_NOT_NULL(p) => EXPECT_NE(nullptr, p)
BUG=None
TEST=FEATURES=test emerge-link update_engine
USE="clang asan" FEATURES=test emerge-link update_engine
Change-Id: I77a42a1e9ce992bb2f9f263db5cf75fe6110a4ec
Reviewed-on: https://chromium-review.googlesource.com/215136
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Reviewed-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
diff --git a/filesystem_copier_action_unittest.cc b/filesystem_copier_action_unittest.cc
index 024b743..131feb8 100644
--- a/filesystem_copier_action_unittest.cc
+++ b/filesystem_copier_action_unittest.cc
@@ -132,8 +132,8 @@
string a_loop_file;
string b_loop_file;
- if (!(utils::MakeTempFile("a_loop_file.XXXXXX", &a_loop_file, NULL) &&
- utils::MakeTempFile("b_loop_file.XXXXXX", &b_loop_file, NULL))) {
+ if (!(utils::MakeTempFile("a_loop_file.XXXXXX", &a_loop_file, nullptr) &&
+ utils::MakeTempFile("b_loop_file.XXXXXX", &b_loop_file, nullptr))) {
ADD_FAILURE();
return false;
}
@@ -406,9 +406,9 @@
TEST_F(FilesystemCopierActionTest, RunAsRootDetermineFilesystemSizeTest) {
string img;
- EXPECT_TRUE(utils::MakeTempFile("img.XXXXXX", &img, NULL));
+ EXPECT_TRUE(utils::MakeTempFile("img.XXXXXX", &img, nullptr));
ScopedPathUnlinker img_unlinker(img);
- CreateExtImageAtPath(img, NULL);
+ CreateExtImageAtPath(img, nullptr);
// Extend the "partition" holding the file system from 10MiB to 20MiB.
EXPECT_EQ(0, System(base::StringPrintf(
"dd if=/dev/zero of=%s seek=20971519 bs=1 count=1",