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

Unified Diff: tests/HashTest.cpp

Issue 1280653003: Add approxBytesUsed to hashes. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 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 | « include/private/SkTHash.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/HashTest.cpp
diff --git a/tests/HashTest.cpp b/tests/HashTest.cpp
index 848986162d673eb24a9b1460d12615c7dbe8e0f8..f53faaf8647ada92054f1f883b60646e321b7af9 100644
--- a/tests/HashTest.cpp
+++ b/tests/HashTest.cpp
@@ -23,6 +23,8 @@ DEF_TEST(HashMap, r) {
map.set(3, 4.0);
REPORTER_ASSERT(r, map.count() == 1);
+ REPORTER_ASSERT(r, map.approxBytesUsed() > 0);
+
double* found = map.find(3);
REPORTER_ASSERT(r, found);
REPORTER_ASSERT(r, *found == 4.0);
« no previous file with comments | « include/private/SkTHash.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698