Lines Matching refs:mbrtowc
102 EXPECT_EQ(static_cast<size_t>(-2), mbrtowc(nullptr, "\xc2", 1, &ps)); in TEST()
109 EXPECT_EQ(static_cast<size_t>(-2), mbrtowc(nullptr, "\xc2", 1, &ps)); in TEST()
114 EXPECT_EQ(static_cast<size_t>(-2), mbrtowc(nullptr, "\xf0\xa4", 1, &ps)); in TEST()
221 ASSERT_EQ(static_cast<size_t>(-2), mbrtowc(nullptr, "\xc2", 1, &ps)); in TEST()
265 TEST(wchar, mbrtowc) { in TEST() argument
269 ASSERT_EQ(0U, mbrtowc(out, "hello", 0, nullptr)); in TEST()
272 ASSERT_EQ(0U, mbrtowc(out, "hello", 0, nullptr)); in TEST()
273 ASSERT_EQ(0U, mbrtowc(out, "", 0, nullptr)); in TEST()
274 ASSERT_EQ(1U, mbrtowc(out, "hello", 1, nullptr)); in TEST()
277 ASSERT_EQ(0U, mbrtowc(nullptr, "hello", 0, nullptr)); in TEST()
278 ASSERT_EQ(0U, mbrtowc(nullptr, "", 0, nullptr)); in TEST()
279 ASSERT_EQ(1U, mbrtowc(nullptr, "hello", 1, nullptr)); in TEST()
281 ASSERT_EQ(0U, mbrtowc(nullptr, nullptr, 0, nullptr)); in TEST()
287 ASSERT_EQ(1U, mbrtowc(out, "abcdef", 6, nullptr)); in TEST()
290 ASSERT_EQ(2U, mbrtowc(out, "\xc2\xa2" "cdef", 6, nullptr)); in TEST()
293 ASSERT_EQ(3U, mbrtowc(out, "\xe2\x82\xac" "def", 6, nullptr)); in TEST()
296 ASSERT_EQ(4U, mbrtowc(out, "\xf0\xa4\xad\xa2" "ef", 6, nullptr)); in TEST()
300 ASSERT_EQ(static_cast<size_t>(-1), mbrtowc(out, "\xf8\xa1\xa2\xa3\xa4" "f", 6, nullptr)); in TEST()
304 ASSERT_EQ(static_cast<size_t>(-1), mbrtowc(out, "\xf0\x82\x82\xac" "ef", 6, nullptr)); in TEST()
314 ASSERT_EQ(3U, mbrtowc(out, "\xef\xbf\xbe", 3, nullptr)); in TEST()
316 ASSERT_EQ(3U, mbrtowc(out, "\xef\xbf\xbf", 3, nullptr)); in TEST()
326 ASSERT_EQ(static_cast<size_t>(-1), mbrtowc(out, "\xf5\x80\x80\x80", 4, nullptr)); in TEST()
336 ASSERT_EQ(static_cast<size_t>(-2), mbrtowc(&out, "\xc2", 1, ps)); in test_mbrtowc_incomplete()
337 ASSERT_EQ(1U, mbrtowc(&out, "\xa2" "cdef", 5, ps)); in test_mbrtowc_incomplete()
341 ASSERT_EQ(static_cast<size_t>(-2), mbrtowc(&out, "\xe2", 1, ps)); in test_mbrtowc_incomplete()
342 ASSERT_EQ(static_cast<size_t>(-2), mbrtowc(&out, "\x82", 1, ps)); in test_mbrtowc_incomplete()
343 ASSERT_EQ(1U, mbrtowc(&out, "\xac" "def", 4, ps)); in test_mbrtowc_incomplete()
347 ASSERT_EQ(static_cast<size_t>(-2), mbrtowc(&out, "\xf0", 1, ps)); in test_mbrtowc_incomplete()
348 ASSERT_EQ(static_cast<size_t>(-2), mbrtowc(&out, "\xa4\xad", 2, ps)); in test_mbrtowc_incomplete()
349 ASSERT_EQ(1U, mbrtowc(&out, "\xa2" "ef", 3, ps)); in test_mbrtowc_incomplete()
354 ASSERT_EQ(static_cast<size_t>(-2), mbrtowc(&out, "\xc2", 1, ps)); in test_mbrtowc_incomplete()
355 ASSERT_EQ(static_cast<size_t>(-1), mbrtowc(&out, "\x20" "cdef", 5, ps)); in test_mbrtowc_incomplete()
427 ASSERT_EQ(static_cast<size_t>(-2), mbrtowc(&out, "\xc2", 1, &ps)); in TEST()
672 n = mbrtowc(&wc, "x", MB_CUR_MAX, nullptr); in TEST()
676 n = mbrtowc(&wc, "\xc2\xa2", MB_CUR_MAX, nullptr); in TEST()
680 n = mbrtowc(&wc, "\xe2\x82\xac", MB_CUR_MAX, nullptr); in TEST()
684 n = mbrtowc(&wc, "\xf0\xa4\xad\xa2", MB_CUR_MAX, nullptr); in TEST()