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

Unified Diff: tests/HashTest.cpp

Issue 1058553002: Add SkTHashSet::find() (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: const Created 5 years, 9 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/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 5abf3db50a56885bd4fa7c0931590c6d1f2323d4..d2acafe08b04aef88c2b71d013a3ce0db0097c17 100644
--- a/tests/HashTest.cpp
+++ b/tests/HashTest.cpp
@@ -1,3 +1,10 @@
+/*
+ * Copyright 2015 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
#include "SkChecksum.h"
#include "SkString.h"
#include "SkTHash.h"
@@ -61,6 +68,9 @@ DEF_TEST(HashSet, r) {
REPORTER_ASSERT(r, set.contains(SkString("World")));
REPORTER_ASSERT(r, !set.contains(SkString("Goodbye")));
+ REPORTER_ASSERT(r, set.find(SkString("Hello")));
+ REPORTER_ASSERT(r, *set.find(SkString("Hello")) == SkString("Hello"));
+
set.reset();
REPORTER_ASSERT(r, set.count() == 0);
}
« no previous file with comments | « src/core/SkTHash.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698