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

Side by Side Diff: tests/StringTest.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/StreamTest.cpp ('k') | tests/SurfaceTest.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 <stdarg.h> 8 #include <stdarg.h>
9 #include <stdio.h> 9 #include <stdio.h>
10 #include "SkString.h" 10 #include "SkString.h"
(...skipping 18 matching lines...) Expand all
29 } while (0) 29 } while (0)
30 30
31 static void printfAnalog(char* buffer, int size, const char format[], ...) { 31 static void printfAnalog(char* buffer, int size, const char format[], ...) {
32 ARGS_TO_BUFFER(format, buffer, size); 32 ARGS_TO_BUFFER(format, buffer, size);
33 } 33 }
34 34
35 DEF_TEST(String, reporter) { 35 DEF_TEST(String, reporter) {
36 SkString a; 36 SkString a;
37 SkString b((size_t)0); 37 SkString b((size_t)0);
38 SkString c(""); 38 SkString c("");
39 SkString d(NULL, 0); 39 SkString d(nullptr, 0);
40 40
41 REPORTER_ASSERT(reporter, a.isEmpty()); 41 REPORTER_ASSERT(reporter, a.isEmpty());
42 REPORTER_ASSERT(reporter, a == b && a == c && a == d); 42 REPORTER_ASSERT(reporter, a == b && a == c && a == d);
43 43
44 a.set("hello"); 44 a.set("hello");
45 b.set("hellox", 5); 45 b.set("hellox", 5);
46 c.set(a); 46 c.set(a);
47 d.resize(5); 47 d.resize(5);
48 memcpy(d.writable_str(), "helloz", 5); 48 memcpy(d.writable_str(), "helloz", 5);
49 49
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 192
193 SkStrSplit("a-_b_c-dee--f-_-_-g-", "-_", &results); 193 SkStrSplit("a-_b_c-dee--f-_-_-g-", "-_", &results);
194 REPORTER_ASSERT(r, results.count() == 6); 194 REPORTER_ASSERT(r, results.count() == 6);
195 REPORTER_ASSERT(r, results[0].equals("a")); 195 REPORTER_ASSERT(r, results[0].equals("a"));
196 REPORTER_ASSERT(r, results[1].equals("b")); 196 REPORTER_ASSERT(r, results[1].equals("b"));
197 REPORTER_ASSERT(r, results[2].equals("c")); 197 REPORTER_ASSERT(r, results[2].equals("c"));
198 REPORTER_ASSERT(r, results[3].equals("dee")); 198 REPORTER_ASSERT(r, results[3].equals("dee"));
199 REPORTER_ASSERT(r, results[4].equals("f")); 199 REPORTER_ASSERT(r, results[4].equals("f"));
200 REPORTER_ASSERT(r, results[5].equals("g")); 200 REPORTER_ASSERT(r, results[5].equals("g"));
201 } 201 }
OLDNEW
« no previous file with comments | « tests/StreamTest.cpp ('k') | tests/SurfaceTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698