Lines Matching refs:ps
34 mbstate_t ps; in TEST() local
37 memset(&ps, 0, sizeof(ps)); in TEST()
38 EXPECT_EQ(static_cast<size_t>(-2), mbrtoc32(nullptr, "\xc2", 1, &ps)); in TEST()
39 EXPECT_EQ(static_cast<size_t>(-1), c32rtomb(out, 0x00a2, &ps)); in TEST()
44 memset(&ps, 0, sizeof(ps)); in TEST()
45 EXPECT_EQ(static_cast<size_t>(-2), mbrtoc32(nullptr, "\xc2", 1, &ps)); in TEST()
46 EXPECT_EQ(1U, c32rtomb(nullptr, 0x00a2, &ps)); in TEST()
47 EXPECT_TRUE(mbsinit(&ps)); in TEST()
49 memset(&ps, 0, sizeof(ps)); in TEST()
50 EXPECT_EQ(static_cast<size_t>(-2), mbrtoc32(nullptr, "\xf0\xa4", 1, &ps)); in TEST()
51 EXPECT_EQ(1U, c32rtomb(out, L'\0', &ps)); in TEST()
52 EXPECT_TRUE(mbsinit(&ps)); in TEST()
170 void test_mbrtoc16_incomplete(mbstate_t* ps) { in test_mbrtoc16_incomplete() argument
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()
179 ASSERT_TRUE(mbsinit(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()
185 ASSERT_TRUE(mbsinit(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()
193 ASSERT_TRUE(mbsinit(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()
202 mbstate_t ps; in TEST() local
203 memset(&ps, 0, sizeof(ps)); in TEST()
205 test_mbrtoc16_incomplete(&ps); in TEST()
318 void test_mbrtoc32_incomplete(mbstate_t* ps) { in test_mbrtoc32_incomplete() argument
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()
327 ASSERT_TRUE(mbsinit(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()
333 ASSERT_TRUE(mbsinit(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()
339 ASSERT_TRUE(mbsinit(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()
348 mbstate_t ps; in TEST() local
349 memset(&ps, 0, sizeof(ps)); in TEST()
351 test_mbrtoc32_incomplete(&ps); in TEST()