Lines Matching refs:mbrtoc16
115 ASSERT_EQ(0U, mbrtoc16(nullptr, nullptr, 0, nullptr)); in TEST()
122 ASSERT_EQ(0U, mbrtoc16(&out, "hello", 0, nullptr)); in TEST()
125 ASSERT_EQ(0U, mbrtoc16(&out, "hello", 0, nullptr)); in TEST()
126 ASSERT_EQ(0U, mbrtoc16(&out, "", 0, nullptr)); in TEST()
127 ASSERT_EQ(1U, mbrtoc16(&out, "hello", 1, nullptr)); in TEST()
131 TEST(uchar, mbrtoc16) { in TEST() argument
138 ASSERT_EQ(1U, mbrtoc16(&out, "abcdef", 6, nullptr)); in TEST()
141 ASSERT_EQ(2U, mbrtoc16(&out, "\xc2\xa2" "cdef", 6, nullptr)); in TEST()
144 ASSERT_EQ(3U, mbrtoc16(&out, "\xe2\x82\xac" "def", 6, nullptr)); in TEST()
152 mbrtoc16(&out, "\xf4\x8a\xaf\x8d", 6, nullptr)); in TEST()
154 ASSERT_EQ(4U, mbrtoc16(&out, "\xf4\x8a\xaf\x8d" "ef", 6, nullptr)); in TEST()
161 mbrtoc16(&out, "\xf0\x80\xbf\xbf", 6, nullptr)); in TEST()
167 mbrtoc16(&out, "\xf5\x80\x80\x80", 6, nullptr)); in TEST()
176 ASSERT_EQ(static_cast<size_t>(-2), mbrtoc16(&out, "\xc2", 1, ps)); in test_mbrtoc16_incomplete()
177 ASSERT_EQ(1U, mbrtoc16(&out, "\xa2" "cdef", 5, ps)); in test_mbrtoc16_incomplete()
181 ASSERT_EQ(static_cast<size_t>(-2), mbrtoc16(&out, "\xe2", 1, ps)); in test_mbrtoc16_incomplete()
182 ASSERT_EQ(static_cast<size_t>(-2), mbrtoc16(&out, "\x82", 1, ps)); in test_mbrtoc16_incomplete()
183 ASSERT_EQ(1U, mbrtoc16(&out, "\xac" "def", 4, ps)); in test_mbrtoc16_incomplete()
187 ASSERT_EQ(static_cast<size_t>(-2), mbrtoc16(&out, "\xf4", 1, ps)); in test_mbrtoc16_incomplete()
188 ASSERT_EQ(static_cast<size_t>(-2), mbrtoc16(&out, "\x8a\xaf", 2, ps)); in test_mbrtoc16_incomplete()
189 ASSERT_EQ(static_cast<size_t>(-3), mbrtoc16(&out, "\x8d" "ef", 3, ps)); in test_mbrtoc16_incomplete()
191 ASSERT_EQ(1U, mbrtoc16(&out, "\x80" "ef", 3, ps)); in test_mbrtoc16_incomplete()
196 ASSERT_EQ(static_cast<size_t>(-2), mbrtoc16(&out, "\xc2", 1, ps)); in test_mbrtoc16_incomplete()
197 ASSERT_EQ(static_cast<size_t>(-1), mbrtoc16(&out, "\x20" "cdef", 5, ps)); in test_mbrtoc16_incomplete()