OLD | NEW |
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 #include "PathOpsTestCommon.h" | 8 #include "PathOpsTestCommon.h" |
9 | 9 |
10 #define TEST(name) { name, #name } | 10 #define TEST(name) { name, #name } |
(...skipping 3807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3818 pathB.moveTo(0,3); | 3818 pathB.moveTo(0,3); |
3819 pathB.cubicTo(1,2, 6,5, 6,4); | 3819 pathB.cubicTo(1,2, 6,5, 6,4); |
3820 pathB.close(); | 3820 pathB.close(); |
3821 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); | 3821 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
3822 } | 3822 } |
3823 | 3823 |
3824 #include "SkGeometry.h" | 3824 #include "SkGeometry.h" |
3825 | 3825 |
3826 static void complex_to_quads(const SkPoint pts[], SkPath* path) { | 3826 static void complex_to_quads(const SkPoint pts[], SkPath* path) { |
3827 SkScalar loopT; | 3827 SkScalar loopT; |
3828 if (SkDCubic::ComplexBreak(pts, &loopT)) { | 3828 SkDCubic::CubicType dType; |
| 3829 if (SkDCubic::ComplexBreak(pts, &loopT, &dType)) { |
3829 SkPoint cubicPair[7]; | 3830 SkPoint cubicPair[7]; |
3830 SkChopCubicAt(pts, cubicPair, loopT); | 3831 SkChopCubicAt(pts, cubicPair, loopT); |
3831 SkDCubic c1, c2; | 3832 SkDCubic c1, c2; |
3832 c1.set(cubicPair); | 3833 c1.set(cubicPair); |
3833 c2.set(&cubicPair[3]); | 3834 c2.set(&cubicPair[3]); |
3834 SkDQuad q1 = c1.toQuad(); | 3835 SkDQuad q1 = c1.toQuad(); |
3835 SkDQuad q2 = c2.toQuad(); | 3836 SkDQuad q2 = c2.toQuad(); |
3836 path->quadTo(q1[1].asSkPoint(), q1[2].asSkPoint()); | 3837 path->quadTo(q1[1].asSkPoint(), q1[2].asSkPoint()); |
3837 path->quadTo(q2[1].asSkPoint(), q2[2].asSkPoint()); | 3838 path->quadTo(q2[1].asSkPoint(), q2[2].asSkPoint()); |
3838 } else { | 3839 } else { |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4011 path.moveTo(5,6); | 4012 path.moveTo(5,6); |
4012 path.cubicTo(3,4, 3,0, 3,2); | 4013 path.cubicTo(3,4, 3,0, 3,2); |
4013 path.close(); | 4014 path.close(); |
4014 pathB.setFillType(SkPath::kWinding_FillType); | 4015 pathB.setFillType(SkPath::kWinding_FillType); |
4015 pathB.moveTo(0,3); | 4016 pathB.moveTo(0,3); |
4016 pathB.cubicTo(2,3, 6,5, 4,3); | 4017 pathB.cubicTo(2,3, 6,5, 4,3); |
4017 pathB.close(); | 4018 pathB.close(); |
4018 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); | 4019 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
4019 } | 4020 } |
4020 | 4021 |
| 4022 static void loop12(skiatest::Reporter* reporter, const char* filename) { |
| 4023 SkPath path, pathB; |
| 4024 path.moveTo(1,2); |
| 4025 path.cubicTo(0,6, -3.16666675f,3.66666675f, 6.33333349f,3.33333349f); |
| 4026 path.close(); |
| 4027 pathB.moveTo(0,6); |
| 4028 pathB.cubicTo(-3.16666675f,3.66666675f, 6.33333349f,3.33333349f, 1,2); |
| 4029 pathB.close(); |
| 4030 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
| 4031 } |
| 4032 |
| 4033 static void loop15(skiatest::Reporter* reporter, const char* filename) { |
| 4034 SkPath path, pathB; |
| 4035 path.moveTo(2,6); |
| 4036 path.cubicTo(1,2, 7.16666698f,6.66666698f, -4.66666651f,7.66666651f); |
| 4037 path.close(); |
| 4038 pathB.moveTo(1,2); |
| 4039 pathB.cubicTo(7.16666698f,6.66666698f, -4.66666651f,7.66666651f, 2,6); |
| 4040 pathB.close(); |
| 4041 testPathOpCheck(reporter, path, pathB, kIntersect_SkPathOp, filename, FLAGS_
runFail); |
| 4042 } |
| 4043 |
| 4044 // lots of loopy interesections -- all points appear to be present -- needs more
investigation |
| 4045 static void loop16(skiatest::Reporter* reporter, const char* filename) { |
| 4046 SkPath path, pathB; |
| 4047 path.moveTo(1,5); |
| 4048 path.cubicTo(0,1, 7.33333302f,5.33333349f, -7,7); |
| 4049 path.close(); |
| 4050 pathB.moveTo(0,1); |
| 4051 pathB.cubicTo(7.33333302f,5.33333349f, -7,7, 1,5); |
| 4052 pathB.close(); |
| 4053 testPathOpCheck(reporter, path, pathB, kIntersect_SkPathOp, filename, FLAGS_
runFail); |
| 4054 } |
| 4055 |
| 4056 static void cubicOp133(skiatest::Reporter* reporter, const char* filename) { |
| 4057 SkPath path, pathB; |
| 4058 path.setFillType(SkPath::kWinding_FillType); |
| 4059 path.moveTo(5,6); |
| 4060 path.cubicTo(5,6, 5,0, 4,1); |
| 4061 path.close(); |
| 4062 pathB.setFillType(SkPath::kWinding_FillType); |
| 4063 pathB.moveTo(0,5); |
| 4064 pathB.cubicTo(1,4, 6,5, 6,5); |
| 4065 pathB.close(); |
| 4066 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
| 4067 } |
| 4068 |
| 4069 static void cubicOp134(skiatest::Reporter* reporter, const char* filename) { |
| 4070 SkPath path, pathB; |
| 4071 path.setFillType(SkPath::kWinding_FillType); |
| 4072 path.moveTo(5,6); |
| 4073 path.cubicTo(5,6, 6,0, 3,1); |
| 4074 path.close(); |
| 4075 pathB.setFillType(SkPath::kWinding_FillType); |
| 4076 pathB.moveTo(0,6); |
| 4077 pathB.cubicTo(1,3, 6,5, 6,5); |
| 4078 pathB.close(); |
| 4079 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
| 4080 } |
| 4081 |
| 4082 static void cubicOp135(skiatest::Reporter* reporter, const char* filename) { |
| 4083 SkPath path, pathB; |
| 4084 path.setFillType(SkPath::kWinding_FillType); |
| 4085 path.moveTo(5,6); |
| 4086 path.cubicTo(5,6, 6,0, 4,1); |
| 4087 path.close(); |
| 4088 pathB.setFillType(SkPath::kWinding_FillType); |
| 4089 pathB.moveTo(0,6); |
| 4090 pathB.cubicTo(1,4, 6,5, 6,5); |
| 4091 pathB.close(); |
| 4092 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
| 4093 } |
| 4094 |
| 4095 static void cubicOp136(skiatest::Reporter* reporter, const char* filename) { |
| 4096 SkPath path, pathB; |
| 4097 path.setFillType(SkPath::kWinding_FillType); |
| 4098 path.moveTo(5,6); |
| 4099 path.cubicTo(5,6, 5,0, 3,1); |
| 4100 path.close(); |
| 4101 pathB.setFillType(SkPath::kWinding_FillType); |
| 4102 pathB.moveTo(0,5); |
| 4103 pathB.cubicTo(1,3, 6,5, 6,5); |
| 4104 pathB.close(); |
| 4105 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
| 4106 } |
| 4107 |
| 4108 static void cubicOp136a(skiatest::Reporter* reporter, const char* filename) { |
| 4109 SkPath path, pathB; |
| 4110 path.setFillType(SkPath::kWinding_FillType); |
| 4111 path.moveTo(5,6); |
| 4112 path.quadTo(5,0, 3,1); |
| 4113 path.close(); |
| 4114 pathB.setFillType(SkPath::kWinding_FillType); |
| 4115 pathB.moveTo(0,5); |
| 4116 pathB.cubicTo(1,3, 6,5, 6,5); |
| 4117 pathB.close(); |
| 4118 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
| 4119 } |
| 4120 |
| 4121 static void cubics137(skiatest::Reporter* reporter, const char* filename) { |
| 4122 SkPath path, pathB; |
| 4123 path.setFillType(SkPath::kWinding_FillType); |
| 4124 path.moveTo(0, 5); |
| 4125 path.cubicTo(3, 6, 1, 0, 3, 2); |
| 4126 path.close(); |
| 4127 pathB.setFillType(SkPath::kWinding_FillType); |
| 4128 pathB.moveTo(0, 1); |
| 4129 pathB.cubicTo(2, 3, 5, 0, 6, 3); |
| 4130 pathB.close(); |
| 4131 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
| 4132 } |
| 4133 |
| 4134 static void cubics138(skiatest::Reporter* reporter, const char* filename) { |
| 4135 SkPath path, pathB; |
| 4136 path.setFillType(SkPath::kWinding_FillType); |
| 4137 path.moveTo(0, 5); |
| 4138 path.cubicTo(3, 6, 1, 0, 4, 2); |
| 4139 path.close(); |
| 4140 pathB.setFillType(SkPath::kWinding_FillType); |
| 4141 pathB.moveTo(0, 1); |
| 4142 pathB.cubicTo(2, 4, 5, 0, 6, 3); |
| 4143 pathB.close(); |
| 4144 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
| 4145 } |
| 4146 |
| 4147 // three curves intersect successfully nearby -- the angle only gets 2 of the 3
pts |
| 4148 static void cubicOp139(skiatest::Reporter* reporter, const char* filename) { |
| 4149 SkPath path, pathB; |
| 4150 path.setFillType(SkPath::kWinding_FillType); |
| 4151 path.moveTo(0,2); |
| 4152 path.cubicTo(0,4, 3,1, 5,1); |
| 4153 path.close(); |
| 4154 pathB.setFillType(SkPath::kWinding_FillType); |
| 4155 pathB.moveTo(1,3); |
| 4156 pathB.cubicTo(1,5, 2,0, 4,0); |
| 4157 pathB.close(); |
| 4158 testPathOpCheck(reporter, path, pathB, kDifference_SkPathOp, filename, FLAGS
_runFail); |
| 4159 } |
| 4160 |
| 4161 static void cubicOp140(skiatest::Reporter* reporter, const char* filename) { |
| 4162 SkPath path, pathB; |
| 4163 path.setFillType(SkPath::kWinding_FillType); |
| 4164 path.moveTo(0,2); |
| 4165 path.cubicTo(1,2, 5,4, 3,2); |
| 4166 path.close(); |
| 4167 pathB.setFillType(SkPath::kWinding_FillType); |
| 4168 pathB.moveTo(4,5); |
| 4169 pathB.cubicTo(2,3, 2,0, 2,1); |
| 4170 pathB.close(); |
| 4171 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
| 4172 } |
| 4173 |
| 4174 static void cubicOp141(skiatest::Reporter* reporter, const char* filename) { |
| 4175 SkPath path, pathB; |
| 4176 path.setFillType(SkPath::kWinding_FillType); |
| 4177 path.moveTo(0,2); |
| 4178 path.cubicTo(1,2, 6,4, 3,2); |
| 4179 path.close(); |
| 4180 pathB.setFillType(SkPath::kWinding_FillType); |
| 4181 pathB.moveTo(4,6); |
| 4182 pathB.cubicTo(2,3, 2,0, 2,1); |
| 4183 pathB.close(); |
| 4184 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
| 4185 } |
| 4186 |
| 4187 static void quadRect1(skiatest::Reporter* reporter, const char* filename) { |
| 4188 SkPath path, pathB; |
| 4189 path.moveTo(6,15); |
| 4190 path.quadTo(16,0, 8,4); |
| 4191 path.quadTo(2,7, 12,12); |
| 4192 path.close(); |
| 4193 pathB.addRect(4,11, 13,16); |
| 4194 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
| 4195 } |
| 4196 |
| 4197 static void quadRect2(skiatest::Reporter* reporter, const char* filename) { |
| 4198 SkPath path, pathB; |
| 4199 path.moveTo(5,12); |
| 4200 path.quadTo(15,7, 9,4); |
| 4201 path.quadTo(1,0, 11,15); |
| 4202 path.close(); |
| 4203 pathB.addRect(4,11, 13,16); |
| 4204 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
| 4205 } |
| 4206 |
| 4207 static void quadRect3(skiatest::Reporter* reporter, const char* filename) { |
| 4208 SkPath path, pathB; |
| 4209 path.moveTo(12,12); |
| 4210 path.quadTo(2,7, 8,4); |
| 4211 path.quadTo(16,0, 6,15); |
| 4212 path.close(); |
| 4213 pathB.addRect(4,11, 13,16); |
| 4214 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
| 4215 } |
| 4216 |
| 4217 static void quadRect4(skiatest::Reporter* reporter, const char* filename) { |
| 4218 SkPath path, pathB; |
| 4219 path.moveTo(11,15); |
| 4220 path.quadTo(1,0, 9,4); |
| 4221 path.quadTo(15,7, 5,12); |
| 4222 path.close(); |
| 4223 pathB.addRect(4,11, 13,16); |
| 4224 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
| 4225 } |
| 4226 |
| 4227 static void quadRect5(skiatest::Reporter* reporter, const char* filename) { |
| 4228 SkPath path, pathB; |
| 4229 path.moveTo(11,13); |
| 4230 path.quadTo(4,4, 8,4); |
| 4231 path.quadTo(12,4, 5,13); |
| 4232 path.close(); |
| 4233 pathB.addRect(4,11, 13,16); |
| 4234 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
| 4235 } |
| 4236 |
| 4237 static void quadRect6(skiatest::Reporter* reporter, const char* filename) { |
| 4238 SkPath path, pathB; |
| 4239 path.moveTo(5,13); |
| 4240 path.quadTo(12,4, 8,4); |
| 4241 path.quadTo(4,4, 11,13); |
| 4242 path.close(); |
| 4243 pathB.addRect(4,11, 13,16); |
| 4244 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
| 4245 } |
| 4246 |
| 4247 static void loops4i(skiatest::Reporter* reporter, const char* filename) { |
| 4248 SkPath path, pathB; |
| 4249 path.setFillType(SkPath::kWinding_FillType); |
| 4250 path.moveTo(0, 3); |
| 4251 path.cubicTo(0, 2, 0, 2, -1.66666663f, 2.16666675f); |
| 4252 path.close(); |
| 4253 pathB.setFillType(SkPath::kWinding_FillType); |
| 4254 pathB.moveTo(0, 2); |
| 4255 pathB.cubicTo(0, 2, -1.66666663f, 2.16666675f, 0, 3); |
| 4256 pathB.close(); |
| 4257 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
| 4258 } |
| 4259 |
| 4260 static void loops5i(skiatest::Reporter* reporter, const char* filename) { |
| 4261 SkPath path, pathB; |
| 4262 path.setFillType(SkPath::kWinding_FillType); |
| 4263 path.moveTo(1, 2); |
| 4264 path.cubicTo(0, 2, 0, 2, 0.166666672f, 2.66666675f); |
| 4265 path.close(); |
| 4266 pathB.setFillType(SkPath::kWinding_FillType); |
| 4267 pathB.moveTo(0, 2); |
| 4268 pathB.cubicTo(0, 2, 0.166666672f, 2.66666675f, 1, 2); |
| 4269 pathB.close(); |
| 4270 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
| 4271 } |
| 4272 |
4021 static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0; | 4273 static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0; |
4022 static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0; | 4274 static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0; |
4023 static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; | 4275 static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; |
4024 | 4276 |
4025 static struct TestDesc tests[] = { | 4277 static struct TestDesc tests[] = { |
| 4278 TEST(loops4i), |
| 4279 TEST(quadRect1), |
| 4280 TEST(quadRect2), |
| 4281 TEST(quadRect3), |
| 4282 TEST(quadRect4), |
| 4283 TEST(quadRect5), |
| 4284 TEST(quadRect6), |
| 4285 TEST(cubicOp141), |
| 4286 TEST(cubicOp58d), |
| 4287 TEST(loops5i), |
| 4288 TEST(cubicOp140), |
| 4289 TEST(cubicOp139), |
| 4290 TEST(cubics138), |
| 4291 TEST(cubics137), |
| 4292 TEST(cubicOp136a), |
| 4293 TEST(cubicOp136), |
| 4294 TEST(cubicOp135), |
| 4295 TEST(cubicOp134), |
| 4296 TEST(cubicOp133), |
| 4297 TEST(loop16), |
| 4298 TEST(loop15), |
| 4299 TEST(loop12), |
4026 TEST(cubicOp132), | 4300 TEST(cubicOp132), |
4027 TEST(loop11), | 4301 TEST(loop11), |
4028 TEST(loop10), | 4302 TEST(loop10), |
4029 TEST(circlesOp3), | 4303 TEST(circlesOp3), |
4030 TEST(loop9), | 4304 TEST(loop9), |
4031 TEST(loop8), | 4305 TEST(loop8), |
4032 TEST(rects5), | 4306 TEST(rects5), |
4033 TEST(loop7), | 4307 TEST(loop7), |
4034 TEST(cubicOp130a), | 4308 TEST(cubicOp130a), |
4035 TEST(rRect1x), | 4309 TEST(rRect1x), |
(...skipping 20 matching lines...) Expand all Loading... |
4056 TEST(loop1asQuad), | 4330 TEST(loop1asQuad), |
4057 TEST(loop1), | 4331 TEST(loop1), |
4058 TEST(issue3517), | 4332 TEST(issue3517), |
4059 TEST(cubicOp118), | 4333 TEST(cubicOp118), |
4060 TEST(cubicOp117), | 4334 TEST(cubicOp117), |
4061 TEST(cubicOp116), | 4335 TEST(cubicOp116), |
4062 TEST(testRect2), | 4336 TEST(testRect2), |
4063 TEST(testRect1), | 4337 TEST(testRect1), |
4064 TEST(cubicOp115), | 4338 TEST(cubicOp115), |
4065 TEST(issue2753), | 4339 TEST(issue2753), |
4066 TEST(cubicOp114), // FIXME: curve with inflection is ordered the wrong way | 4340 TEST(cubicOp114), |
4067 TEST(issue2808), | 4341 TEST(issue2808), |
4068 TEST(cubicOp114asQuad), | 4342 TEST(cubicOp114asQuad), |
4069 TEST(rects4), | 4343 TEST(rects4), |
4070 TEST(rects3), | 4344 TEST(rects3), |
4071 TEST(rects2), | 4345 TEST(rects2), |
4072 TEST(rects1), | 4346 TEST(rects1), |
4073 TEST(issue2540), | 4347 TEST(issue2540), |
4074 TEST(issue2504), | 4348 TEST(issue2504), |
4075 TEST(kari1), | 4349 TEST(kari1), |
4076 TEST(quadOp10i), | 4350 TEST(quadOp10i), |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4183 TEST(cubicOp67u), | 4457 TEST(cubicOp67u), |
4184 TEST(cubicOp66u), | 4458 TEST(cubicOp66u), |
4185 TEST(rectOp1d), | 4459 TEST(rectOp1d), |
4186 TEST(cubicOp65d), | 4460 TEST(cubicOp65d), |
4187 TEST(cubicOp64d), | 4461 TEST(cubicOp64d), |
4188 TEST(cubicOp63d), | 4462 TEST(cubicOp63d), |
4189 TEST(cubicOp62d), | 4463 TEST(cubicOp62d), |
4190 TEST(cubicOp61d), | 4464 TEST(cubicOp61d), |
4191 TEST(cubicOp60d), | 4465 TEST(cubicOp60d), |
4192 TEST(cubicOp59d), | 4466 TEST(cubicOp59d), |
4193 TEST(cubicOp58d), | |
4194 TEST(cubicOp57d), | 4467 TEST(cubicOp57d), |
4195 TEST(cubicOp56d), | 4468 TEST(cubicOp56d), |
4196 TEST(cubicOp55d), | 4469 TEST(cubicOp55d), |
4197 TEST(cubicOp54d), | 4470 TEST(cubicOp54d), |
4198 TEST(cubicOp53d), | 4471 TEST(cubicOp53d), |
4199 TEST(cubicOp52d), | 4472 TEST(cubicOp52d), |
4200 TEST(cubicOp51d), | 4473 TEST(cubicOp51d), |
4201 TEST(cubicOp50d), | 4474 TEST(cubicOp50d), |
4202 TEST(cubicOp49d), | 4475 TEST(cubicOp49d), |
4203 TEST(cubicOp48d), | 4476 TEST(cubicOp48d), |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4269 TEST(cubicOp6d), | 4542 TEST(cubicOp6d), |
4270 TEST(cubicOp5d), | 4543 TEST(cubicOp5d), |
4271 TEST(cubicOp3d), | 4544 TEST(cubicOp3d), |
4272 TEST(cubicOp2d), | 4545 TEST(cubicOp2d), |
4273 TEST(cubicOp1d), | 4546 TEST(cubicOp1d), |
4274 }; | 4547 }; |
4275 | 4548 |
4276 static const size_t testCount = SK_ARRAY_COUNT(tests); | 4549 static const size_t testCount = SK_ARRAY_COUNT(tests); |
4277 | 4550 |
4278 static struct TestDesc subTests[] = { | 4551 static struct TestDesc subTests[] = { |
4279 TEST(cubicOp58d), | 4552 TEST(loop16), |
4280 TEST(cubicOp53d), | 4553 TEST(loop15), |
| 4554 TEST(loop12), |
| 4555 TEST(cubicOp132), |
| 4556 TEST(loop11), |
| 4557 TEST(loop10), |
| 4558 TEST(circlesOp3), |
| 4559 TEST(loop9), |
| 4560 TEST(loop8), |
| 4561 TEST(rects5), |
| 4562 TEST(loop7), |
| 4563 TEST(cubicOp130a), |
| 4564 TEST(rRect1x), |
| 4565 TEST(circlesOp2), |
| 4566 TEST(circlesOp1), |
| 4567 TEST(cubicOp131), |
| 4568 TEST(cubicOp130), |
| 4569 TEST(cubicOp129), |
| 4570 TEST(cubicOp128), |
| 4571 TEST(cubicOp127), |
| 4572 TEST(cubicOp126), |
| 4573 TEST(cubicOp125), |
| 4574 TEST(cubicOp124), |
| 4575 TEST(loop6), |
| 4576 TEST(loop5), |
| 4577 TEST(cubicOp123), |
| 4578 TEST(cubicOp122), |
| 4579 TEST(cubicOp121), |
| 4580 TEST(cubicOp120), |
| 4581 TEST(cubicOp119), |
| 4582 TEST(loop4), |
| 4583 TEST(loop3), |
| 4584 TEST(loop2), |
| 4585 TEST(loop1asQuad), |
| 4586 TEST(loop1), |
| 4587 TEST(issue3517), |
| 4588 TEST(cubicOp118), |
| 4589 TEST(cubicOp117), |
| 4590 TEST(cubicOp116), |
| 4591 TEST(testRect2), |
| 4592 TEST(testRect1), |
| 4593 TEST(cubicOp115), |
| 4594 TEST(issue2753), |
| 4595 TEST(cubicOp114), |
| 4596 TEST(issue2808), |
| 4597 TEST(cubicOp114asQuad), |
| 4598 TEST(rects4), |
| 4599 TEST(rects3), |
| 4600 TEST(rects2), |
| 4601 TEST(rects1), |
| 4602 TEST(issue2540), |
| 4603 TEST(issue2504), |
| 4604 TEST(kari1), |
| 4605 TEST(quadOp10i), |
| 4606 TEST(cubicOp113), |
| 4607 TEST(skpcarrot_is24), |
| 4608 TEST(issue1417), |
| 4609 TEST(cubicOp112), |
| 4610 TEST(skpadspert_net23), |
| 4611 TEST(skpadspert_de11), |
| 4612 TEST(findFirst1), |
| 4613 TEST(xOp2i), |
| 4614 TEST(xOp3i), |
| 4615 TEST(xOp1u), |
| 4616 TEST(xOp1i), |
| 4617 TEST(cubicOp111), |
| 4618 TEST(cubicOp110), |
| 4619 TEST(cubicOp109), |
| 4620 TEST(cubicOp108), |
| 4621 TEST(cubicOp107), |
| 4622 TEST(cubicOp106), |
| 4623 TEST(cubicOp105), |
| 4624 TEST(cubicOp104), |
| 4625 TEST(cubicOp103), |
| 4626 TEST(cubicOp102), |
| 4627 TEST(cubicOp101), |
| 4628 TEST(cubicOp100), |
| 4629 TEST(cubicOp99), |
4281 }; | 4630 }; |
4282 | 4631 |
4283 static const size_t subTestCount = SK_ARRAY_COUNT(subTests); | 4632 static const size_t subTestCount = SK_ARRAY_COUNT(subTests); |
4284 | 4633 |
4285 static void (*firstSubTest)(skiatest::Reporter* , const char* filename) = 0; | 4634 static void (*firstSubTest)(skiatest::Reporter* , const char* filename) = 0; |
4286 | 4635 |
4287 static bool runSubTests = false; | 4636 static bool runSubTests = false; |
4288 static bool runSubTestsFirst = false; | 4637 static bool runSubTestsFirst = true; |
4289 static bool runReverse = false; | 4638 static bool runReverse = false; |
4290 | 4639 |
4291 DEF_TEST(PathOpsOp, reporter) { | 4640 DEF_TEST(PathOpsOp, reporter) { |
4292 #if DEBUG_SHOW_TEST_NAME | 4641 #if DEBUG_SHOW_TEST_NAME |
4293 strncpy(DEBUG_FILENAME_STRING, "", DEBUG_FILENAME_STRING_LENGTH); | 4642 strncpy(DEBUG_FILENAME_STRING, "", DEBUG_FILENAME_STRING_LENGTH); |
4294 #endif | 4643 #endif |
4295 if (runSubTests && runSubTestsFirst) { | 4644 if (runSubTests && runSubTestsFirst) { |
4296 RunTestSet(reporter, subTests, subTestCount, firstSubTest, NULL, stopTes
t, runReverse); | 4645 RunTestSet(reporter, subTests, subTestCount, firstSubTest, NULL, stopTes
t, runReverse); |
4297 } | 4646 } |
4298 RunTestSet(reporter, tests, testCount, firstTest, skipTest, stopTest, runRev
erse); | 4647 RunTestSet(reporter, tests, testCount, firstTest, skipTest, stopTest, runRev
erse); |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4503 }; | 4852 }; |
4504 | 4853 |
4505 static const size_t failTestCount = SK_ARRAY_COUNT(failTests); | 4854 static const size_t failTestCount = SK_ARRAY_COUNT(failTests); |
4506 | 4855 |
4507 DEF_TEST(PathOpsFailOp, reporter) { | 4856 DEF_TEST(PathOpsFailOp, reporter) { |
4508 #if DEBUG_SHOW_TEST_NAME | 4857 #if DEBUG_SHOW_TEST_NAME |
4509 strncpy(DEBUG_FILENAME_STRING, "", DEBUG_FILENAME_STRING_LENGTH); | 4858 strncpy(DEBUG_FILENAME_STRING, "", DEBUG_FILENAME_STRING_LENGTH); |
4510 #endif | 4859 #endif |
4511 RunTestSet(reporter, failTests, failTestCount, NULL, NULL, NULL, false); | 4860 RunTestSet(reporter, failTests, failTestCount, NULL, NULL, NULL, false); |
4512 } | 4861 } |
OLD | NEW |