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

Side by Side Diff: tests/PathOpsQuadReduceOrderTest.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
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 "PathOpsQuadIntersectionTestData.h" 7 #include "PathOpsQuadIntersectionTestData.h"
8 #include "SkIntersections.h" 8 #include "SkIntersections.h"
9 #include "SkPathOpsRect.h" 9 #include "SkPathOpsRect.h"
10 #include "SkReduceOrder.h" 10 #include "SkReduceOrder.h"
11 #include "Test.h" 11 #include "Test.h"
12 #include "TestClassDef.h"
12 13
13 static const SkDQuad testSet[] = { 14 static const SkDQuad testSet[] = {
14 {{{1, 1}, {2, 2}, {1, 1.000003}}}, 15 {{{1, 1}, {2, 2}, {1, 1.000003}}},
15 {{{1, 0}, {2, 6}, {3, 0}}} 16 {{{1, 0}, {2, 6}, {3, 0}}}
16 }; 17 };
17 18
18 static const size_t testSetCount = SK_ARRAY_COUNT(testSet); 19 static const size_t testSetCount = SK_ARRAY_COUNT(testSet);
19 20
20 static void oneOffTest(skiatest::Reporter* reporter) { 21 static void oneOffTest(skiatest::Reporter* reporter) {
21 for (size_t index = 0; index < testSetCount; ++index) { 22 for (size_t index = 0; index < testSetCount; ++index) {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 } 56 }
56 for (index = firstQuadraticModLineTest; index < quadraticModEpsilonLines_cou nt; ++index) { 57 for (index = firstQuadraticModLineTest; index < quadraticModEpsilonLines_cou nt; ++index) {
57 const SkDQuad& quad = quadraticModEpsilonLines[index]; 58 const SkDQuad& quad = quadraticModEpsilonLines[index];
58 order = reducer.reduce(quad); 59 order = reducer.reduce(quad);
59 if (order != 3) { 60 if (order != 3) {
60 SkDebugf("[%d] line mod quad order=%d\n", (int) index, order); 61 SkDebugf("[%d] line mod quad order=%d\n", (int) index, order);
61 } 62 }
62 } 63 }
63 } 64 }
64 65
65 static void PathOpsReduceOrderQuadTest(skiatest::Reporter* reporter) { 66 DEF_TEST(PathOpsReduceOrderQuad, reporter) {
66 oneOffTest(reporter); 67 oneOffTest(reporter);
67 standardTestCases(reporter); 68 standardTestCases(reporter);
68 } 69 }
69
70 #include "TestClassDef.h"
71 DEFINE_TESTCLASS_SHORT(PathOpsReduceOrderQuadTest)
OLDNEW
« no previous file with comments | « tests/PathOpsQuadParameterizationTest.cpp ('k') | tests/PathOpsSimplifyDegenerateThreadedTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698