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

Side by Side Diff: tests/PathOpsSimplifyTest.cpp

Issue 75453003: optimize pathops coverage (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: remove unused code now that testing is complete Created 7 years, 1 month 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
« gyp/common_conditions.gypi ('K') | « tests/PathOpsOpTest.cpp ('k') | no next file » | 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 3901 matching lines...) Expand 10 before | Expand all | Expand 10 after
3912 path.quadTo(2, 0, 0, 3); 3912 path.quadTo(2, 0, 0, 3);
3913 path.lineTo(2, 3); 3913 path.lineTo(2, 3);
3914 path.close(); 3914 path.close();
3915 path.moveTo(0, 0); 3915 path.moveTo(0, 0);
3916 path.lineTo(0, 1); 3916 path.lineTo(0, 1);
3917 path.quadTo(3, 2, 2, 3); 3917 path.quadTo(3, 2, 2, 3);
3918 path.close(); 3918 path.close();
3919 testSimplify(reporter, path); 3919 testSimplify(reporter, path);
3920 } 3920 }
3921 3921
3922 static void testQuad9(skiatest::Reporter* reporter) {
3923 SkPath path;
3924 path.setFillType(SkPath::kEvenOdd_FillType);
3925 path.moveTo(1, 0);
3926 path.quadTo(0, 1, 3, 2);
3927 path.lineTo(1, 3);
3928 path.close();
3929 path.moveTo(1, 0);
3930 path.lineTo(1, 1);
3931 path.quadTo(2, 1, 1, 3);
3932 path.close();
3933 testSimplify(reporter, path);
3934 }
3935
3936 static void testQuad10(skiatest::Reporter* reporter) {
3937 SkPath path;
3938 path.moveTo(1, 0);
3939 path.quadTo(0, 1, 3, 2);
3940 path.lineTo(3, 3);
3941 path.close();
3942 path.moveTo(1, 0);
3943 path.lineTo(2, 0);
3944 path.quadTo(2, 3, 3, 3);
3945 path.close();
3946 testSimplify(reporter, path);
3947 }
3948
3922 static void (*firstTest)(skiatest::Reporter* ) = 0; 3949 static void (*firstTest)(skiatest::Reporter* ) = 0;
3923 3950
3924 static TestDesc tests[] = { 3951 static TestDesc tests[] = {
3952 TEST(testQuad10),
3953 TEST(testQuad9),
3925 TEST(testTriangles4x), 3954 TEST(testTriangles4x),
3926 TEST(testQuad8), 3955 TEST(testQuad8),
3927 TEST(testTriangles3x), 3956 TEST(testTriangles3x),
3928 TEST(testRect2), 3957 TEST(testRect2),
3929 TEST(testRect1), 3958 TEST(testRect1),
3930 TEST(tooCloseTest), 3959 TEST(tooCloseTest),
3931 TEST(skphealth_com76), 3960 TEST(skphealth_com76),
3932 TEST(testQuadLineIntersect1), 3961 TEST(testQuadLineIntersect1),
3933 TEST(testQuadLineIntersect2), 3962 TEST(testQuadLineIntersect2),
3934 TEST(testQuadLineIntersect3), 3963 TEST(testQuadLineIntersect3),
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
4307 RunTestSet(reporter, subTests, subTestCount, firstSubTest, stopTest, run Reverse); 4336 RunTestSet(reporter, subTests, subTestCount, firstSubTest, stopTest, run Reverse);
4308 } 4337 }
4309 #ifdef SK_DEBUG 4338 #ifdef SK_DEBUG
4310 SkPathOpsDebug::gMaxWindSum = SK_MaxS32; 4339 SkPathOpsDebug::gMaxWindSum = SK_MaxS32;
4311 SkPathOpsDebug::gMaxWindValue = SK_MaxS32; 4340 SkPathOpsDebug::gMaxWindValue = SK_MaxS32;
4312 #endif 4341 #endif
4313 } 4342 }
4314 4343
4315 #include "TestClassDef.h" 4344 #include "TestClassDef.h"
4316 DEFINE_TESTCLASS_SHORT(PathOpsSimplifyTest) 4345 DEFINE_TESTCLASS_SHORT(PathOpsSimplifyTest)
OLDNEW
« gyp/common_conditions.gypi ('K') | « tests/PathOpsOpTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698