Lines Matching refs:ps
49 mbstate_t ps; in TEST() local
52 memset(&ps, 0, sizeof(ps)); in TEST()
53 EXPECT_EQ(static_cast<size_t>(-2), mbrtoc32(NULL, "\xc2", 1, &ps)); in TEST()
54 EXPECT_EQ(static_cast<size_t>(-1), c32rtomb(out, 0x00a2, &ps)); in TEST()
59 memset(&ps, 0, sizeof(ps)); in TEST()
60 EXPECT_EQ(static_cast<size_t>(-2), mbrtoc32(NULL, "\xc2", 1, &ps)); in TEST()
61 EXPECT_EQ(1U, c32rtomb(NULL, 0x00a2, &ps)); in TEST()
62 EXPECT_TRUE(mbsinit(&ps)); in TEST()
64 memset(&ps, 0, sizeof(ps)); in TEST()
65 EXPECT_EQ(static_cast<size_t>(-2), mbrtoc32(NULL, "\xf0\xa4", 1, &ps)); in TEST()
66 EXPECT_EQ(1U, c32rtomb(out, L'\0', &ps)); in TEST()
67 EXPECT_TRUE(mbsinit(&ps)); in TEST()
233 void test_mbrtoc16_incomplete(mbstate_t* ps) { in test_mbrtoc16_incomplete() argument
239 ASSERT_EQ(static_cast<size_t>(-2), mbrtoc16(&out, "\xc2", 1, ps)); in test_mbrtoc16_incomplete()
240 ASSERT_EQ(1U, mbrtoc16(&out, "\xa2" "cdef", 5, ps)); in test_mbrtoc16_incomplete()
242 ASSERT_TRUE(mbsinit(ps)); in test_mbrtoc16_incomplete()
244 ASSERT_EQ(static_cast<size_t>(-2), mbrtoc16(&out, "\xe2", 1, ps)); in test_mbrtoc16_incomplete()
245 ASSERT_EQ(static_cast<size_t>(-2), mbrtoc16(&out, "\x82", 1, ps)); in test_mbrtoc16_incomplete()
246 ASSERT_EQ(1U, mbrtoc16(&out, "\xac" "def", 4, ps)); in test_mbrtoc16_incomplete()
248 ASSERT_TRUE(mbsinit(ps)); in test_mbrtoc16_incomplete()
250 ASSERT_EQ(static_cast<size_t>(-2), mbrtoc16(&out, "\xf4", 1, ps)); in test_mbrtoc16_incomplete()
251 ASSERT_EQ(static_cast<size_t>(-2), mbrtoc16(&out, "\x8a\xaf", 2, ps)); in test_mbrtoc16_incomplete()
252 ASSERT_EQ(static_cast<size_t>(-3), mbrtoc16(&out, "\x8d" "ef", 3, ps)); in test_mbrtoc16_incomplete()
254 ASSERT_EQ(1U, mbrtoc16(&out, "\x80" "ef", 3, ps)); in test_mbrtoc16_incomplete()
256 ASSERT_TRUE(mbsinit(ps)); in test_mbrtoc16_incomplete()
259 ASSERT_EQ(static_cast<size_t>(-2), mbrtoc16(&out, "\xc2", 1, ps)); in test_mbrtoc16_incomplete()
260 ASSERT_EQ(static_cast<size_t>(-1), mbrtoc16(&out, "\x20" "cdef", 5, ps)); in test_mbrtoc16_incomplete()
267 mbstate_t ps; in TEST() local
268 memset(&ps, 0, sizeof(ps)); in TEST()
270 test_mbrtoc16_incomplete(&ps); in TEST()
371 void test_mbrtoc32_incomplete(mbstate_t* ps) { in test_mbrtoc32_incomplete() argument
377 ASSERT_EQ(static_cast<size_t>(-2), mbrtoc32(&out, "\xc2", 1, ps)); in test_mbrtoc32_incomplete()
378 ASSERT_EQ(1U, mbrtoc32(&out, "\xa2" "cdef", 5, ps)); in test_mbrtoc32_incomplete()
380 ASSERT_TRUE(mbsinit(ps)); in test_mbrtoc32_incomplete()
382 ASSERT_EQ(static_cast<size_t>(-2), mbrtoc32(&out, "\xe2", 1, ps)); in test_mbrtoc32_incomplete()
383 ASSERT_EQ(static_cast<size_t>(-2), mbrtoc32(&out, "\x82", 1, ps)); in test_mbrtoc32_incomplete()
384 ASSERT_EQ(1U, mbrtoc32(&out, "\xac" "def", 4, ps)); in test_mbrtoc32_incomplete()
386 ASSERT_TRUE(mbsinit(ps)); in test_mbrtoc32_incomplete()
388 ASSERT_EQ(static_cast<size_t>(-2), mbrtoc32(&out, "\xf0", 1, ps)); in test_mbrtoc32_incomplete()
389 ASSERT_EQ(static_cast<size_t>(-2), mbrtoc32(&out, "\xa4\xad", 2, ps)); in test_mbrtoc32_incomplete()
390 ASSERT_EQ(1U, mbrtoc32(&out, "\xa2" "ef", 3, ps)); in test_mbrtoc32_incomplete()
392 ASSERT_TRUE(mbsinit(ps)); in test_mbrtoc32_incomplete()
395 ASSERT_EQ(static_cast<size_t>(-2), mbrtoc32(&out, "\xc2", 1, ps)); in test_mbrtoc32_incomplete()
396 ASSERT_EQ(static_cast<size_t>(-1), mbrtoc32(&out, "\x20" "cdef", 5, ps)); in test_mbrtoc32_incomplete()
403 mbstate_t ps; in TEST() local
404 memset(&ps, 0, sizeof(ps)); in TEST()
406 test_mbrtoc32_incomplete(&ps); in TEST()