diff options
Diffstat (limited to 'core/fxcrt/widestring_unittest.cpp')
-rw-r--r-- | core/fxcrt/widestring_unittest.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/fxcrt/widestring_unittest.cpp b/core/fxcrt/widestring_unittest.cpp index b044a81bb0..93f6b07e72 100644 --- a/core/fxcrt/widestring_unittest.cpp +++ b/core/fxcrt/widestring_unittest.cpp @@ -5,6 +5,7 @@ #include "core/fxcrt/widestring.h" #include <algorithm> +#include <iterator> #include <vector> #include "core/fxcrt/fx_string.h" @@ -1449,6 +1450,15 @@ TEST(WideString, MultiCharIterator) { EXPECT_EQ(static_cast<int32_t>(L'a' + L'b' + L'c'), sum); } +TEST(WideString, StdBegin) { + WideString one_str(L"abc"); + std::vector<wchar_t> vec(std::begin(one_str), std::end(one_str)); + ASSERT_EQ(3u, vec.size()); + EXPECT_EQ(L'a', vec[0]); + EXPECT_EQ(L'b', vec[1]); + EXPECT_EQ(L'c', vec[2]); +} + TEST(WideString, AnyAllNoneOf) { WideString str(L"aaaaaaaaaaaaaaaaab"); EXPECT_FALSE(std::all_of(str.begin(), str.end(), |