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

Side by Side Diff: tests/RecordPatternTest.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/RecordOptsTest.cpp ('k') | tests/RecordReplaceDrawTest.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 "Test.h" 8 #include "Test.h"
9 9
10 #include "SkRecord.h" 10 #include "SkRecord.h"
(...skipping 17 matching lines...) Expand all
28 28
29 // Build up a save-clip-restore block. The pattern will match only it's com plete. 29 // Build up a save-clip-restore block. The pattern will match only it's com plete.
30 recorder.save(); 30 recorder.save();
31 REPORTER_ASSERT(r, !pattern.match(&record, 0)); 31 REPORTER_ASSERT(r, !pattern.match(&record, 0));
32 32
33 recorder.clipRect(SkRect::MakeWH(300, 200)); 33 recorder.clipRect(SkRect::MakeWH(300, 200));
34 REPORTER_ASSERT(r, !pattern.match(&record, 0)); 34 REPORTER_ASSERT(r, !pattern.match(&record, 0));
35 35
36 recorder.restore(); 36 recorder.restore();
37 REPORTER_ASSERT(r, pattern.match(&record, 0)); 37 REPORTER_ASSERT(r, pattern.match(&record, 0));
38 REPORTER_ASSERT(r, pattern.first<Save>() != NULL); 38 REPORTER_ASSERT(r, pattern.first<Save>() != nullptr);
39 REPORTER_ASSERT(r, pattern.second<ClipRect>() != NULL); 39 REPORTER_ASSERT(r, pattern.second<ClipRect>() != nullptr);
40 REPORTER_ASSERT(r, pattern.third<Restore>() != NULL); 40 REPORTER_ASSERT(r, pattern.third<Restore>() != nullptr);
41 } 41 }
42 42
43 DEF_TEST(RecordPattern_StartingIndex, r) { 43 DEF_TEST(RecordPattern_StartingIndex, r) {
44 SaveClipRectRestore pattern; 44 SaveClipRectRestore pattern;
45 45
46 SkRecord record; 46 SkRecord record;
47 SkRecorder recorder(&record, 1920, 1200); 47 SkRecorder recorder(&record, 1920, 1200);
48 48
49 // There will be two save-clipRect-restore blocks [0,3) and [3,6). 49 // There will be two save-clipRect-restore blocks [0,3) and [3,6).
50 for (int i = 0; i < 2; i++) { 50 for (int i = 0; i < 2; i++) {
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 REPORTER_ASSERT(r, end == record.count()); 139 REPORTER_ASSERT(r, end == record.count());
140 140
141 REPORTER_ASSERT(r, !pattern.search(&record, &begin, &end)); 141 REPORTER_ASSERT(r, !pattern.search(&record, &begin, &end));
142 } 142 }
143 143
144 DEF_TEST(RecordPattern_SaveLayerIsNotADraw, r) { 144 DEF_TEST(RecordPattern_SaveLayerIsNotADraw, r) {
145 Pattern1<IsDraw> pattern; 145 Pattern1<IsDraw> pattern;
146 146
147 SkRecord record; 147 SkRecord record;
148 SkRecorder recorder(&record, 1920, 1200); 148 SkRecorder recorder(&record, 1920, 1200);
149 recorder.saveLayer(NULL, NULL); 149 recorder.saveLayer(nullptr, nullptr);
150 150
151 REPORTER_ASSERT(r, !pattern.match(&record, 0)); 151 REPORTER_ASSERT(r, !pattern.match(&record, 0));
152 } 152 }
OLDNEW
« no previous file with comments | « tests/RecordOptsTest.cpp ('k') | tests/RecordReplaceDrawTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698