From 59fcb54926e6685a61016e012216e06ab369e7a8 Mon Sep 17 00:00:00 2001 From: Alex Zolotarev Date: Wed, 25 May 2011 23:23:01 +0200 Subject: [PATCH] Fixed unit test for TokenizeIterator::GetUniString() --- base/base_tests/string_utils_test.cpp | 3 ++- base/string_utils.hpp | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/base/base_tests/string_utils_test.cpp b/base/base_tests/string_utils_test.cpp index b8e9e0d3c2..9b06ac014a 100644 --- a/base/base_tests/string_utils_test.cpp +++ b/base/base_tests/string_utils_test.cpp @@ -124,7 +124,8 @@ UNIT_TEST(LastUniChar) UNIT_TEST(GetUniString) { - strings::SimpleTokenizer iter("Hello, \xD0\x9C\xD0\xB8\xD0\xBD\xD1\x81\xD0\xBA!", ", !"); + string const s = "Hello, \xD0\x9C\xD0\xB8\xD0\xBD\xD1\x81\xD0\xBA!"; + strings::SimpleTokenizer iter(s, ", !"); { strings::UniChar const s[] = { 'H', 'e', 'l', 'l', 'o' }; strings::UniString us(&s[0], &s[0] + ARRAY_SIZE(s)); diff --git a/base/string_utils.hpp b/base/string_utils.hpp index 52530381d0..69f052dc4f 100644 --- a/base/string_utils.hpp +++ b/base/string_utils.hpp @@ -22,6 +22,9 @@ class TokenizeIterator Utf8IterT m_beg, m_end, m_finish; DelimFuncT m_delimFunc; + /// Explicitly disabled, because we're storing iterators for string + TokenizeIterator(char const *, DelimFuncT); + void move() { m_beg = m_end;