diff options
author | djsollen <djsollen@google.com> | 2016-01-29 08:51:04 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-29 08:51:04 -0800 |
commit | f2b340fc885ad2a12d2d73974eff9c8f4c94192c (patch) | |
tree | 1fbe8cefea121d557efb099ceea8c5fae0ac5e1e /tests | |
parent | 2a1d401bf2d500bab225b78a20cb6f16b2c67efb (diff) |
Consolidate SK_CRASH and sk_throw into SK_ABORT
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1648343003
Review URL: https://codereview.chromium.org/1648343003
Diffstat (limited to 'tests')
-rw-r--r-- | tests/CachedDataTest.cpp | 2 | ||||
-rw-r--r-- | tests/PathOpsCubicLineIntersectionIdeas.cpp | 20 |
2 files changed, 11 insertions, 11 deletions
diff --git a/tests/CachedDataTest.cpp b/tests/CachedDataTest.cpp index c3fc9a47bf..6c44161707 100644 --- a/tests/CachedDataTest.cpp +++ b/tests/CachedDataTest.cpp @@ -30,7 +30,7 @@ static SkCachedData* make_data(size_t size, SkDiscardableMemoryPool* pool) { if (pool) { SkDiscardableMemory* dm = pool->create(size); // the pool "can" return null, but it shouldn't in these controlled conditions - SK_ALWAYSBREAK(dm); + SkASSERT_RELEASE(dm); return new SkCachedData(size, dm); } else { return new SkCachedData(sk_malloc_throw(size), size); diff --git a/tests/PathOpsCubicLineIntersectionIdeas.cpp b/tests/PathOpsCubicLineIntersectionIdeas.cpp index 6aec8b148a..b23dd0ceaf 100644 --- a/tests/PathOpsCubicLineIntersectionIdeas.cpp +++ b/tests/PathOpsCubicLineIntersectionIdeas.cpp @@ -194,13 +194,13 @@ DEF_TEST(PathOpsCubicLineRoots, reporter) { if (realRoots == 3) { smallest = SkTMin(smallest, allRoots[2]); } - SK_ALWAYSBREAK(smallest < 0); - SK_ALWAYSBREAK(smallest >= -1); + SkASSERT_RELEASE(smallest < 0); + SkASSERT_RELEASE(smallest >= -1); largeBits = 0; } else { frexp(largest, &largeBits); - SK_ALWAYSBREAK(largeBits >= 0); - SK_ALWAYSBREAK(largeBits < 256); + SkASSERT_RELEASE(largeBits >= 0); + SkASSERT_RELEASE(largeBits < 256); } double step = 1e-6; if (largeBits > 21) { @@ -222,7 +222,7 @@ DEF_TEST(PathOpsCubicLineRoots, reporter) { break; } step *= 1.5; - SK_ALWAYSBREAK(step < 1); + SkASSERT_RELEASE(step < 1); } while (true); worstStep[largeBits] = SkTMax(worstStep[largeBits], diff); #if 0 @@ -256,11 +256,11 @@ static double testOneFailure(const CubicLineFailures& failure) { double allRoots[3] = {0}, validRoots[3] = {0}; int realRoots = SkDCubic::RootsReal(A, B, C, D, allRoots); int valid = SkDQuad::AddValidTs(allRoots, realRoots, validRoots); - SK_ALWAYSBREAK(valid == 1); - SK_ALWAYSBREAK(realRoots != 1); + SkASSERT_RELEASE(valid == 1); + SkASSERT_RELEASE(realRoots != 1); double t = validRoots[0]; SkDPoint calcPt = cubic.ptAtT(t); - SK_ALWAYSBREAK(!calcPt.approximatelyEqual(pt)); + SkASSERT_RELEASE(!calcPt.approximatelyEqual(pt)); int iters = 0; double newT = binary_search(cubic, 0.1, pt, t, &iters); return newT; @@ -271,7 +271,7 @@ DEF_TEST(PathOpsCubicLineFailures, reporter) { for (int index = 0; index < cubicLineFailuresCount; ++index) { const CubicLineFailures& failure = cubicLineFailures[index]; double newT = testOneFailure(failure); - SK_ALWAYSBREAK(newT >= 0); + SkASSERT_RELEASE(newT >= 0); } } @@ -279,5 +279,5 @@ DEF_TEST(PathOpsCubicLineOneFailure, reporter) { return; // disable for now const CubicLineFailures& failure = cubicLineFailures[1]; double newT = testOneFailure(failure); - SK_ALWAYSBREAK(newT >= 0); + SkASSERT_RELEASE(newT >= 0); } |