fixed GH #722: Unicode Converter Test confuses string and char types

This commit is contained in:
Guenter Obiltschnig 2015-07-31 10:23:16 +02:00
parent d2c64b4493
commit e438061ce7

View File

@ -47,9 +47,9 @@ private:
// Convert from UTF-8 to wide
T wtext, wtext2, wtext3;
Poco::UnicodeConverter::convert(text, wtext);
if (sizeof(T) == 2)
if (sizeof(typename T::value_type) == 2)
assert(Poco::UnicodeConverter::UTFStrlen(wtext.data()) == 8);
else if (sizeof(T) == 4)
else if (sizeof(typename T::value_type) == 4)
assert(Poco::UnicodeConverter::UTFStrlen(wtext.data()) == 5);
Poco::UnicodeConverter::convert((const char*) supp, strlen((const char*) supp), wtext2);
Poco::UnicodeConverter::convert((const char*)supp, wtext3);