• Home
  • Raw
  • Download

Lines Matching refs:bytes

62   char bytes[MB_LEN_MAX];  in TEST()  local
63 EXPECT_EQ(1U, c16rtomb(bytes, L'\0', nullptr)); in TEST()
67 char bytes[MB_LEN_MAX]; in TEST() local
69 memset(bytes, 0, sizeof(bytes)); in TEST()
70 EXPECT_EQ(1U, c16rtomb(bytes, L'h', nullptr)); in TEST()
71 EXPECT_EQ('h', bytes[0]); in TEST()
77 memset(bytes, 0, sizeof(bytes)); in TEST()
78 EXPECT_EQ(1U, c16rtomb(bytes, L'h', nullptr)); in TEST()
79 EXPECT_EQ('h', bytes[0]); in TEST()
81 memset(bytes, 0, sizeof(bytes)); in TEST()
82 EXPECT_EQ(2U, c16rtomb(bytes, 0x00a2, nullptr)); in TEST()
83 EXPECT_EQ('\xc2', bytes[0]); in TEST()
84 EXPECT_EQ('\xa2', bytes[1]); in TEST()
86 memset(bytes, 0, sizeof(bytes)); in TEST()
87 EXPECT_EQ(3U, c16rtomb(bytes, 0x20ac, nullptr)); in TEST()
88 EXPECT_EQ('\xe2', bytes[0]); in TEST()
89 EXPECT_EQ('\x82', bytes[1]); in TEST()
90 EXPECT_EQ('\xac', bytes[2]); in TEST()
92 memset(bytes, 0, sizeof(bytes)); in TEST()
93 EXPECT_EQ(0U, c16rtomb(bytes, 0xdbea, nullptr)); in TEST()
94 EXPECT_EQ(4U, c16rtomb(bytes, 0xdfcd, nullptr)); in TEST()
95 EXPECT_EQ('\xf4', bytes[0]); in TEST()
96 EXPECT_EQ('\x8a', bytes[1]); in TEST()
97 EXPECT_EQ('\xaf', bytes[2]); in TEST()
98 EXPECT_EQ('\x8d', bytes[3]); in TEST()
102 char bytes[MB_LEN_MAX]; in TEST() local
104 memset(bytes, 0, sizeof(bytes)); in TEST()
105 EXPECT_EQ(static_cast<size_t>(-1), c16rtomb(bytes, 0xdfcd, nullptr)); in TEST()
107 EXPECT_EQ(0U, c16rtomb(bytes, 0xdbea, nullptr)); in TEST()
108 EXPECT_EQ(static_cast<size_t>(-1), c16rtomb(bytes, 0xdbea, nullptr)); in TEST()
211 char bytes[MB_LEN_MAX]; in TEST() local
213 memset(bytes, 1, sizeof(bytes)); in TEST()
214 EXPECT_EQ(1U, c32rtomb(bytes, L'\0', nullptr)); in TEST()
215 EXPECT_EQ('\0', bytes[0]); in TEST()
216 EXPECT_EQ('\x01', bytes[1]); in TEST()
218 memset(bytes, 0, sizeof(bytes)); in TEST()
219 EXPECT_EQ(1U, c32rtomb(bytes, L'h', nullptr)); in TEST()
220 EXPECT_EQ('h', bytes[0]); in TEST()
226 memset(bytes, 0, sizeof(bytes)); in TEST()
227 EXPECT_EQ(1U, c32rtomb(bytes, L'h', nullptr)); in TEST()
228 EXPECT_EQ('h', bytes[0]); in TEST()
230 memset(bytes, 0, sizeof(bytes)); in TEST()
231 EXPECT_EQ(2U, c32rtomb(bytes, 0x00a2, nullptr)); in TEST()
232 EXPECT_EQ('\xc2', bytes[0]); in TEST()
233 EXPECT_EQ('\xa2', bytes[1]); in TEST()
235 memset(bytes, 0, sizeof(bytes)); in TEST()
236 EXPECT_EQ(3U, c32rtomb(bytes, 0x20ac, nullptr)); in TEST()
237 EXPECT_EQ('\xe2', bytes[0]); in TEST()
238 EXPECT_EQ('\x82', bytes[1]); in TEST()
239 EXPECT_EQ('\xac', bytes[2]); in TEST()
241 memset(bytes, 0, sizeof(bytes)); in TEST()
242 EXPECT_EQ(4U, c32rtomb(bytes, 0x24b62, nullptr)); in TEST()
243 EXPECT_EQ('\xf0', bytes[0]); in TEST()
244 EXPECT_EQ('\xa4', bytes[1]); in TEST()
245 EXPECT_EQ('\xad', bytes[2]); in TEST()
246 EXPECT_EQ('\xa2', bytes[3]); in TEST()
249 EXPECT_EQ(static_cast<size_t>(-1), c32rtomb(bytes, 0xffffffff, nullptr)); in TEST()