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

Side by Side Diff: tests/PathOpsDCubicTest.cpp

Issue 12827020: Add base types for path ops (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 8 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
« no previous file with comments | « tests/PathOpsBoundsTest.cpp ('k') | tests/PathOpsDLineTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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)
OLDNEW
« no previous file with comments | « tests/PathOpsBoundsTest.cpp ('k') | tests/PathOpsDLineTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698