MCPcopy Create free account
hub / github.com/catboost/catboost / TestSubstrUTF8

Method TestSubstrUTF8

util/charset/wide_ut.cpp:609–615  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

607}
608
609void 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
617inline bool MustBeSurrogate(wchar32 ch) {
618 return ch > 0xFFFF;

Callers

nothing calls this directly

Calls 2

SubstrUTF8Function · 0.85
substrMethod · 0.45

Tested by

no test coverage detected