Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1846)

Unified Diff: tests/ImageFilterCacheTest.cpp

Issue 1901883002: Make SkImageFilter::Cache purging methods pure virtual (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkImageFilter.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ImageFilterCacheTest.cpp
diff --git a/tests/ImageFilterCacheTest.cpp b/tests/ImageFilterCacheTest.cpp
index 1337d016b755d3457f84f3b7d59a3491ccbd1f43..688069ea45908a8fb6958515ff0936aa51bb25ea 100644
--- a/tests/ImageFilterCacheTest.cpp
+++ b/tests/ImageFilterCacheTest.cpp
@@ -113,6 +113,7 @@ static void test_explicit_purging(skiatest::Reporter* reporter,
SkIPoint offset = SkIPoint::Make(3, 4);
cache->set(key1, image.get(), offset);
cache->set(key2, image.get(), offset);
+ SkDEBUGCODE(REPORTER_ASSERT(reporter, 2 == cache->count());)
SkIPoint foundOffset;
@@ -120,11 +121,13 @@ static void test_explicit_purging(skiatest::Reporter* reporter,
REPORTER_ASSERT(reporter, cache->get(key2, &foundOffset));
cache->purgeByKeys(&key1, 1);
+ SkDEBUGCODE(REPORTER_ASSERT(reporter, 1 == cache->count());)
REPORTER_ASSERT(reporter, !cache->get(key1, &foundOffset));
REPORTER_ASSERT(reporter, cache->get(key2, &foundOffset));
cache->purge();
+ SkDEBUGCODE(REPORTER_ASSERT(reporter, 0 == cache->count());)
REPORTER_ASSERT(reporter, !cache->get(key1, &foundOffset));
REPORTER_ASSERT(reporter, !cache->get(key2, &foundOffset));
« no previous file with comments | « src/core/SkImageFilter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698