OLD | NEW |
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 "SkPathOpsTriangle.h" | 8 #include "SkPathOpsTriangle.h" |
9 #include "Test.h" | 9 #include "Test.h" |
10 #include "TestClassDef.h" | |
11 | 10 |
12 static const SkDTriangle tests[] = { | 11 static const SkDTriangle tests[] = { |
13 {{{2, 0}, {3, 1}, {2, 2}}}, | 12 {{{2, 0}, {3, 1}, {2, 2}}}, |
14 {{{3, 1}, {2, 2}, {1, 1}}}, | 13 {{{3, 1}, {2, 2}, {1, 1}}}, |
15 {{{3, 0}, {2, 1}, {3, 2}}}, | 14 {{{3, 0}, {2, 1}, {3, 2}}}, |
16 }; | 15 }; |
17 | 16 |
18 static const SkDPoint inPoint[] = { | 17 static const SkDPoint inPoint[] = { |
19 {2.5, 1}, | 18 {2.5, 1}, |
20 {2, 1.5}, | 19 {2, 1.5}, |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 SkASSERT(ValidTriangle(triangle)); | 61 SkASSERT(ValidTriangle(triangle)); |
63 for (int inner = 0; inner < 3; ++inner) { | 62 for (int inner = 0; inner < 3; ++inner) { |
64 bool result = triangle.contains(triangle.fPts[inner]); | 63 bool result = triangle.contains(triangle.fPts[inner]); |
65 if (result) { | 64 if (result) { |
66 SkDebugf("%s [%d][%d] point on triangle is not in\n", __FUNCTION
__, index, inner); | 65 SkDebugf("%s [%d][%d] point on triangle is not in\n", __FUNCTION
__, index, inner); |
67 REPORTER_ASSERT(reporter, 0); | 66 REPORTER_ASSERT(reporter, 0); |
68 } | 67 } |
69 } | 68 } |
70 } | 69 } |
71 } | 70 } |
OLD | NEW |