Lines Matching refs:bytes

61   char bytes[MB_LEN_MAX];  in TEST()  local
62 EXPECT_EQ(1U, c16rtomb(bytes, L'\0', nullptr)); in TEST()
66 char bytes[MB_LEN_MAX]; in TEST() local
68 memset(bytes, 0, sizeof(bytes)); in TEST()
69 EXPECT_EQ(1U, c16rtomb(bytes, L'h', nullptr)); in TEST()
70 EXPECT_EQ('h', bytes[0]); in TEST()
76 memset(bytes, 0, sizeof(bytes)); in TEST()
77 EXPECT_EQ(1U, c16rtomb(bytes, L'h', nullptr)); in TEST()
78 EXPECT_EQ('h', bytes[0]); in TEST()
80 memset(bytes, 0, sizeof(bytes)); in TEST()
81 EXPECT_EQ(2U, c16rtomb(bytes, 0x00a2, nullptr)); in TEST()
82 EXPECT_EQ('\xc2', bytes[0]); in TEST()
83 EXPECT_EQ('\xa2', bytes[1]); in TEST()
85 memset(bytes, 0, sizeof(bytes)); in TEST()
86 EXPECT_EQ(3U, c16rtomb(bytes, 0x20ac, nullptr)); in TEST()
87 EXPECT_EQ('\xe2', bytes[0]); in TEST()
88 EXPECT_EQ('\x82', bytes[1]); in TEST()
89 EXPECT_EQ('\xac', bytes[2]); in TEST()
93 char bytes[MB_LEN_MAX]; in TEST() local
95 memset(bytes, 0, sizeof(bytes)); in TEST()
96 EXPECT_EQ(0U, c16rtomb(bytes, 0xdbea, nullptr)); in TEST()
97 EXPECT_EQ(4U, c16rtomb(bytes, 0xdfcd, nullptr)); in TEST()
98 EXPECT_EQ('\xf4', bytes[0]); in TEST()
99 EXPECT_EQ('\x8a', bytes[1]); in TEST()
100 EXPECT_EQ('\xaf', bytes[2]); in TEST()
101 EXPECT_EQ('\x8d', bytes[3]); in TEST()
105 char bytes[MB_LEN_MAX]; in TEST() local
107 memset(bytes, 0, sizeof(bytes)); in TEST()
108 EXPECT_EQ(static_cast<size_t>(-1), c16rtomb(bytes, 0xdfcd, nullptr)); in TEST()
110 EXPECT_EQ(0U, c16rtomb(bytes, 0xdbea, nullptr)); in TEST()
111 EXPECT_EQ(static_cast<size_t>(-1), c16rtomb(bytes, 0xdbea, nullptr)); in TEST()
213 char bytes[MB_LEN_MAX]; in TEST() local
215 memset(bytes, 1, sizeof(bytes)); in TEST()
216 EXPECT_EQ(1U, c32rtomb(bytes, L'\0', nullptr)); in TEST()
217 EXPECT_EQ('\0', bytes[0]); in TEST()
218 EXPECT_EQ('\x01', bytes[1]); in TEST()
220 memset(bytes, 0, sizeof(bytes)); in TEST()
221 EXPECT_EQ(1U, c32rtomb(bytes, L'h', nullptr)); in TEST()
222 EXPECT_EQ('h', bytes[0]); in TEST()
228 memset(bytes, 0, sizeof(bytes)); in TEST()
229 EXPECT_EQ(1U, c32rtomb(bytes, L'h', nullptr)); in TEST()
230 EXPECT_EQ('h', bytes[0]); in TEST()
232 memset(bytes, 0, sizeof(bytes)); in TEST()
233 EXPECT_EQ(2U, c32rtomb(bytes, 0x00a2, nullptr)); in TEST()
234 EXPECT_EQ('\xc2', bytes[0]); in TEST()
235 EXPECT_EQ('\xa2', bytes[1]); in TEST()
237 memset(bytes, 0, sizeof(bytes)); in TEST()
238 EXPECT_EQ(3U, c32rtomb(bytes, 0x20ac, nullptr)); in TEST()
239 EXPECT_EQ('\xe2', bytes[0]); in TEST()
240 EXPECT_EQ('\x82', bytes[1]); in TEST()
241 EXPECT_EQ('\xac', bytes[2]); in TEST()
243 memset(bytes, 0, sizeof(bytes)); in TEST()
244 EXPECT_EQ(4U, c32rtomb(bytes, 0x24b62, nullptr)); in TEST()
245 EXPECT_EQ('\xf0', bytes[0]); in TEST()
246 EXPECT_EQ('\xa4', bytes[1]); in TEST()
247 EXPECT_EQ('\xad', bytes[2]); in TEST()
248 EXPECT_EQ('\xa2', bytes[3]); in TEST()
250 EXPECT_EQ(static_cast<size_t>(-1), c32rtomb(bytes, 0xffffffff, nullptr)); in TEST()