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

Side by Side Diff: tests/XfermodeTest.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, 3 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 unified diff | Download patch
« no previous file with comments | « tests/Writer32Test.cpp ('k') | tests/YUVCacheTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkColor.h" 8 #include "SkColor.h"
9 #include "SkXfermode.h" 9 #include "SkXfermode.h"
10 #include "Test.h" 10 #include "Test.h"
(...skipping 17 matching lines...) Expand all
28 REPORTER_ASSERT(reporter, xfer->asMode(&reportedMode)); 28 REPORTER_ASSERT(reporter, xfer->asMode(&reportedMode));
29 REPORTER_ASSERT(reporter, reportedMode == mode); 29 REPORTER_ASSERT(reporter, reportedMode == mode);
30 xfer->unref(); 30 xfer->unref();
31 } else { 31 } else {
32 REPORTER_ASSERT(reporter, SkXfermode::kSrcOver_Mode == mode); 32 REPORTER_ASSERT(reporter, SkXfermode::kSrcOver_Mode == mode);
33 } 33 }
34 } 34 }
35 } 35 }
36 36
37 static void test_IsMode(skiatest::Reporter* reporter) { 37 static void test_IsMode(skiatest::Reporter* reporter) {
38 REPORTER_ASSERT(reporter, SkXfermode::IsMode(NULL, 38 REPORTER_ASSERT(reporter, SkXfermode::IsMode(nullptr,
39 SkXfermode::kSrcOver_Mode)); 39 SkXfermode::kSrcOver_Mode));
40 40
41 for (int i = 0; i <= SkXfermode::kLastMode; ++i) { 41 for (int i = 0; i <= SkXfermode::kLastMode; ++i) {
42 SkXfermode::Mode mode = (SkXfermode::Mode)i; 42 SkXfermode::Mode mode = (SkXfermode::Mode)i;
43 43
44 SkXfermode* xfer = SkXfermode::Create(mode); 44 SkXfermode* xfer = SkXfermode::Create(mode);
45 REPORTER_ASSERT(reporter, SkXfermode::IsMode(xfer, mode)); 45 REPORTER_ASSERT(reporter, SkXfermode::IsMode(xfer, mode));
46 SkSafeUnref(xfer); 46 SkSafeUnref(xfer);
47 47
48 if (SkXfermode::kSrcOver_Mode != mode) { 48 if (SkXfermode::kSrcOver_Mode != mode) {
49 REPORTER_ASSERT(reporter, !SkXfermode::IsMode(NULL, mode)); 49 REPORTER_ASSERT(reporter, !SkXfermode::IsMode(nullptr, mode));
50 } 50 }
51 } 51 }
52 } 52 }
53 53
54 DEF_TEST(Xfermode, reporter) { 54 DEF_TEST(Xfermode, reporter) {
55 test_asMode(reporter); 55 test_asMode(reporter);
56 test_IsMode(reporter); 56 test_IsMode(reporter);
57 } 57 }
OLDNEW
« no previous file with comments | « tests/Writer32Test.cpp ('k') | tests/YUVCacheTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698