summaryrefslogtreecommitdiffstats
path: root/base/strings/string16_unittest.cc
diff options
context:
space:
mode:
authordavidben <davidben@chromium.org>2016-01-20 17:40:42 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-21 01:41:32 +0000
commit021a2b496a7eb7222c0c7f4d8cd01d697c3f2dda (patch)
treed1af96a93a7e2f4defa4c680bc50a3170f06561a /base/strings/string16_unittest.cc
parent38b5efd43f39caec997e343801e3ae712d4c67ad (diff)
downloadchromium_src-021a2b496a7eb7222c0c7f4d8cd01d697c3f2dda.zip
chromium_src-021a2b496a7eb7222c0c7f4d8cd01d697c3f2dda.tar.gz
chromium_src-021a2b496a7eb7222c0c7f4d8cd01d697c3f2dda.tar.bz2
Revert of Allow std::unordered_*. (patchset #15 id:280001 of https://codereview.chromium.org/1502373009/ )
Reason for revert: MSan build failure. https://build.chromium.org/p/chromium.memory.fyi/builders/Chromium%20Linux%20ChromeOS%20MSan%20Builder/builds/12498 Original issue's description: > Allow std::unordered_*. > > base::hash_* is, as a transition step, implemented in terms of > std::unordered_*. Later commits will convert existing uses. > > Also fix a host of IWYU problems that arose from this CL. > > (NOPRESUBMIT because the wstring presubmit check is overzealous > and complains about the reference to wstring in the comment.) > > NOPRESUBMIT=true > BUG=576864 > TBR=derat@chromium.org,blundell@chromium.org,jbauman@chromium.org,dalecurtis@chromium.org > CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel > > Committed: https://crrev.com/3f37f7f1459e7b5a452c0e433493e0a6e9649ca7 > Cr-Commit-Position: refs/heads/master@{#370553} TBR=danakj@chromium.org,thakis@chromium.org,derat@chromium.org,blundell@chromium.org,dalecurtis@chromium.org,jbauman@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=576864 Review URL: https://codereview.chromium.org/1610023003 Cr-Commit-Position: refs/heads/master@{#370559}
Diffstat (limited to 'base/strings/string16_unittest.cc')
-rw-r--r--base/strings/string16_unittest.cc14
1 files changed, 3 insertions, 11 deletions
diff --git a/base/strings/string16_unittest.cc b/base/strings/string16_unittest.cc
index 0d2ca80..4e58218 100644
--- a/base/strings/string16_unittest.cc
+++ b/base/strings/string16_unittest.cc
@@ -3,7 +3,6 @@
// found in the LICENSE file.
#include <sstream>
-#include <unordered_set>
#include "base/strings/string16.h"
@@ -12,6 +11,8 @@
namespace base {
+#if defined(WCHAR_T_IS_UTF32)
+
// We define a custom operator<< for string16 so we can use it with logging.
// This tests that conversion.
TEST(String16Test, OutputStream) {
@@ -52,15 +53,6 @@ TEST(String16Test, OutputStream) {
}
}
-TEST(String16Test, Hash) {
- string16 str1 = ASCIIToUTF16("hello");
- string16 str2 = ASCIIToUTF16("world");
-
- std::unordered_set<string16> set;
-
- set.insert(str1);
- EXPECT_EQ(1u, set.count(str1));
- EXPECT_EQ(0u, set.count(str2));
-}
+#endif
} // namespace base