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

Side by Side Diff: tests/PathOpsDQuadTest.cpp

Issue 26114004: path ops work in progress (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: working state on linux box Created 7 years, 1 month 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/PathOpsCubicQuadIntersectionTest.cpp ('k') | tests/PathOpsExtendedTest.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 "PathOpsTestCommon.h" 7 #include "PathOpsTestCommon.h"
8 #include "SkPath.h"
8 #include "SkPathOpsQuad.h" 9 #include "SkPathOpsQuad.h"
10 #include "SkRRect.h"
9 #include "Test.h" 11 #include "Test.h"
10 12
11 static const SkDQuad tests[] = { 13 static const SkDQuad tests[] = {
12 {{{1, 1}, {2, 1}, {0, 2}}}, 14 {{{1, 1}, {2, 1}, {0, 2}}},
13 {{{0, 0}, {1, 1}, {3, 1}}}, 15 {{{0, 0}, {1, 1}, {3, 1}}},
14 {{{2, 0}, {1, 1}, {2, 2}}}, 16 {{{2, 0}, {1, 1}, {2, 2}}},
15 {{{4, 0}, {0, 1}, {4, 2}}}, 17 {{{4, 0}, {0, 1}, {4, 2}}},
16 {{{0, 0}, {0, 1}, {1, 1}}}, 18 {{{0, 0}, {0, 1}, {1, 1}}},
17 }; 19 };
18 20
(...skipping 25 matching lines...) Expand all
44 REPORTER_ASSERT(reporter, 0); 46 REPORTER_ASSERT(reporter, 0);
45 } 47 }
46 result = quad.pointInHull(outPoint[index]); 48 result = quad.pointInHull(outPoint[index]);
47 if (result) { 49 if (result) {
48 SkDebugf("%s [%d] expected outside hull\n", __FUNCTION__, index); 50 SkDebugf("%s [%d] expected outside hull\n", __FUNCTION__, index);
49 REPORTER_ASSERT(reporter, 0); 51 REPORTER_ASSERT(reporter, 0);
50 } 52 }
51 } 53 }
52 } 54 }
53 55
56 static void PathOpsRRectTest(skiatest::Reporter* reporter) {
57 SkPath path;
58 SkRRect rRect;
59 SkRect rect = {135, 143, 250, 177};
60 SkVector radii[4] = {{8, 8}, {8, 8}, {0, 0}, {0, 0}};
61 rRect.setRectRadii(rect, radii);
62 path.addRRect(rRect);
63 }
64
54 #include "TestClassDef.h" 65 #include "TestClassDef.h"
55 DEFINE_TESTCLASS_SHORT(PathOpsDQuadTest) 66 DEFINE_TESTCLASS_SHORT(PathOpsDQuadTest)
67
68 DEFINE_TESTCLASS_SHORT(PathOpsRRectTest)
OLDNEW
« no previous file with comments | « tests/PathOpsCubicQuadIntersectionTest.cpp ('k') | tests/PathOpsExtendedTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698