16 0x10000, 0x18080, 0x20202, 0xFFFFF, 0x101234
24 const uint16_t* ptr = buf;
39 {
"\xC3\x83", (3 << 6) | 3 },
40 {
"\xDF\xBF", 0x7ff },
41 {
"\xE0\xA0\x80", 0x800 },
42 {
"\xE0\xB0\xB8", 0xC38 },
43 {
"\xE3\x83\x83", (3 << 12) | (3 << 6) | 3 },
44 {
"\xEF\xBF\xBF", 0xFFFF },
45 {
"\xF0\x90\x80\x80", 0x10000 },
46 {
"\xF3\x83\x83\x83", (3 << 18) | (3 << 12) | (3 << 6) | 3 }
48 for (
auto test : gTest) {
49 const char*
p =
test.fUtf8;
50 const char* stop =
p + strlen(
p);
61#define CONTINUATION_BYTE "\xA1"
62#define LEADING_TWO_BYTE "\xC2"
63#define LEADING_THREE_BYTE "\xE1"
64#define LEADING_FOUR_BYTE "\xF0"
65#define INVALID_BYTE "\xFC"
69 const char* utf8String;
97 const char* str = testCase.utf8String;
105 const char* utf8String;
115 const char* str = testCase.utf8String;
117 REPORTER_ASSERT(r, str == testCase.utf8String + strlen(testCase.utf8String));
119 char buff[5] = {0, 0, 0, 0, 0};
121 if (buff[
len] != 0) {
122 ERRORF(r,
"unexpected write");
130 ERRORF(r,
"unexpected failure.");
134 ERRORF(r,
"wrote too much");
137 str = testCase.utf8String;
144#undef CONTINUATION_BYTE
145#undef LEADING_TWO_BYTE
146#undef LEADING_THREE_BYTE
147#undef LEADING_FOUR_BYTE
DEF_TEST(SkUTF_UTF16, reporter)
#define CONTINUATION_BYTE
#define LEADING_THREE_BYTE
#define LEADING_FOUR_BYTE
#define REPORTER_ASSERT(r, cond,...)
SK_SPI size_t ToUTF8(SkUnichar uni, char utf8[kMaxBytesInUTF8Sequence]=nullptr)
SK_SPI int CountUTF16(const uint16_t *utf16, size_t byteLength)
SK_SPI SkUnichar NextUTF16(const uint16_t **ptr, const uint16_t *end)
SK_SPI SkUnichar NextUTF8(const char **ptr, const char *end)
SK_SPI size_t ToUTF16(SkUnichar uni, uint16_t utf16[2]=nullptr)
SK_SPI int CountUTF8(const char *utf8, size_t byteLength)
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size