Home | History | Annotate | Download | only in tests

Lines Matching full:bytes

83   char bytes[MB_LEN_MAX];
84 EXPECT_EQ(1U, c16rtomb(bytes, L'\0', NULL));
92 char bytes[MB_LEN_MAX];
94 memset(bytes, 0, sizeof(bytes));
95 EXPECT_EQ(1U, c16rtomb(bytes, L'h', NULL));
96 EXPECT_EQ('h', bytes[0]);
102 memset(bytes, 0, sizeof(bytes));
103 EXPECT_EQ(1U, c16rtomb(bytes, L'h', NULL));
104 EXPECT_EQ('h', bytes[0]);
106 memset(bytes, 0, sizeof(bytes));
107 EXPECT_EQ(2U, c16rtomb(bytes, 0x00a2, NULL));
108 EXPECT_EQ('\xc2', bytes[0]);
109 EXPECT_EQ('\xa2', bytes[1]);
111 memset(bytes, 0, sizeof(bytes));
112 EXPECT_EQ(3U, c16rtomb(bytes, 0x20ac, NULL));
113 EXPECT_EQ('\xe2', bytes[0]);
114 EXPECT_EQ('\x82', bytes[1]);
115 EXPECT_EQ('\xac', bytes[2]);
123 char bytes[MB_LEN_MAX];
125 memset(bytes, 0, sizeof(bytes));
126 EXPECT_EQ(0U, c16rtomb(bytes, 0xdbea, NULL));
127 EXPECT_EQ(4U, c16rtomb(bytes, 0xdfcd, NULL));
128 EXPECT_EQ('\xf4', bytes[0]);
129 EXPECT_EQ('\x8a', bytes[1]);
130 EXPECT_EQ('\xaf', bytes[2]);
131 EXPECT_EQ('\x8d', bytes[3]);
139 char bytes[MB_LEN_MAX];
141 memset(bytes, 0, sizeof(bytes));
142 EXPECT_EQ(static_cast<size_t>(-1), c16rtomb(bytes, 0xdfcd, NULL));
144 EXPECT_EQ(0U, c16rtomb(bytes, 0xdbea, NULL));
145 EXPECT_EQ(static_cast<size_t>(-1), c16rtomb(bytes, 0xdbea, NULL));
281 char bytes[MB_LEN_MAX];
283 EXPECT_EQ(1U, c32rtomb(bytes, L'\0', NULL));
285 memset(bytes, 0, sizeof(bytes));
286 EXPECT_EQ(1U, c32rtomb(bytes, L'h', NULL));
287 EXPECT_EQ('h', bytes[0]);
293 memset(bytes, 0, sizeof(bytes));
294 EXPECT_EQ(1U, c32rtomb(bytes, L'h', NULL));
295 EXPECT_EQ('h', bytes[0]);
297 memset(bytes, 0, sizeof(bytes));
298 EXPECT_EQ(2U, c32rtomb(bytes, 0x00a2, NULL));
299 EXPECT_EQ('\xc2', bytes[0]);
300 EXPECT_EQ('\xa2', bytes[1]);
302 memset(bytes, 0, sizeof(bytes));
303 EXPECT_EQ(3U, c32rtomb(bytes, 0x20ac, NULL));
304 EXPECT_EQ('\xe2', bytes[0]);
305 EXPECT_EQ('\x82', bytes[1]);
306 EXPECT_EQ('\xac', bytes[2]);
308 memset(bytes, 0, sizeof(bytes));
309 EXPECT_EQ(4U, c32rtomb(bytes, 0x24b62, NULL));
310 EXPECT_EQ('\xf0', bytes[0]);
311 EXPECT_EQ('\xa4', bytes[1]);
312 EXPECT_EQ('\xad', bytes[2]);
313 EXPECT_EQ('\xa2', bytes[3]);
315 EXPECT_EQ(static_cast<size_t>(-1), c32rtomb(bytes, 0xffffffff, NULL));