#include "base/containers/hash_tables.h"
+#include <string>
+
#include "base/basictypes.h"
#include "testing/gtest/include/gtest/gtest.h"
(GG_INT64_C(1) << 60) + GG_INT64_C(78931732321));
}
+// Verify that base::hash_set<const char*> compares by pointer value, not as C
+// strings.
+TEST(HashTableTest, CharPointers) {
+ std::string str1("hello");
+ std::string str2("hello");
+ base::hash_set<const char*> set;
+
+ set.insert(str1.c_str());
+ EXPECT_EQ(1u, set.count(str1.c_str()));
+ EXPECT_EQ(0u, set.count(str2.c_str()));
+}
+
} // namespace