/* * stringconverttest.cpp * * Created on: Jul 9, 2014 * Author: gregor */ #include #include #include "GLTB/stringconvert.h" TEST(StringConvert, convertUtf16ToUtf8Char) { wchar_t input[2]; input[1] = '\0'; for(wchar_t i = 1; i <= 0x7FFFF; i++) { input[0] = i; char *output = gltb::utf16ToUtf8Char(input); wchar_t *result = gltb::utf8ToUtf16WChar(output); ASSERT_EQ(1, wcslen(result)); ASSERT_EQ(input[0], result[0]); delete[] result; delete[] output; } } TEST(StringConvert, convertUtf8ToUtf16Char) { // TODO } int main(int argc, char *argv[]) { ::testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); }