summaryrefslogtreecommitdiffstats
path: root/libutils/tests/Looper_test.cpp
diff options
context:
space:
mode:
authorYi Kong <yikong@google.com>2018-07-17 10:06:10 -0700
committerandroid-build-merger <android-build-merger@google.com>2018-07-17 10:06:10 -0700
commit2a6a58a818d5cc38cb624a6a4154a93166d01f18 (patch)
treea7a612b80717c9ed88e880fc9f160fa9b1b3ae25 /libutils/tests/Looper_test.cpp
parent6286088afee20c7c4cfe125cbddd3a13adc5fd15 (diff)
parentab3203f38363e7b5fadfe281ed8870be6044b674 (diff)
downloadsystem_core-2a6a58a818d5cc38cb624a6a4154a93166d01f18.tar.gz
system_core-2a6a58a818d5cc38cb624a6a4154a93166d01f18.tar.bz2
system_core-2a6a58a818d5cc38cb624a6a4154a93166d01f18.zip
Merge "[libutils] Modernize codebase by replacing NULL with nullptr"
am: ab3203f383 Change-Id: I5c2aaaea705a3ab82a5ad999f813e4cc22e63401
Diffstat (limited to 'libutils/tests/Looper_test.cpp')
-rw-r--r--libutils/tests/Looper_test.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/libutils/tests/Looper_test.cpp b/libutils/tests/Looper_test.cpp
index 8ebcfaf5a..2282ced3d 100644
--- a/libutils/tests/Looper_test.cpp
+++ b/libutils/tests/Looper_test.cpp
@@ -339,7 +339,7 @@ TEST_F(LooperTest, PollOnce_WhenNonCallbackFdIsSignalled_ReturnsIdent) {
Pipe pipe;
pipe.writeSignal();
- mLooper->addFd(pipe.receiveFd, expectedIdent, Looper::EVENT_INPUT, NULL, expectedData);
+ mLooper->addFd(pipe.receiveFd, expectedIdent, Looper::EVENT_INPUT, nullptr, expectedData);
StopWatch stopWatch("pollOnce");
int fd;
@@ -364,7 +364,7 @@ TEST_F(LooperTest, PollOnce_WhenNonCallbackFdIsSignalled_ReturnsIdent) {
TEST_F(LooperTest, AddFd_WhenCallbackAdded_ReturnsOne) {
Pipe pipe;
- int result = mLooper->addFd(pipe.receiveFd, 0, Looper::EVENT_INPUT, NULL, NULL);
+ int result = mLooper->addFd(pipe.receiveFd, 0, Looper::EVENT_INPUT, nullptr, nullptr);
EXPECT_EQ(1, result)
<< "addFd should return 1 because FD was added";
@@ -372,7 +372,7 @@ TEST_F(LooperTest, AddFd_WhenCallbackAdded_ReturnsOne) {
TEST_F(LooperTest, AddFd_WhenIdentIsNegativeAndCallbackIsNull_ReturnsError) {
Pipe pipe;
- int result = mLooper->addFd(pipe.receiveFd, -1, Looper::EVENT_INPUT, NULL, NULL);
+ int result = mLooper->addFd(pipe.receiveFd, -1, Looper::EVENT_INPUT, nullptr, nullptr);
EXPECT_EQ(-1, result)
<< "addFd should return -1 because arguments were invalid";
@@ -381,7 +381,7 @@ TEST_F(LooperTest, AddFd_WhenIdentIsNegativeAndCallbackIsNull_ReturnsError) {
TEST_F(LooperTest, AddFd_WhenNoCallbackAndAllowNonCallbacksIsFalse_ReturnsError) {
Pipe pipe;
sp<Looper> looper = new Looper(false /*allowNonCallbacks*/);
- int result = looper->addFd(pipe.receiveFd, 0, 0, NULL, NULL);
+ int result = looper->addFd(pipe.receiveFd, 0, 0, nullptr, nullptr);
EXPECT_EQ(-1, result)
<< "addFd should return -1 because arguments were invalid";