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 | 8 |
9 #define TEST(name) { name, #name } | 9 #define TEST(name) { name, #name } |
10 | 10 |
(...skipping 5238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5249 } | 5249 } |
5250 tiger8a_x(reporter, filename, testlines); | 5250 tiger8a_x(reporter, filename, testlines); |
5251 } | 5251 } |
5252 } | 5252 } |
5253 } | 5253 } |
5254 | 5254 |
5255 static void tiger8a_h_1(skiatest::Reporter* reporter, const char* filename) { | 5255 static void tiger8a_h_1(skiatest::Reporter* reporter, const char* filename) { |
5256 #if DEBUG_UNDER_DEVELOPMENT // tiger | 5256 #if DEBUG_UNDER_DEVELOPMENT // tiger |
5257 return; | 5257 return; |
5258 #endif | 5258 #endif |
5259 uint64_t testlines = 0x0000000a01900c00; // best so far: 0x0000001d14c14bb1
; | 5259 uint64_t testlines = 0x0000000000002008; // best so far: 0x0000001d14c14bb1
; |
5260 tiger8a_x(reporter, filename, testlines); | 5260 tiger8a_x(reporter, filename, testlines); |
5261 } | 5261 } |
5262 | 5262 |
5263 static void tiger8b_x(skiatest::Reporter* reporter, const char* filename, uint64
_t testlines) { | 5263 static void tiger8b_x(skiatest::Reporter* reporter, const char* filename, uint64
_t testlines) { |
5264 #if DEBUG_UNDER_DEVELOPMENT // tiger | 5264 #if DEBUG_UNDER_DEVELOPMENT // tiger |
5265 return; | 5265 return; |
5266 #endif | 5266 #endif |
5267 SkPath path; | 5267 SkPath path; |
5268 uint64_t i = 0; | 5268 uint64_t i = 0; |
5269 if (testlines & (1LL << i++)) path.moveTo(SkBits2Float(0x43f72ca1), SkBits2Float
(0x43609572)); // 494.349f, 224.584f | 5269 if (testlines & (1LL << i++)) path.moveTo(SkBits2Float(0x43f72ca1), SkBits2Float
(0x43609572)); // 494.349f, 224.584f |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5324 } | 5324 } |
5325 tiger8b_x(reporter, filename, testlines); | 5325 tiger8b_x(reporter, filename, testlines); |
5326 } | 5326 } |
5327 } | 5327 } |
5328 } | 5328 } |
5329 | 5329 |
5330 static void tiger8b_h_1(skiatest::Reporter* reporter, const char* filename) { | 5330 static void tiger8b_h_1(skiatest::Reporter* reporter, const char* filename) { |
5331 #if DEBUG_UNDER_DEVELOPMENT // tiger | 5331 #if DEBUG_UNDER_DEVELOPMENT // tiger |
5332 return; | 5332 return; |
5333 #endif | 5333 #endif |
5334 uint64_t testlines = 0x0000001000350204; // best so far: 0x0000000104080223 | 5334 uint64_t testlines = 0x000000201304b4a3; // best so far: 0x000000201304b4a3 |
5335 tiger8b_x(reporter, filename, testlines); | 5335 tiger8b_x(reporter, filename, testlines); |
5336 } | 5336 } |
5337 | 5337 |
5338 // tries to add same edge twice | 5338 // tries to add same edge twice |
5339 static void tiger8b(skiatest::Reporter* reporter, const char* filename) { | 5339 static void tiger8b(skiatest::Reporter* reporter, const char* filename) { |
5340 #if DEBUG_UNDER_DEVELOPMENT // tiger | 5340 #if DEBUG_UNDER_DEVELOPMENT // tiger |
5341 return; | 5341 return; |
5342 #endif | 5342 #endif |
5343 SkPath path; | 5343 SkPath path; |
5344 path.moveTo(SkBits2Float(0x43f72ca1), SkBits2Float(0x43609572)); // 494.349f, 2
24.584f | 5344 path.moveTo(SkBits2Float(0x43f72ca1), SkBits2Float(0x43609572)); // 494.349f, 2
24.584f |
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5863 path.lineTo(0, 3); | 5863 path.lineTo(0, 3); |
5864 path.close(); | 5864 path.close(); |
5865 path.moveTo(0, 0); | 5865 path.moveTo(0, 0); |
5866 path.lineTo(0, 0); | 5866 path.lineTo(0, 0); |
5867 path.quadTo(0, 1, 1, 1); | 5867 path.quadTo(0, 1, 1, 1); |
5868 path.close(); | 5868 path.close(); |
5869 testSimplify(reporter, path, filename); | 5869 testSimplify(reporter, path, filename); |
5870 } | 5870 } |
5871 | 5871 |
5872 static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0; | 5872 static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0; |
5873 static void (*firstTest)(skiatest::Reporter* , const char* filename) = tiger8b_h
_1; | 5873 static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0; |
5874 static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; | 5874 static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; |
5875 | 5875 |
5876 static TestDesc tests[] = { | 5876 static TestDesc tests[] = { |
5877 TEST(testQuads73), | |
5878 TEST(tiger8a_h_1), | 5877 TEST(tiger8a_h_1), |
5879 TEST(tiger8a_h), | 5878 TEST(tiger8a_h), |
5880 TEST(tiger8a), | 5879 TEST(tiger8a), |
5881 TEST(tiger8b_h_1), | 5880 TEST(tiger8b_h_1), |
5882 TEST(tiger8b_h), | 5881 TEST(tiger8b_h), |
5883 TEST(tiger8b), | 5882 TEST(tiger8b), |
5884 TEST(tiger8), | 5883 TEST(tiger8), |
| 5884 TEST(testQuads73), |
5885 TEST(testQuads72), | 5885 TEST(testQuads72), |
5886 TEST(testQuads71), | 5886 TEST(testQuads71), |
5887 TEST(testQuads70), | 5887 TEST(testQuads70), |
5888 TEST(testQuads69), | 5888 TEST(testQuads69), |
5889 TEST(testQuads68), | 5889 TEST(testQuads68), |
5890 TEST(testQuads67), | 5890 TEST(testQuads67), |
5891 TEST(testQuads66), | 5891 TEST(testQuads66), |
5892 TEST(dean4), | 5892 TEST(dean4), |
5893 TEST(fuzz763_4713_b), | 5893 TEST(fuzz763_4713_b), |
5894 TEST(fuzz_twister2), | 5894 TEST(fuzz_twister2), |
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6338 | 6338 |
6339 DEF_TEST(PathOpsSimplify, reporter) { | 6339 DEF_TEST(PathOpsSimplify, reporter) { |
6340 if (runSubTests && runSubTestsFirst) { | 6340 if (runSubTests && runSubTestsFirst) { |
6341 RunTestSet(reporter, subTests, subTestCount, firstSubTest, nullptr, stop
Test, runReverse); | 6341 RunTestSet(reporter, subTests, subTestCount, firstSubTest, nullptr, stop
Test, runReverse); |
6342 } | 6342 } |
6343 RunTestSet(reporter, tests, testCount, firstTest, skipTest, stopTest, runRev
erse); | 6343 RunTestSet(reporter, tests, testCount, firstTest, skipTest, stopTest, runRev
erse); |
6344 if (runSubTests && !runSubTestsFirst) { | 6344 if (runSubTests && !runSubTestsFirst) { |
6345 RunTestSet(reporter, subTests, subTestCount, firstSubTest, nullptr, stop
Test, runReverse); | 6345 RunTestSet(reporter, subTests, subTestCount, firstSubTest, nullptr, stop
Test, runReverse); |
6346 } | 6346 } |
6347 } | 6347 } |
OLD | NEW |