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

Side by Side Diff: tests/PathOpsQuadLineIntersectionTest.cpp

Issue 138563004: Move macros from TestClassDef.h to Test.h (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: upload 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 "PathOpsExtendedTest.h" 7 #include "PathOpsExtendedTest.h"
8 #include "PathOpsTestCommon.h" 8 #include "PathOpsTestCommon.h"
9 #include "SkIntersections.h" 9 #include "SkIntersections.h"
10 #include "SkPathOpsLine.h" 10 #include "SkPathOpsLine.h"
11 #include "SkPathOpsQuad.h" 11 #include "SkPathOpsQuad.h"
12 #include "SkReduceOrder.h" 12 #include "SkReduceOrder.h"
13 #include "Test.h" 13 #include "Test.h"
14 #include "TestClassDef.h"
15 14
16 static struct lineQuad { 15 static struct lineQuad {
17 SkDQuad quad; 16 SkDQuad quad;
18 SkDLine line; 17 SkDLine line;
19 int result; 18 int result;
20 SkDPoint expected[2]; 19 SkDPoint expected[2];
21 } lineQuadTests[] = { 20 } lineQuadTests[] = {
22 // quad line results 21 // quad line results
23 {{{{1, 1}, {2, 1}, {0, 2}}}, {{{0, 0}, {1, 1}}}, 1, {{1, 1}, {0, 0}} }, 22 {{{{1, 1}, {2, 1}, {0, 2}}}, {{{0, 0}, {1, 1}}}, 1, {{1, 1}, {0, 0}} },
24 {{{{0, 0}, {1, 1}, {3, 1}}}, {{{0, 0}, {3, 1}}}, 2, {{0, 0}, {3, 1}} }, 23 {{{{0, 0}, {1, 1}, {3, 1}}}, {{{0, 0}, {3, 1}}}, 2, {{0, 0}, {3, 1}} },
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 } 140 }
142 if (!t1.approximatelyEqual(lineQuadTests[index].expected[0]) 141 if (!t1.approximatelyEqual(lineQuadTests[index].expected[0])
143 && (lineQuadTests[index].result == 1 142 && (lineQuadTests[index].result == 1
144 || !t1.approximatelyEqual(lineQuadTests[index].expected[1])) ) { 143 || !t1.approximatelyEqual(lineQuadTests[index].expected[1])) ) {
145 SkDebugf("%s t1=(%1.9g,%1.9g)\n", __FUNCTION__, t1.fX, t1.fY); 144 SkDebugf("%s t1=(%1.9g,%1.9g)\n", __FUNCTION__, t1.fX, t1.fY);
146 REPORTER_ASSERT(reporter, 0); 145 REPORTER_ASSERT(reporter, 0);
147 } 146 }
148 } 147 }
149 } 148 }
150 } 149 }
OLDNEW
« no previous file with comments | « tests/PathOpsQuadIntersectionTest.cpp ('k') | tests/PathOpsQuadLineIntersectionThreadedTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698