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

Side by Side Diff: tests/PathOpsSimplifyTest.cpp

Issue 1111333002: compute initial winding from projected rays (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add missing test reference Created 5 years, 7 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
« no previous file with comments | « tests/PathOpsQuadIntersectionTest.cpp ('k') | tests/PathOpsSkpTest.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 "PathOpsExtendedTest.h" 7 #include "PathOpsExtendedTest.h"
8 8
9 #define TEST(name) { name, #name } 9 #define TEST(name) { name, #name }
10 10
(...skipping 4708 matching lines...) Expand 10 before | Expand all | Expand 10 after
4719 path.quadTo(0, 1, 1, 2); 4719 path.quadTo(0, 1, 1, 2);
4720 path.lineTo(2, 2); 4720 path.lineTo(2, 2);
4721 path.close(); 4721 path.close();
4722 path.moveTo(1, 0); 4722 path.moveTo(1, 0);
4723 path.lineTo(1, 1); 4723 path.lineTo(1, 1);
4724 path.quadTo(0, 2, 3, 3); 4724 path.quadTo(0, 2, 3, 3);
4725 path.close(); 4725 path.close();
4726 testSimplify(reporter, path, filename); 4726 testSimplify(reporter, path, filename);
4727 } 4727 }
4728 4728
4729 static void testTriangle1(skiatest::Reporter* reporter,const char* filename) {
4730 SkPath path;
4731 path.moveTo(0, 0);
4732 path.lineTo(1, 0);
4733 path.lineTo(2, 3);
4734 path.close();
4735 path.moveTo(0, 0);
4736 path.lineTo(1, 2);
4737 path.lineTo(1, 0);
4738 path.close();
4739 testSimplify(reporter, path, filename);
4740 }
4741
4742 static void testTriangle2(skiatest::Reporter* reporter,const char* filename) {
4743 SkPath path;
4744 path.moveTo(0, 0);
4745 path.lineTo(1, 0);
4746 path.lineTo(0, 1);
4747 path.close();
4748 path.moveTo(2, 0);
4749 path.lineTo(0, 2);
4750 path.lineTo(2, 2);
4751 path.close();
4752 testSimplify(reporter, path, filename);
4753 }
4754
4729 static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0; 4755 static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0;
4730 static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0; 4756 static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0;
4731 static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; 4757 static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0;
4732 4758
4733 static TestDesc tests[] = { 4759 static TestDesc tests[] = {
4760 TEST(testTriangle2),
4761 TEST(testTriangle1),
4734 TEST(testQuads64), 4762 TEST(testQuads64),
4735 TEST(testQuads63), 4763 TEST(testQuads63),
4736 TEST(testQuads62), 4764 TEST(testQuads62),
4737 TEST(testRect4), 4765 TEST(testRect4),
4738 TEST(testRect3), 4766 TEST(testRect3),
4739 TEST(testQuadralateral10), 4767 TEST(testQuadralateral10),
4740 TEST(testQuads61), 4768 TEST(testQuads61),
4741 TEST(testQuads60), 4769 TEST(testQuads60),
4742 TEST(testQuads59), 4770 TEST(testQuads59),
4743 TEST(testQuads58), 4771 TEST(testQuads58),
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
5167 5195
5168 DEF_TEST(PathOpsSimplify, reporter) { 5196 DEF_TEST(PathOpsSimplify, reporter) {
5169 if (runSubTests && runSubTestsFirst) { 5197 if (runSubTests && runSubTestsFirst) {
5170 RunTestSet(reporter, subTests, subTestCount, firstSubTest, NULL, stopTes t, runReverse); 5198 RunTestSet(reporter, subTests, subTestCount, firstSubTest, NULL, stopTes t, runReverse);
5171 } 5199 }
5172 RunTestSet(reporter, tests, testCount, firstTest, skipTest, stopTest, runRev erse); 5200 RunTestSet(reporter, tests, testCount, firstTest, skipTest, stopTest, runRev erse);
5173 if (runSubTests && !runSubTestsFirst) { 5201 if (runSubTests && !runSubTestsFirst) {
5174 RunTestSet(reporter, subTests, subTestCount, firstSubTest, NULL, stopTes t, runReverse); 5202 RunTestSet(reporter, subTests, subTestCount, firstSubTest, NULL, stopTes t, runReverse);
5175 } 5203 }
5176 } 5204 }
OLDNEW
« no previous file with comments | « tests/PathOpsQuadIntersectionTest.cpp ('k') | tests/PathOpsSkpTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698