| 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 class PathTest_Private { | 10 class PathTest_Private { |
| (...skipping 5510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5521 | 5521 |
| 5522 static bool runSubTests = false; | 5522 static bool runSubTests = false; |
| 5523 static bool runSubTestsFirst = true; | 5523 static bool runSubTestsFirst = true; |
| 5524 static bool runReverse = false; | 5524 static bool runReverse = false; |
| 5525 | 5525 |
| 5526 DEF_TEST(PathOpsOp, reporter) { | 5526 DEF_TEST(PathOpsOp, reporter) { |
| 5527 #if DEBUG_SHOW_TEST_NAME | 5527 #if DEBUG_SHOW_TEST_NAME |
| 5528 strncpy(DEBUG_FILENAME_STRING, "", DEBUG_FILENAME_STRING_LENGTH); | 5528 strncpy(DEBUG_FILENAME_STRING, "", DEBUG_FILENAME_STRING_LENGTH); |
| 5529 #endif | 5529 #endif |
| 5530 if (runSubTests && runSubTestsFirst) { | 5530 if (runSubTests && runSubTestsFirst) { |
| 5531 RunTestSet(reporter, subTests, subTestCount, firstSubTest, NULL, stopTes
t, runReverse); | 5531 RunTestSet(reporter, subTests, subTestCount, firstSubTest, nullptr, stop
Test, runReverse); |
| 5532 } | 5532 } |
| 5533 RunTestSet(reporter, tests, testCount, firstTest, skipTest, stopTest, runRev
erse); | 5533 RunTestSet(reporter, tests, testCount, firstTest, skipTest, stopTest, runRev
erse); |
| 5534 if (runSubTests && !runSubTestsFirst) { | 5534 if (runSubTests && !runSubTestsFirst) { |
| 5535 RunTestSet(reporter, subTests, subTestCount, firstSubTest, NULL, stopTes
t, runReverse); | 5535 RunTestSet(reporter, subTests, subTestCount, firstSubTest, nullptr, stop
Test, runReverse); |
| 5536 } | 5536 } |
| 5537 } | 5537 } |
| 5538 | 5538 |
| 5539 static void bufferOverflow(skiatest::Reporter* reporter, const char* filename) { | 5539 static void bufferOverflow(skiatest::Reporter* reporter, const char* filename) { |
| 5540 SkPath path; | 5540 SkPath path; |
| 5541 path.addRect(0,0, 300,170141183460469231731687303715884105728.f); | 5541 path.addRect(0,0, 300,170141183460469231731687303715884105728.f); |
| 5542 SkPath pathB; | 5542 SkPath pathB; |
| 5543 pathB.addRect(0,0, 300,16); | 5543 pathB.addRect(0,0, 300,16); |
| 5544 testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); | 5544 testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); |
| 5545 } | 5545 } |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5736 TEST(fuzz433b), | 5736 TEST(fuzz433b), |
| 5737 TEST(bufferOverflow), | 5737 TEST(bufferOverflow), |
| 5738 }; | 5738 }; |
| 5739 | 5739 |
| 5740 static const size_t failTestCount = SK_ARRAY_COUNT(failTests); | 5740 static const size_t failTestCount = SK_ARRAY_COUNT(failTests); |
| 5741 | 5741 |
| 5742 DEF_TEST(PathOpsFailOp, reporter) { | 5742 DEF_TEST(PathOpsFailOp, reporter) { |
| 5743 #if DEBUG_SHOW_TEST_NAME | 5743 #if DEBUG_SHOW_TEST_NAME |
| 5744 strncpy(DEBUG_FILENAME_STRING, "", DEBUG_FILENAME_STRING_LENGTH); | 5744 strncpy(DEBUG_FILENAME_STRING, "", DEBUG_FILENAME_STRING_LENGTH); |
| 5745 #endif | 5745 #endif |
| 5746 RunTestSet(reporter, failTests, failTestCount, NULL, NULL, NULL, false); | 5746 RunTestSet(reporter, failTests, failTestCount, nullptr, nullptr, nullptr, fa
lse); |
| 5747 } | 5747 } |
| OLD | NEW |