Lines Matching refs:bytes
113 char bytes[MB_LEN_MAX]; in TEST() local
114 EXPECT_EQ(1U, c16rtomb(bytes, L'\0', nullptr)); in TEST()
118 char bytes[MB_LEN_MAX]; in TEST() local
120 memset(bytes, 0, sizeof(bytes)); in TEST()
121 EXPECT_EQ(1U, c16rtomb(bytes, L'h', nullptr)); in TEST()
122 EXPECT_EQ('h', bytes[0]); in TEST()
128 memset(bytes, 0, sizeof(bytes)); in TEST()
129 EXPECT_EQ(1U, c16rtomb(bytes, L'h', nullptr)); in TEST()
130 EXPECT_EQ('h', bytes[0]); in TEST()
132 memset(bytes, 0, sizeof(bytes)); in TEST()
133 EXPECT_EQ(2U, c16rtomb(bytes, 0x00a2, nullptr)); in TEST()
134 EXPECT_EQ('\xc2', bytes[0]); in TEST()
135 EXPECT_EQ('\xa2', bytes[1]); in TEST()
137 memset(bytes, 0, sizeof(bytes)); in TEST()
138 EXPECT_EQ(3U, c16rtomb(bytes, 0x20ac, nullptr)); in TEST()
139 EXPECT_EQ('\xe2', bytes[0]); in TEST()
140 EXPECT_EQ('\x82', bytes[1]); in TEST()
141 EXPECT_EQ('\xac', bytes[2]); in TEST()
143 memset(bytes, 0, sizeof(bytes)); in TEST()
144 EXPECT_EQ(0U, c16rtomb(bytes, 0xdbea, nullptr)); in TEST()
145 EXPECT_EQ(4U, c16rtomb(bytes, 0xdfcd, nullptr)); in TEST()
146 EXPECT_EQ('\xf4', bytes[0]); in TEST()
147 EXPECT_EQ('\x8a', bytes[1]); in TEST()
148 EXPECT_EQ('\xaf', bytes[2]); in TEST()
149 EXPECT_EQ('\x8d', bytes[3]); in TEST()
156 char bytes[MB_LEN_MAX]; in TEST() local
158 memset(bytes, 0, sizeof(bytes)); in TEST()
159 EXPECT_EQ(static_cast<size_t>(-1), c16rtomb(bytes, 0xdfcd, nullptr)); in TEST()
161 EXPECT_EQ(0U, c16rtomb(bytes, 0xdbea, nullptr)); in TEST()
162 EXPECT_EQ(static_cast<size_t>(-1), c16rtomb(bytes, 0xdbea, nullptr)); in TEST()
313 char bytes[MB_LEN_MAX]; in TEST() local
315 memset(bytes, 1, sizeof(bytes)); in TEST()
316 EXPECT_EQ(1U, c32rtomb(bytes, L'\0', nullptr)); in TEST()
317 EXPECT_EQ('\0', bytes[0]); in TEST()
318 EXPECT_EQ('\x01', bytes[1]); in TEST()
320 memset(bytes, 0, sizeof(bytes)); in TEST()
321 EXPECT_EQ(1U, c32rtomb(bytes, L'h', nullptr)); in TEST()
322 EXPECT_EQ('h', bytes[0]); in TEST()
328 memset(bytes, 0, sizeof(bytes)); in TEST()
329 EXPECT_EQ(1U, c32rtomb(bytes, L'h', nullptr)); in TEST()
330 EXPECT_EQ('h', bytes[0]); in TEST()
332 memset(bytes, 0, sizeof(bytes)); in TEST()
333 EXPECT_EQ(2U, c32rtomb(bytes, 0x00a2, nullptr)); in TEST()
334 EXPECT_EQ('\xc2', bytes[0]); in TEST()
335 EXPECT_EQ('\xa2', bytes[1]); in TEST()
337 memset(bytes, 0, sizeof(bytes)); in TEST()
338 EXPECT_EQ(3U, c32rtomb(bytes, 0x20ac, nullptr)); in TEST()
339 EXPECT_EQ('\xe2', bytes[0]); in TEST()
340 EXPECT_EQ('\x82', bytes[1]); in TEST()
341 EXPECT_EQ('\xac', bytes[2]); in TEST()
343 memset(bytes, 0, sizeof(bytes)); in TEST()
344 EXPECT_EQ(4U, c32rtomb(bytes, 0x24b62, nullptr)); in TEST()
345 EXPECT_EQ('\xf0', bytes[0]); in TEST()
346 EXPECT_EQ('\xa4', bytes[1]); in TEST()
347 EXPECT_EQ('\xad', bytes[2]); in TEST()
348 EXPECT_EQ('\xa2', bytes[3]); in TEST()
351 EXPECT_EQ(static_cast<size_t>(-1), c32rtomb(bytes, 0xffffffff, nullptr)); in TEST()