• Home
  • Raw
  • Download

Lines Matching refs:mbrtoc32

38   EXPECT_EQ(static_cast<size_t>(-2), mbrtoc32(nullptr, "\xc2", 1, &ps));  in TEST()
45 EXPECT_EQ(static_cast<size_t>(-2), mbrtoc32(nullptr, "\xc2", 1, &ps)); in TEST()
50 EXPECT_EQ(static_cast<size_t>(-2), mbrtoc32(nullptr, "\xf0\xa4", 1, &ps)); in TEST()
259 ASSERT_EQ(3U, mbrtoc32(out, "\xef\xbf\xbe", 3, nullptr)); in TEST()
261 ASSERT_EQ(3U, mbrtoc32(out, "\xef\xbf\xbf", 3, nullptr)); in TEST()
271 ASSERT_EQ(static_cast<size_t>(-1), mbrtoc32(out, "\xf5\x80\x80\x80", 4, nullptr)); in TEST()
275 TEST(uchar, mbrtoc32) { in TEST() argument
279 ASSERT_EQ(0U, mbrtoc32(out, "hello", 0, nullptr)); in TEST()
282 ASSERT_EQ(0U, mbrtoc32(out, "hello", 0, nullptr)); in TEST()
283 ASSERT_EQ(0U, mbrtoc32(out, "", 0, nullptr)); in TEST()
284 ASSERT_EQ(1U, mbrtoc32(out, "hello", 1, nullptr)); in TEST()
287 ASSERT_EQ(0U, mbrtoc32(nullptr, "hello", 0, nullptr)); in TEST()
288 ASSERT_EQ(0U, mbrtoc32(nullptr, "", 0, nullptr)); in TEST()
289 ASSERT_EQ(1U, mbrtoc32(nullptr, "hello", 1, nullptr)); in TEST()
291 ASSERT_EQ(0U, mbrtoc32(nullptr, nullptr, 0, nullptr)); in TEST()
297 ASSERT_EQ(1U, mbrtoc32(out, "abcdef", 6, nullptr)); in TEST()
300 ASSERT_EQ(2U, mbrtoc32(out, "\xc2\xa2" "cdef", 6, nullptr)); in TEST()
303 ASSERT_EQ(3U, mbrtoc32(out, "\xe2\x82\xac" "def", 6, nullptr)); in TEST()
306 ASSERT_EQ(4U, mbrtoc32(out, "\xf0\xa4\xad\xa2" "ef", 6, nullptr)); in TEST()
310 ASSERT_EQ(static_cast<size_t>(-1), mbrtoc32(out, "\xf8\xa1\xa2\xa3\xa4" "f", 6, nullptr)); in TEST()
314 ASSERT_EQ(static_cast<size_t>(-1), mbrtoc32(out, "\xf0\x82\x82\xac" "ef", 6, nullptr)); in TEST()
324 ASSERT_EQ(static_cast<size_t>(-2), mbrtoc32(&out, "\xc2", 1, ps)); in test_mbrtoc32_incomplete()
325 ASSERT_EQ(1U, mbrtoc32(&out, "\xa2" "cdef", 5, ps)); in test_mbrtoc32_incomplete()
329 ASSERT_EQ(static_cast<size_t>(-2), mbrtoc32(&out, "\xe2", 1, ps)); in test_mbrtoc32_incomplete()
330 ASSERT_EQ(static_cast<size_t>(-2), mbrtoc32(&out, "\x82", 1, ps)); in test_mbrtoc32_incomplete()
331 ASSERT_EQ(1U, mbrtoc32(&out, "\xac" "def", 4, ps)); in test_mbrtoc32_incomplete()
335 ASSERT_EQ(static_cast<size_t>(-2), mbrtoc32(&out, "\xf0", 1, ps)); in test_mbrtoc32_incomplete()
336 ASSERT_EQ(static_cast<size_t>(-2), mbrtoc32(&out, "\xa4\xad", 2, ps)); in test_mbrtoc32_incomplete()
337 ASSERT_EQ(1U, mbrtoc32(&out, "\xa2" "ef", 3, ps)); in test_mbrtoc32_incomplete()
342 ASSERT_EQ(static_cast<size_t>(-2), mbrtoc32(&out, "\xc2", 1, ps)); in test_mbrtoc32_incomplete()
343 ASSERT_EQ(static_cast<size_t>(-1), mbrtoc32(&out, "\x20" "cdef", 5, ps)); in test_mbrtoc32_incomplete()