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

Side by Side Diff: tests/PathOpsDCubicTest.cpp

Issue 117863005: Get rid of DEFINE_TESTCLASS_SHORT() macro. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Mike review Created 6 years, 11 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/PathOpsCubicToQuadsTest.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
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 "SkPathOpsCubic.h" 8 #include "SkPathOpsCubic.h"
9 #include "Test.h" 9 #include "Test.h"
10 #include "TestClassDef.h"
10 11
11 static const SkDCubic tests[] = { 12 static const SkDCubic tests[] = {
12 {{{2, 0}, {3, 1}, {2, 2}, {1, 1}}}, 13 {{{2, 0}, {3, 1}, {2, 2}, {1, 1}}},
13 {{{3, 1}, {2, 2}, {1, 1}, {2, 0}}}, 14 {{{3, 1}, {2, 2}, {1, 1}, {2, 0}}},
14 {{{3, 0}, {2, 1}, {3, 2}, {1, 1}}}, 15 {{{3, 0}, {2, 1}, {3, 2}, {1, 1}}},
15 }; 16 };
16 17
17 static const size_t tests_count = SK_ARRAY_COUNT(tests); 18 static const size_t tests_count = SK_ARRAY_COUNT(tests);
18 19
19 static void PathOpsDCubicTest(skiatest::Reporter* reporter) { 20 DEF_TEST(PathOpsDCubic, reporter) {
20 for (size_t index = 0; index < tests_count; ++index) { 21 for (size_t index = 0; index < tests_count; ++index) {
21 const SkDCubic& cubic = tests[index]; 22 const SkDCubic& cubic = tests[index];
22 SkASSERT(ValidCubic(cubic)); 23 SkASSERT(ValidCubic(cubic));
23 bool result = cubic.clockwise(); 24 bool result = cubic.clockwise();
24 if (!result) { 25 if (!result) {
25 SkDebugf("%s [%d] expected clockwise\n", __FUNCTION__, index); 26 SkDebugf("%s [%d] expected clockwise\n", __FUNCTION__, index);
26 REPORTER_ASSERT(reporter, 0); 27 REPORTER_ASSERT(reporter, 0);
27 } 28 }
28 } 29 }
29 } 30 }
30
31 #include "TestClassDef.h"
32 DEFINE_TESTCLASS_SHORT(PathOpsDCubicTest)
OLDNEW
« no previous file with comments | « tests/PathOpsCubicToQuadsTest.cpp ('k') | tests/PathOpsDLineTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698