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

Side by Side Diff: tests/PictureUtilsTest.cpp

Issue 100113004: Use DEFINE_TESTCLASS_SHORT macro in tests. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase 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 | « tests/PictureTest.cpp ('k') | tests/PipeTest.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 2012 Google Inc. 2 * Copyright 2012 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 #include "Test.h" 8 #include "Test.h"
9 #include "TestClassDef.h"
8 #include "picture_utils.h" 10 #include "picture_utils.h"
9 #include "SkString.h" 11 #include "SkString.h"
10 12
11 static void test_filepath_creation(skiatest::Reporter* reporter) { 13 static void test_filepath_creation(skiatest::Reporter* reporter) {
12 SkString result; 14 SkString result;
13 SkString filename("test"); 15 SkString filename("test");
14 SkString dir("test/path"); 16 SkString dir("test/path");
15 sk_tools::make_filepath(&result, dir, filename); 17 sk_tools::make_filepath(&result, dir, filename);
16 REPORTER_ASSERT(reporter, result.equals("test/path/test")); 18 REPORTER_ASSERT(reporter, result.equals("test/path/test"));
17 } 19 }
(...skipping 20 matching lines...) Expand all
38 sk_tools::get_basename(&result, path); 40 sk_tools::get_basename(&result, path);
39 REPORTER_ASSERT(reporter, result.equals("winbasename")); 41 REPORTER_ASSERT(reporter, result.equals("winbasename"));
40 42
41 result.reset(); 43 result.reset();
42 path.set("path\\windir\\"); 44 path.set("path\\windir\\");
43 sk_tools::get_basename(&result, path); 45 sk_tools::get_basename(&result, path);
44 REPORTER_ASSERT(reporter, result.equals("windir")); 46 REPORTER_ASSERT(reporter, result.equals("windir"));
45 #endif 47 #endif
46 } 48 }
47 49
48 static void TestPictureUtils(skiatest::Reporter* reporter) { 50 DEF_TEST(PictureUtils, reporter) {
49 test_filepath_creation(reporter); 51 test_filepath_creation(reporter);
50 test_get_basename(reporter); 52 test_get_basename(reporter);
51 } 53 }
52
53 #include "TestClassDef.h"
54 DEFINE_TESTCLASS("PictureUtils", PictureUtilsTestClass, TestPictureUtils)
OLDNEW
« no previous file with comments | « tests/PictureTest.cpp ('k') | tests/PipeTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698