| 607 | } |
| 608 | |
| 609 | void TConversionTest::TestSubstrUTF8() { |
| 610 | TStringBuf utextBuf(utext, sizeof(utext)); |
| 611 | UNIT_ASSERT(SubstrUTF8(utextBuf, 0, 2) == utextBuf.substr(0, 4)); |
| 612 | UNIT_ASSERT(SubstrUTF8(utextBuf, 1, 1) == utextBuf.substr(2, 2)); |
| 613 | UNIT_ASSERT(SubstrUTF8(utextBuf, 1, 2) == utextBuf.substr(2, 4)); |
| 614 | UNIT_ASSERT(SubstrUTF8(utextBuf, 1, 3) == utextBuf.substr(2, 6)); |
| 615 | } |
| 616 | |
| 617 | inline bool MustBeSurrogate(wchar32 ch) { |
| 618 | return ch > 0xFFFF; |
nothing calls this directly
no test coverage detected