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

Side by Side Diff: tests/HashTest.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/GradientTest.cpp ('k') | tests/ImageCacheTest.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 2015 Google Inc. 2 * Copyright 2015 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 "SkChecksum.h" 8 #include "SkChecksum.h"
9 #include "SkString.h" 9 #include "SkString.h"
10 #include "SkTHash.h" 10 #include "SkTHash.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 REPORTER_ASSERT(r, set.count() == 1); 87 REPORTER_ASSERT(r, set.count() == 1);
88 88
89 set.reset(); 89 set.reset();
90 REPORTER_ASSERT(r, set.count() == 0); 90 REPORTER_ASSERT(r, set.count() == 0);
91 } 91 }
92 92
93 namespace { 93 namespace {
94 94
95 class CopyCounter { 95 class CopyCounter {
96 public: 96 public:
97 CopyCounter() : fID(0), fCounter(NULL) {} 97 CopyCounter() : fID(0), fCounter(nullptr) {}
98 98
99 CopyCounter(uint32_t id, uint32_t* counter) : fID(id), fCounter(counter) {} 99 CopyCounter(uint32_t id, uint32_t* counter) : fID(id), fCounter(counter) {}
100 100
101 CopyCounter(const CopyCounter& other) 101 CopyCounter(const CopyCounter& other)
102 : fID(other.fID) 102 : fID(other.fID)
103 , fCounter(other.fCounter) { 103 , fCounter(other.fCounter) {
104 SkASSERT(fCounter); 104 SkASSERT(fCounter);
105 *fCounter += 1; 105 *fCounter += 1;
106 } 106 }
107 107
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 set.add(copyCounter2); 145 set.add(copyCounter2);
146 REPORTER_ASSERT(r, globalCounter == 3); 146 REPORTER_ASSERT(r, globalCounter == 3);
147 REPORTER_ASSERT(r, set.contains(copyCounter1)); 147 REPORTER_ASSERT(r, set.contains(copyCounter1));
148 REPORTER_ASSERT(r, set.contains(copyCounter2)); 148 REPORTER_ASSERT(r, set.contains(copyCounter2));
149 REPORTER_ASSERT(r, globalCounter == 3); 149 REPORTER_ASSERT(r, globalCounter == 3);
150 set.add(copyCounter1); 150 set.add(copyCounter1);
151 set.add(copyCounter2); 151 set.add(copyCounter2);
152 // We allow copies for same-value adds for now. 152 // We allow copies for same-value adds for now.
153 REPORTER_ASSERT(r, globalCounter == 5); 153 REPORTER_ASSERT(r, globalCounter == 5);
154 } 154 }
OLDNEW
« no previous file with comments | « tests/GradientTest.cpp ('k') | tests/ImageCacheTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698