| 40 | }; |
| 41 | |
| 42 | TEST_F(UnicoderTest, toUTF8) |
| 43 | { |
| 44 | #ifdef _UNICODE |
| 45 | wchar_t str[] = {'A','B','C', 0xd867, 0xde3d, 0}; |
| 46 | std::string utf8 = ucr::toUTF8(str); |
| 47 | EXPECT_STREQ("ABC\xf0\xa9\xb8\xbd", utf8.c_str()); |
| 48 | |
| 49 | EXPECT_EQ(false, ucr::CheckForInvalidUtf8(utf8.c_str(), utf8.length())); |
| 50 | #endif |
| 51 | } |
| 52 | |
| 53 | TEST_F(UnicoderTest, CheckForInvalidUtf8) |
| 54 | { |
nothing calls this directly
no test coverage detected