OLD | NEW |
(Empty) | |
| 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 */ |
| 7 #include "SkPathOpsCubic.h" |
| 8 #include "Test.h" |
| 9 |
| 10 static const SkDCubic tests[] = { |
| 11 {{{2, 0}, {3, 1}, {2, 2}, {1, 1}}}, |
| 12 {{{3, 1}, {2, 2}, {1, 1}, {2, 0}}}, |
| 13 {{{3, 0}, {2, 1}, {3, 2}, {1, 1}}}, |
| 14 }; |
| 15 |
| 16 static const size_t tests_count = sizeof(tests) / sizeof(tests[0]); |
| 17 |
| 18 static void DCubicTest(skiatest::Reporter* reporter) { |
| 19 for (size_t index = 0; index < tests_count; ++index) { |
| 20 const SkDCubic& cubic = tests[index]; |
| 21 bool result = cubic.clockwise(); |
| 22 if (!result) { |
| 23 SkDebugf("%s [%d] expected clockwise\n", __FUNCTION__, index); |
| 24 REPORTER_ASSERT(reporter, 0); |
| 25 } |
| 26 } |
| 27 } |
| 28 |
| 29 #include "TestClassDef.h" |
| 30 DEFINE_TESTCLASS("PathOpsDCubic", PathOpsDCubic, DCubicTest) |
OLD | NEW |