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

Unified Diff: tests/ImageGeneratorTest.cpp

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/ImageFilterTest.cpp ('k') | tests/ImageIsOpaqueTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ImageGeneratorTest.cpp
diff --git a/tests/ImageGeneratorTest.cpp b/tests/ImageGeneratorTest.cpp
index 1846f5762ebb65cf92839ddae5f9fe635885226b..d6f546acb18ffa6a3881736375680277d7f711f0 100644
--- a/tests/ImageGeneratorTest.cpp
+++ b/tests/ImageGeneratorTest.cpp
@@ -14,7 +14,7 @@ static bool gMyFactoryWasCalled;
static SkImageGenerator* my_factory(SkData*) {
gMyFactoryWasCalled = true;
- return NULL;
+ return nullptr;
}
static void test_imagegenerator_factory(skiatest::Reporter* reporter) {
@@ -27,14 +27,14 @@ static void test_imagegenerator_factory(skiatest::Reporter* reporter) {
REPORTER_ASSERT(reporter, !gMyFactoryWasCalled);
gen = SkImageGenerator::NewFromEncoded(data);
- REPORTER_ASSERT(reporter, NULL == gen);
+ REPORTER_ASSERT(reporter, nullptr == gen);
REPORTER_ASSERT(reporter, !gMyFactoryWasCalled);
// Test is racy, in that it hopes no other thread is changing this global...
SkGraphics::ImageGeneratorFromEncodedFactory prev =
SkGraphics::SetImageGeneratorFromEncodedFactory(my_factory);
gen = SkImageGenerator::NewFromEncoded(data);
- REPORTER_ASSERT(reporter, NULL == gen);
+ REPORTER_ASSERT(reporter, nullptr == gen);
REPORTER_ASSERT(reporter, gMyFactoryWasCalled);
SkGraphics::SetImageGeneratorFromEncodedFactory(prev);
}
@@ -50,16 +50,16 @@ DEF_TEST(ImageGenerator, reporter) {
sizes[0] = SkISize::Make(200, 200);
sizes[1] = SkISize::Make(100, 100);
sizes[2] = SkISize::Make( 50, 50);
- void* planes[3] = { NULL };
+ void* planes[3] = { nullptr };
size_t rowBytes[3] = { 0 };
SkYUVColorSpace colorSpace;
// Check that the YUV decoding API does not cause any crashes
- ig.getYUV8Planes(sizes, NULL, NULL, &colorSpace);
- ig.getYUV8Planes(sizes, NULL, NULL, NULL);
- ig.getYUV8Planes(sizes, planes, NULL, NULL);
- ig.getYUV8Planes(sizes, NULL, rowBytes, NULL);
- ig.getYUV8Planes(sizes, planes, rowBytes, NULL);
+ ig.getYUV8Planes(sizes, nullptr, nullptr, &colorSpace);
+ ig.getYUV8Planes(sizes, nullptr, nullptr, nullptr);
+ ig.getYUV8Planes(sizes, planes, nullptr, nullptr);
+ ig.getYUV8Planes(sizes, nullptr, rowBytes, nullptr);
+ ig.getYUV8Planes(sizes, planes, rowBytes, nullptr);
ig.getYUV8Planes(sizes, planes, rowBytes, &colorSpace);
int dummy;
« no previous file with comments | « tests/ImageFilterTest.cpp ('k') | tests/ImageIsOpaqueTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698