Lines Matching refs:mbrtowc
96 EXPECT_EQ(static_cast<size_t>(-2), mbrtowc(NULL, "\xc2", 1, &ps));
103 EXPECT_EQ(static_cast<size_t>(-2), mbrtowc(NULL, "\xc2", 1, &ps));
108 EXPECT_EQ(static_cast<size_t>(-2), mbrtowc(NULL, "\xf0\xa4", 1, &ps));
215 ASSERT_EQ(static_cast<size_t>(-2), mbrtowc(NULL, "\xc2", 1, &ps));
254 TEST(wchar, mbrtowc) {
258 ASSERT_EQ(0U, mbrtowc(out, "hello", 0, NULL));
261 ASSERT_EQ(0U, mbrtowc(out, "hello", 0, NULL));
262 ASSERT_EQ(0U, mbrtowc(out, "", 0, NULL));
263 ASSERT_EQ(1U, mbrtowc(out, "hello", 1, NULL));
266 ASSERT_EQ(0U, mbrtowc(NULL, "hello", 0, NULL));
267 ASSERT_EQ(0U, mbrtowc(NULL, "", 0, NULL));
268 ASSERT_EQ(1U, mbrtowc(NULL, "hello", 1, NULL));
270 ASSERT_EQ(0U, mbrtowc(NULL, NULL, 0, NULL));
276 ASSERT_EQ(1U, mbrtowc(out, "abcdef", 6, NULL));
279 ASSERT_EQ(2U, mbrtowc(out, "\xc2\xa2" "cdef", 6, NULL));
282 ASSERT_EQ(3U, mbrtowc(out, "\xe2\x82\xac" "def", 6, NULL));
285 ASSERT_EQ(4U, mbrtowc(out, "\xf0\xa4\xad\xa2" "ef", 6, NULL));
289 ASSERT_EQ(static_cast<size_t>(-1), mbrtowc(out, "\xf8\xa1\xa2\xa3\xa4" "f", 6, NULL));
293 ASSERT_EQ(static_cast<size_t>(-1), mbrtowc(out, "\xf0\x82\x82\xac" "ef", 6, NULL));
303 ASSERT_EQ(static_cast<size_t>(-2), mbrtowc(&out, "\xc2", 1, ps));
304 ASSERT_EQ(1U, mbrtowc(&out, "\xa2" "cdef", 5, ps));
308 ASSERT_EQ(static_cast<size_t>(-2), mbrtowc(&out, "\xe2", 1, ps));
309 ASSERT_EQ(static_cast<size_t>(-2), mbrtowc(&out, "\x82", 1, ps));
310 ASSERT_EQ(1U, mbrtowc(&out, "\xac" "def", 4, ps));
314 ASSERT_EQ(static_cast<size_t>(-2), mbrtowc(&out, "\xf0", 1, ps));
315 ASSERT_EQ(static_cast<size_t>(-2), mbrtowc(&out, "\xa4\xad", 2, ps));
316 ASSERT_EQ(1U, mbrtowc(&out, "\xa2" "ef", 3, ps));
321 ASSERT_EQ(static_cast<size_t>(-2), mbrtowc(&out, "\xc2", 1, ps));
322 ASSERT_EQ(static_cast<size_t>(-1), mbrtowc(&out, "\x20" "cdef", 5, ps));
379 ASSERT_EQ(static_cast<size_t>(-2), mbrtowc(&out, "\xc2", 1, &ps));
476 n = mbrtowc(&wc, "x", MB_CUR_MAX, NULL);
480 n = mbrtowc(&wc, "\xc2\xa2", MB_CUR_MAX, NULL);
484 n = mbrtowc(&wc, "\xe2\x82\xac", MB_CUR_MAX, NULL);
488 n = mbrtowc(&wc, "\xf0\xa4\xad\xa2", MB_CUR_MAX, NULL);