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

Unified Diff: base/string16_unittest.cc

Issue 16331011: Move string files in base/ to the string subdirectory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 6 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 | « base/string16.cc ('k') | base/string_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/string16_unittest.cc
diff --git a/base/string16_unittest.cc b/base/string16_unittest.cc
deleted file mode 100644
index cd8f4f647a7039d3d13888928d61161a68a93a7c..0000000000000000000000000000000000000000
--- a/base/string16_unittest.cc
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <sstream>
-
-#include "base/string16.h"
-#include "base/strings/utf_string_conversions.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-#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) {
- // Basic stream test.
- {
- std::ostringstream stream;
- stream << "Empty '" << string16() << "' standard '"
- << string16(ASCIIToUTF16("Hello, world")) << "'";
- EXPECT_STREQ("Empty '' standard 'Hello, world'",
- stream.str().c_str());
- }
-
- // Interesting edge cases.
- {
- // These should each get converted to the invalid character: EF BF BD.
- string16 initial_surrogate;
- initial_surrogate.push_back(0xd800);
- string16 final_surrogate;
- final_surrogate.push_back(0xdc00);
-
- // Old italic A = U+10300, will get converted to: F0 90 8C 80 'z'.
- string16 surrogate_pair;
- surrogate_pair.push_back(0xd800);
- surrogate_pair.push_back(0xdf00);
- surrogate_pair.push_back('z');
-
- // Will get converted to the invalid char + 's': EF BF BD 's'.
- string16 unterminated_surrogate;
- unterminated_surrogate.push_back(0xd800);
- unterminated_surrogate.push_back('s');
-
- std::ostringstream stream;
- stream << initial_surrogate << "," << final_surrogate << ","
- << surrogate_pair << "," << unterminated_surrogate;
-
- EXPECT_STREQ("\xef\xbf\xbd,\xef\xbf\xbd,\xf0\x90\x8c\x80z,\xef\xbf\xbds",
- stream.str().c_str());
- }
-}
-
-#endif
« no previous file with comments | « base/string16.cc ('k') | base/string_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698