diff options
author | 2016-10-20 08:32:18 -0700 | |
---|---|---|
committer | 2016-10-20 08:32:18 -0700 | |
commit | a35ab3e6e024d0b548ded26a2e3b8ecd838ead93 (patch) | |
tree | c009069f86b1129fcf5037ffc8e8fbf1b9ba010f /tests/PathOpsDCubicTest.cpp | |
parent | 65820db5e15201a3f30968420232d36c0ca89cd8 (diff) |
fix fuzzers
Many old pathops-related fuzz failures have built up while
the codebase was under a state a flux. Now that the code
is stable, address these failures.
Most of the CL plumbs the debug global state to downstream
routines so that, if the data is not trusted (ala fuzzed)
the function can safely exit without asserting.
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2426173002
Review-Url: https://chromiumcodereview.appspot.com/2426173002
Diffstat (limited to 'tests/PathOpsDCubicTest.cpp')
-rw-r--r-- | tests/PathOpsDCubicTest.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/PathOpsDCubicTest.cpp b/tests/PathOpsDCubicTest.cpp index 4b5e7b4b67..b8c08dfd16 100644 --- a/tests/PathOpsDCubicTest.cpp +++ b/tests/PathOpsDCubicTest.cpp @@ -8,7 +8,7 @@ #include "SkPathOpsCubic.h" #include "Test.h" -static const SkDCubic hullTests[] = { +static const CubicPts hullTests[] = { {{{2.6250000819563866, 2.3750000223517418}, {2.833333432674408, 2.3333333432674408}, {3.1111112236976624, 2.3333333134651184}, {3.4074075222015381, 2.3333332538604736}}}, }; @@ -16,7 +16,9 @@ static const size_t hullTests_count = SK_ARRAY_COUNT(hullTests); DEF_TEST(PathOpsCubicHull, reporter) { for (size_t index = 0; index < hullTests_count; ++index) { - const SkDCubic& cubic = hullTests[index]; + const CubicPts& c = hullTests[index]; + SkDCubic cubic; + cubic.debugSet(c.fPts); char order[4]; cubic.convexHull(order); } |