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

Side by Side Diff: tests/StringTest.cpp

Issue 88773002: DM: write failed comparison mode .pngs one more level deep in the tree. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: depth() instead Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « src/core/SkString.cpp ('k') | no next file » | 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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "Test.h" 8 #include "Test.h"
9 #include "SkString.h" 9 #include "SkString.h"
10 #include <stdarg.h> 10 #include <stdarg.h>
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 REPORTER_ASSERT(reporter, buffer[20] == 'a'); 185 REPORTER_ASSERT(reporter, buffer[20] == 'a');
186 printfAnalog(buffer, 20, "%30d", 0); 186 printfAnalog(buffer, 20, "%30d", 0);
187 REPORTER_ASSERT(reporter, buffer[18] == ' '); 187 REPORTER_ASSERT(reporter, buffer[18] == ' ');
188 REPORTER_ASSERT(reporter, buffer[19] == 0); 188 REPORTER_ASSERT(reporter, buffer[19] == 0);
189 REPORTER_ASSERT(reporter, buffer[20] == 'a'); 189 REPORTER_ASSERT(reporter, buffer[20] == 'a');
190 190
191 } 191 }
192 192
193 #include "TestClassDef.h" 193 #include "TestClassDef.h"
194 DEFINE_TESTCLASS("String", StringTestClass, TestString) 194 DEFINE_TESTCLASS("String", StringTestClass, TestString)
195
196 DEF_TEST(String_SkStrSplit, r) {
197 SkTArray<SkString> results;
198
199 SkStrSplit("a-_b_c-dee--f-_-_-g-", "-_", &results);
200 REPORTER_ASSERT(r, results.count() == 6);
201 REPORTER_ASSERT(r, results[0].equals("a"));
202 REPORTER_ASSERT(r, results[1].equals("b"));
203 REPORTER_ASSERT(r, results[2].equals("c"));
204 REPORTER_ASSERT(r, results[3].equals("dee"));
205 REPORTER_ASSERT(r, results[4].equals("f"));
206 REPORTER_ASSERT(r, results[5].equals("g"));
207 }
OLDNEW
« no previous file with comments | « src/core/SkString.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698