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

Side by Side Diff: tests/StringTest.cpp

Issue 100113004: Use DEFINE_TESTCLASS_SHORT macro in tests. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: 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
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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 REPORTER_ASSERT(reporter, buffer[19] == 'a'); 184 REPORTER_ASSERT(reporter, buffer[19] == 'a');
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_SHORT(TestString)
195 195
196 DEF_TEST(String_SkStrSplit, r) { 196 DEF_TEST(String_SkStrSplit, r) {
197 SkTArray<SkString> results; 197 SkTArray<SkString> results;
198 198
199 SkStrSplit("a-_b_c-dee--f-_-_-g-", "-_", &results); 199 SkStrSplit("a-_b_c-dee--f-_-_-g-", "-_", &results);
200 REPORTER_ASSERT(r, results.count() == 6); 200 REPORTER_ASSERT(r, results.count() == 6);
201 REPORTER_ASSERT(r, results[0].equals("a")); 201 REPORTER_ASSERT(r, results[0].equals("a"));
202 REPORTER_ASSERT(r, results[1].equals("b")); 202 REPORTER_ASSERT(r, results[1].equals("b"));
203 REPORTER_ASSERT(r, results[2].equals("c")); 203 REPORTER_ASSERT(r, results[2].equals("c"));
204 REPORTER_ASSERT(r, results[3].equals("dee")); 204 REPORTER_ASSERT(r, results[3].equals("dee"));
205 REPORTER_ASSERT(r, results[4].equals("f")); 205 REPORTER_ASSERT(r, results[4].equals("f"));
206 REPORTER_ASSERT(r, results[5].equals("g")); 206 REPORTER_ASSERT(r, results[5].equals("g"));
207 } 207 }
OLDNEW
« tests/AnnotationTest.cpp ('K') | « tests/StreamTest.cpp ('k') | tests/StrokeTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698