diff options
Diffstat (limited to 'base/string_util_unittest.cc')
-rw-r--r-- | base/string_util_unittest.cc | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/base/string_util_unittest.cc b/base/string_util_unittest.cc index 8163ba0..617b0eb 100644 --- a/base/string_util_unittest.cc +++ b/base/string_util_unittest.cc @@ -18,31 +18,6 @@ using ::testing::ElementsAre; namespace base { -namespace { - -// Given a null-terminated string of wchar_t with each wchar_t representing -// a UTF-16 code unit, returns a string16 made up of wchar_t's in the input. -// Each wchar_t should be <= 0xFFFF and a non-BMP character (> U+FFFF) -// should be represented as a surrogate pair (two UTF-16 units) -// *even* where wchar_t is 32-bit (Linux and Mac). -// -// This is to help write tests for functions with string16 params until -// the C++ 0x UTF-16 literal is well-supported by compilers. -string16 BuildString16(const wchar_t* s) { -#if defined(WCHAR_T_IS_UTF16) - return string16(s); -#elif defined(WCHAR_T_IS_UTF32) - string16 u16; - while (*s != 0) { - DCHECK_LE(static_cast<unsigned int>(*s), 0xFFFFu); - u16.push_back(*s++); - } - return u16; -#endif -} - -} // namespace - static const struct trim_case { const wchar_t* input; const TrimPositions positions; |