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

Side by Side Diff: tests/PathOpsSimplifyQuadThreadedTest.cpp

Issue 117863005: Get rid of DEFINE_TESTCLASS_SHORT() macro. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Mike review Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « tests/PathOpsSimplifyFailTest.cpp ('k') | tests/PathOpsSimplifyQuadralateralsThreadedTest.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 #include "PathOpsExtendedTest.h" 7 #include "PathOpsExtendedTest.h"
8 #include "PathOpsThreadedCommon.h" 8 #include "PathOpsThreadedCommon.h"
9 #include "TestClassDef.h"
9 10
10 static void testSimplifyQuadsMain(PathOpsThreadState* data) 11 static void testSimplifyQuadsMain(PathOpsThreadState* data)
11 { 12 {
12 SkASSERT(data); 13 SkASSERT(data);
13 PathOpsThreadState& state = *data; 14 PathOpsThreadState& state = *data;
14 char pathStr[1024]; 15 char pathStr[1024];
15 bool progress = state.fReporter->verbose(); // FIXME: break out into its own parameter? 16 bool progress = state.fReporter->verbose(); // FIXME: break out into its own parameter?
16 if (progress) { 17 if (progress) {
17 sk_bzero(pathStr, sizeof(pathStr)); 18 sk_bzero(pathStr, sizeof(pathStr));
18 } 19 }
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 if (progress) { 67 if (progress) {
67 outputProgress(state.fPathStr, pathStr, SkPath::kEvenOdd _FillType); 68 outputProgress(state.fPathStr, pathStr, SkPath::kEvenOdd _FillType);
68 } 69 }
69 testSimplify(path, true, out, state, pathStr); 70 testSimplify(path, true, out, state, pathStr);
70 } 71 }
71 } 72 }
72 } 73 }
73 } 74 }
74 } 75 }
75 76
76 static void PathOpsSimplifyQuadsThreadedTest(skiatest::Reporter* reporter) 77 DEF_TEST(PathOpsSimplifyQuadsThreaded, reporter) {
77 {
78 int threadCount = initializeTests(reporter, "testQuads"); 78 int threadCount = initializeTests(reporter, "testQuads");
79 PathOpsThreadedTestRunner testRunner(reporter, threadCount); 79 PathOpsThreadedTestRunner testRunner(reporter, threadCount);
80 int a = 0; 80 int a = 0;
81 for (; a < 16; ++a) { 81 for (; a < 16; ++a) {
82 for (int b = a ; b < 16; ++b) { 82 for (int b = a ; b < 16; ++b) {
83 for (int c = b ; c < 16; ++c) { 83 for (int c = b ; c < 16; ++c) {
84 for (int d = c; d < 16; ++d) { 84 for (int d = c; d < 16; ++d) {
85 *testRunner.fRunnables.append() = SkNEW_ARGS(PathOpsThreaded Runnable, 85 *testRunner.fRunnables.append() = SkNEW_ARGS(PathOpsThreaded Runnable,
86 (&testSimplifyQuadsMain, a, b, c, d, &testRunner)); 86 (&testSimplifyQuadsMain, a, b, c, d, &testRunner));
87 } 87 }
88 if (!reporter->allowExtendedTest()) goto finish; 88 if (!reporter->allowExtendedTest()) goto finish;
89 } 89 }
90 } 90 }
91 } 91 }
92 finish: 92 finish:
93 testRunner.render(); 93 testRunner.render();
94 } 94 }
95
96 #include "TestClassDef.h"
97 DEFINE_TESTCLASS_SHORT(PathOpsSimplifyQuadsThreadedTest)
OLDNEW
« no previous file with comments | « tests/PathOpsSimplifyFailTest.cpp ('k') | tests/PathOpsSimplifyQuadralateralsThreadedTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698