Lines Matching +full:0 +full:x7f
59 uint16_t leadSur= 0xD800; in HWTEST_F_L0()
60 uint16_t trailSur = 0xDC00; in HWTEST_F_L0()
61 …uint32_t codePoint = static_cast<uint32_t>(((leadSur - 0xD800U) << 10)|(trailSur - 0xDc00U)) + 0x1… in HWTEST_F_L0()
64 EXPECT_EQ(codePoint, static_cast<uint32_t>(0x10000)); in HWTEST_F_L0()
65 trailSur = 0xDFFF; in HWTEST_F_L0()
66 codePoint = static_cast<uint32_t>(((leadSur - 0xD800U) << 10) | (trailSur - 0xDC00U))+ 0x10000U; in HWTEST_F_L0()
69 EXPECT_EQ(codePoint, static_cast<uint32_t>(0x103FF)); in HWTEST_F_L0()
70 leadSur = 0xDBFF; in HWTEST_F_L0()
71 … codePoint = static_cast<uint32_t>(((leadSur - 0xD800U) << 10) | (trailSur - 0xDC00U)) + 0x10000U; in HWTEST_F_L0()
74 EXPECT_EQ(codePoint, static_cast<uint32_t>(0x10FFFF)); in HWTEST_F_L0()
75 trailSur = 0xDC00; in HWTEST_F_L0()
76 … codePoint = static_cast<uint32_t>(((leadSur - 0xD800U) << 10) | (trailSur - 0xDC00U)) + 0x10000U; in HWTEST_F_L0()
79 EXPECT_EQ(codePoint, static_cast<uint32_t>(0x10FC00)); in HWTEST_F_L0()
80 leadSur= 0xD950; in HWTEST_F_L0()
81 trailSur= 0xDF21; in HWTEST_F_L0()
82 codePoint = static_cast<uint32_t>(((leadSur - 0xD800U)<< 10) | (trailSur - 0xDC00U)) + 0x10000U; in HWTEST_F_L0()
85 EXPECT_EQ(codePoint, static_cast<uint32_t>(0x64321)); in HWTEST_F_L0()
96 uint16_t lead = 0xD950; in HWTEST_F_L0()
97 uint16_t trail = 0xDF21; in HWTEST_F_L0()
101 EXPECT_EQ(codePoint, 0x64321U); in HWTEST_F_L0()
102 lead = 0xD85D; in HWTEST_F_L0()
103 trail = 0xDFCC; in HWTEST_F_L0()
107 EXPECT_EQ(codePoint, 0x277CCU); in HWTEST_F_L0()
117 const std::vector<uint8_t> utfDataOneBitVaild1 = {0x00}; // //0xxxxxxx in HWTEST_F_L0()
118 const std::vector<uint8_t> utfDataOneBitVaild2 = {BIT_MASK_1 - 0x01}; in HWTEST_F_L0()
124 const std::vector<uint8_t> utfDataTwoBitVaild2 = {BIT_MASK_3 - 0x01, BIT_MASK_2 - 0x01}; in HWTEST_F_L0()
132 …td::vector<uint8_t>utfDataThreeBitVaild2 = {BIT_MASK_4 - 0x01, BIT_MASK_2 - 0x01, BIT_MASK_2 - 0x0… in HWTEST_F_L0()
145 {BIT_MASK_5 - 0x01, BIT_MASK_2 - 0x01, BIT_MASK_2 - 0x01, BIT_MASK_2 - 0x01}; in HWTEST_F_L0()
164 * indicates whether to perform special conversion for 0.
169 // codePoint lie in [0,0x7F]--->UTF-8(length:1) in HWTEST_F_L0()
171 uint16_t utf16Data0 = 0x00; in HWTEST_F_L0()
172 uint16_t utf16Data1= 0x00; in HWTEST_F_L0()
174 Utf8Char utf8CharTemp = {0, {0x00U}}; in HWTEST_F_L0()
181 uint16_t utf16Data0 = 0x00; in HWTEST_F_L0()
182 uint16_t utf16Data1= 0x00; in HWTEST_F_L0()
187 utf16Data0 = 0x7F; in HWTEST_F_L0()
189 utf8CharTemp = {1, {0x7F}}; in HWTEST_F_L0()
193 // codePoint lie in [0x80,0x7FF]--> UTF-8(length:2) in HWTEST_F_L0()
194 utf16Data0 = 0x80; in HWTEST_F_L0()
196 utf8CharTemp = {2, {UTF8_2B_FIRST + 0x02U, UTF8_2B_SECOND}}; in HWTEST_F_L0()
199 utf16Data0 = 0x7FF; in HWTEST_F_L0()
201 utf8CharTemp = {2, {BIT_MASK_3 - 0x01, BIT_MASK_2 - 0x01}}; in HWTEST_F_L0()
206 // codePoint lie in [0xD800,0xDFFF]--> UTF-8(length:3) in HWTEST_F_L0()
208 uint16_t utf16Data0 = 0xD800; in HWTEST_F_L0()
209 uint16_t utf16Data1= 0x00; in HWTEST_F_L0()
211 Utf8Char utf8CharTemp = {3, {UTF8_3B_FIRST | static_cast<uint8_t>(0xD800 >> 12), in HWTEST_F_L0()
212 UTF8_3B_SECOND | (static_cast<uint8_t>(0xD800 >> 6) & utf::MASK_6BIT), in HWTEST_F_L0()
213 UTF8_3B_THIRD | (static_cast<uint8_t>(0xD800) & utf::MASK_6BIT)}}; in HWTEST_F_L0()
216 utf16Data0 = 0xDFFF; in HWTEST_F_L0()
218 utf8CharTemp = {3, {UTF8_3B_FIRST | static_cast<uint8_t>(0xDFFF >> 12), in HWTEST_F_L0()
219 UTF8_3B_SECOND | (static_cast<uint8_t>(0xDFFF >> 6) & utf::MASK_6BIT), in HWTEST_F_L0()
220 UTF8_3B_THIRD | (static_cast<uint8_t>(0xDFFF) & utf::MASK_6BIT)}}; in HWTEST_F_L0()
228 // codePoint lie in [0x800,0xD7FF]&&[0xE000,0xFFFF]-->UTF-8(length:3) in HWTEST_F_L0()
229 uint16_t utf16Data0 = 0x800; in HWTEST_F_L0()
230 uint16_t utf16Data1= 0x00; in HWTEST_F_L0()
232 Utf8Char utf8CharTemp = {3, {UTF8_3B_FIRST | static_cast<uint8_t>(0x800 >> 12), in HWTEST_F_L0()
233 … UTF8_3B_SECOND | (static_cast<uint8_t>(0x800 >> 6) & utf::MASK_6BIT), in HWTEST_F_L0()
234 UTF8_3B_THIRD | (static_cast<uint8_t>(0x800) & utf::MASK_6BIT)}}; in HWTEST_F_L0()
237 utf16Data0 = 0xD7FF; in HWTEST_F_L0()
239 utf8CharTemp = {3, {UTF8_3B_FIRST | static_cast<uint8_t>(0xD7FF>>12), in HWTEST_F_L0()
240 UTF8_3B_SECOND | (static_cast<uint8_t>(0xD7FF >> 6) & utf::MASK_6BIT), in HWTEST_F_L0()
241 UTF8_3B_THIRD | (static_cast<uint8_t>(0xD7FF) & utf::MASK_6BIT)}}; in HWTEST_F_L0()
244 utf16Data0= 0xE000; in HWTEST_F_L0()
246 utf8CharTemp = {3, {UTF8_3B_FIRST | static_cast<uint8_t>(0xE000 >> 12), in HWTEST_F_L0()
247 UTF8_3B_SECOND | (static_cast<uint8_t>(0xE000 >> 6)& utf::MASK_6BIT), in HWTEST_F_L0()
248 UTF8_3B_THIRD | (static_cast<uint8_t>(0xE000) & utf::MASK_6BIT)}}; in HWTEST_F_L0()
251 utf16Data0 = 0xFFFF; in HWTEST_F_L0()
253 utf8CharTemp = {3, {UTF8_3B_FIRST | static_cast<uint8_t>(0xFFFF >> 12), in HWTEST_F_L0()
254 UTF8_3B_SECOND | (static_cast<uint8_t>(0xFFFF >> 6)& utf::MASK_6BIT), in HWTEST_F_L0()
255 UTF8_3B_THIRD | (static_cast<uint8_t>(0xFFFF) & utf::MASK_6BIT)}}; in HWTEST_F_L0()
262 // codePoint lie in [0x10000,0x10FFFF] --> UTF-8(length:4) in HWTEST_F_L0()
264 uint16_t utf16Data0 = 0xD800; in HWTEST_F_L0()
265 uint16_t utf16Data1= 0xDC00; in HWTEST_F_L0()
276 // 0xD950 0xDF21 --> 0x64321 --> 0xf1 0xa4 0x8c 0xa1 in HWTEST_F_L0()
278 uint16_t utf16Data0 = 0xD950; in HWTEST_F_L0()
279 uint16_t utf16Data1 = 0xDF21; in HWTEST_F_L0()
288 utf8CharTemp = {4, {0xf1, 0xa4, 0x8c, 0xa1}}; in HWTEST_F_L0()
303 …// when utf16 data length is only 1 and code in 0xd800-0xdfff, means that is a single code point, … in HWTEST_F_L0()
305 uint32_t length = 0; in HWTEST_F_L0()
306 uint16_t utf16Value1[1] = {0xD800}; in HWTEST_F_L0()
311 uint16_t utf16Value2[1] = {0xDFFF}; in HWTEST_F_L0()
317 uint16_t utf16Value3[1] = {0x00}; in HWTEST_F_L0()
320 EXPECT_EQ(length - 1, 0U); in HWTEST_F_L0()
324 // code point lie in [0x00, 0x7F], it needs to be represented by one UTF8 code. in HWTEST_F_L0()
325 uint16_t utf16Value4[1] = {0x00}; in HWTEST_F_L0()
326 uint16_t utf16Value5[1] = {0x7F}; in HWTEST_F_L0()
330 EXPECT_EQ(length - 1, 0U); in HWTEST_F_L0()
334 // code point lie in [0x80, 0x7FF], it needs to be represented by two UTF8 code, in HWTEST_F_L0()
335 uint16_t utf16Value6[1] = {0x80}; in HWTEST_F_L0()
336 uint16_t utf16Value7[1] = {0x7FF}; in HWTEST_F_L0()
343 …// code point lie in [0x800, 0xD7FF] or [0xDCoo, 0xFFFF], it needs to be represented by three UTF8… in HWTEST_F_L0()
344 uint16_t utf16Value8[1] = {0x800}; in HWTEST_F_L0()
345 uint16_t utf16Value9[1] = {0xD7FF}; in HWTEST_F_L0()
346 uint16_t utf16Value10[1] = {0xDC00}; in HWTEST_F_L0()
347 uint16_t utf16Value11[1] = {0xFFFF}; in HWTEST_F_L0()
364 …// The trail value is valid, located in [0xDc00, 0xDFFF].It needs to be represented by four UTF8 c… in HWTEST_F_L0()
365 uint16_t utf16Value12[2] = {0xD800, 0xDc00}; in HWTEST_F_L0()
366 uint16_t utf16Value13[2] = {0xD800, 0xDFFF}; in HWTEST_F_L0()
367 uint16_t utf16Value14[2] = {0xDBFF, 0xDC00}; in HWTEST_F_L0()
368 uint16_t utf16Value15[2] = {0xDBFF, 0xDFFF}; in HWTEST_F_L0()
382 // The trail value of Bad sequence is invalid, not located in [0xDC00, 0xDFFF]. in HWTEST_F_L0()
384 uint16_t utf16Value16[2] = {0xD800, 0xDBFF}; in HWTEST_F_L0()
385 uint16_t utf16Value17[2] = {0xDC00, 0xDFFF}; in HWTEST_F_L0()
393 // 0(or 2)+ 1+ 2 + 3 + 4 = 10(or 12) in HWTEST_F_L0()
394 uint16_t utf16Value18[6] = {0x00, 0x7F, 0x80, 0x800, 0xD800, 0xDC00}; in HWTEST_F_L0()
411 // code point lie in [0x00, 0x7F], the length of utf8 code element byte is 1 in HWTEST_F_L0()
412 uint8_t utf8Value1[1] = {0x00}; in HWTEST_F_L0()
417 std::pair<uint32_t, size_t> utf16Value = {utf8Value1[0], 1}; in HWTEST_F_L0()
420 utf16Value = {utf8Value2[0], 1}; in HWTEST_F_L0()
422 // code point lie in [0x80, 0x7FF], the length of utf8 code element byte is 2 in HWTEST_F_L0()
423 uint8_t utf8Value3[2] = {0xc2, 0x80}; // 0x80 in HWTEST_F_L0()
424 uint8_t utf8Value4[2] = {0xDF, 0x7F}; // 0x7FF in HWTEST_F_L0()
428 utf16Value = {0x80, 2}; in HWTEST_F_L0()
431 utf16Value = {0x7FF, 2}; in HWTEST_F_L0()
434 …// code point lie in [0x800, 0xD7FF] or [0xDC00,0xFFFF], the length of utf8 code element byte is 3. in HWTEST_F_L0()
435 …// when code point lie in [0xD800, 0xDBFF], due to the use of UCS-2, it corresponds to 3 utf8 symb… in HWTEST_F_L0()
436 uint8_t utf8Value5[3] = {0xE0, 0xA0, 0x80}; // 0x800 in HWTEST_F_L0()
437 uint8_t utf8Value6[3] = {0xEF, 0xBF, 0xBF}; // 0xD7FF in HWTEST_F_L0()
441 utf16Value = {0x800, 3}; in HWTEST_F_L0()
444 utf16Value = {0xFFFF, 3}; in HWTEST_F_L0()
446 // code point lie in [0x10000, 0x10FFFF], the length of utf8 code element byte is 4. in HWTEST_F_L0()
447 uint8_t utf8Value9[4] = {0xF0, 0x90, 0x80, 0x80}; // 0x10000 in HWTEST_F_L0()
448 uint8_t utf8Value10[4] = {0xF4, 0x8F, 0xBF, 0xBF}; // 0x10FFFF in HWTEST_F_L0()
452 utf16Value = {0xD800 << 16 | 0xDC00U, 4}; in HWTEST_F_L0()
455 utf16Value = {0xDBFF << 16 | 0xDFFF, 4}; in HWTEST_F_L0()
458 utf16Value = {0x10000, 4}; in HWTEST_F_L0()
461 utf16Value = {0x10FFFF, 4}; in HWTEST_F_L0()
473 // when code point lie in (0x00, 0xFFFF], the required utf16 code element length is 1. in HWTEST_F_L0()
474 uint8_t utf8ValueOneByteMin[1] = {0x00}; in HWTEST_F_L0()
475 uint8_t utf8ValueOneByteMax[4] = {0xEF, 0xBF, 0xBF, 0x00}; // 0xFFFF in HWTEST_F_L0()
482 // when code point lie in [0x10000, 0x10FFFF], the required utf16 code element length is 2. in HWTEST_F_L0()
483 const uint8_t utf8ValueTwoBytesMin[5] = {0xF0, 0x90, 0x80, 0x80, 0x00}; // 0x10000 in HWTEST_F_L0()
484 const uint8_t utf8ValueTwoBytesMax[5] = {0xF4, 0x8F, 0xBF, 0xBF, 0x00}; // 0x10FFFF in HWTEST_F_L0()
492 0xEF, 0xBF, 0xBF, 0xF0, in HWTEST_F_L0()
493 0x90, 0x80, 0x80, 0xF4, in HWTEST_F_L0()
494 0x8F, 0xBF, 0xBF, 0x00}; in HWTEST_F_L0()
511 size_t start = 0; in HWTEST_F_L0()
514 0x00, // 0 or 2 (special case for \u0000 ==> C080 - 1100'0000 1000'0000) in HWTEST_F_L0()
515 0x7F, // 1(0x00, 0x7F] in HWTEST_F_L0()
516 0x7FF, // 2 [0x80, 0x7FF] in HWTEST_F_L0()
517 0x800, // 3 [0x800, 0xD7FF] in HWTEST_F_L0()
518 0xD800, // 3 [0xD800, 0xDFFF] in HWTEST_F_L0()
519 0xFFFF, // 3 [0xE000, 0xFFFF] in HWTEST_F_L0()
520 0xD800, 0xDFFF}; // 4 [0x10000, 0x10FFFF] in HWTEST_F_L0()
524 // 0 + 1 + 2 +(3 *3)+ 4= 16 in HWTEST_F_L0()
543 size_t start = 0; in HWTEST_F_L0()
545 0x7F, // 1-length UTF16 encoding in HWTEST_F_L0()
546 0xDF, 0xBF, // 1-length UTF16 encoding in HWTEST_F_L0()
547 0xEF, 0xBF, 0xBF, // 1-length UTF16 encoding in HWTEST_F_L0()
548 0xF4, 0x8F, 0xBF, 0xBF}; // 2-length UTF16 encoding in HWTEST_F_L0()
562 EXPECT_EQ(outPos, 0U); in HWTEST_F_L0()
565 EXPECT_EQ(outPos, 0U); in HWTEST_F_L0()
568 EXPECT_EQ(outPos, 0U); in HWTEST_F_L0()