caryclark@google.com | 07393ca | 2013-04-08 11:47:37 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2012 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
caryclark@google.com | 8d0a524 | 2013-07-16 16:11:16 +0000 | [diff] [blame] | 7 | #include "PathOpsTestCommon.h" |
caryclark@google.com | 07393ca | 2013-04-08 11:47:37 +0000 | [diff] [blame] | 8 | #include "SkPathOpsCubic.h" |
| 9 | #include "Test.h" |
| 10 | |
caryclark | a35ab3e | 2016-10-20 08:32:18 -0700 | [diff] [blame] | 11 | static const CubicPts hullTests[] = { |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 12 | {{{2.6250000819563866, 2.3750000223517418}, {2.833333432674408, 2.3333333432674408}, {3.1111112236976624, 2.3333333134651184}, {3.4074075222015381, 2.3333332538604736}}}, |
| 13 | }; |
| 14 | |
| 15 | static const size_t hullTests_count = SK_ARRAY_COUNT(hullTests); |
| 16 | |
| 17 | DEF_TEST(PathOpsCubicHull, reporter) { |
| 18 | for (size_t index = 0; index < hullTests_count; ++index) { |
caryclark | a35ab3e | 2016-10-20 08:32:18 -0700 | [diff] [blame] | 19 | const CubicPts& c = hullTests[index]; |
| 20 | SkDCubic cubic; |
| 21 | cubic.debugSet(c.fPts); |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 22 | char order[4]; |
| 23 | cubic.convexHull(order); |
| 24 | } |
| 25 | } |