• Home
  • Raw
  • Download

Lines Matching refs:ps

92   mbstate_t ps;  in TEST()  local
95 memset(&ps, 0, sizeof(ps)); in TEST()
96 EXPECT_EQ(static_cast<size_t>(-2), mbrtowc(NULL, "\xc2", 1, &ps)); in TEST()
97 EXPECT_EQ(static_cast<size_t>(-1), wcrtomb(out, 0x00a2, &ps)); in TEST()
102 memset(&ps, 0, sizeof(ps)); in TEST()
103 EXPECT_EQ(static_cast<size_t>(-2), mbrtowc(NULL, "\xc2", 1, &ps)); in TEST()
104 EXPECT_EQ(1U, wcrtomb(NULL, 0x00a2, &ps)); in TEST()
105 EXPECT_TRUE(mbsinit(&ps)); in TEST()
107 memset(&ps, 0, sizeof(ps)); in TEST()
108 EXPECT_EQ(static_cast<size_t>(-2), mbrtowc(NULL, "\xf0\xa4", 1, &ps)); in TEST()
109 EXPECT_EQ(1U, wcrtomb(out, L'\0', &ps)); in TEST()
110 EXPECT_TRUE(mbsinit(&ps)); in TEST()
212 mbstate_t ps; in TEST() local
214 memset(&ps, 0, sizeof(ps)); in TEST()
215 ASSERT_EQ(static_cast<size_t>(-2), mbrtowc(NULL, "\xc2", 1, &ps)); in TEST()
216 EXPECT_EQ(static_cast<size_t>(-1), wcsrtombs(NULL, &src, 0, &ps)); in TEST()
297 void test_mbrtowc_incomplete(mbstate_t* ps) { in test_mbrtowc_incomplete() argument
303 ASSERT_EQ(static_cast<size_t>(-2), mbrtowc(&out, "\xc2", 1, ps)); in test_mbrtowc_incomplete()
304 ASSERT_EQ(1U, mbrtowc(&out, "\xa2" "cdef", 5, ps)); in test_mbrtowc_incomplete()
306 ASSERT_TRUE(mbsinit(ps)); in test_mbrtowc_incomplete()
308 ASSERT_EQ(static_cast<size_t>(-2), mbrtowc(&out, "\xe2", 1, ps)); in test_mbrtowc_incomplete()
309 ASSERT_EQ(static_cast<size_t>(-2), mbrtowc(&out, "\x82", 1, ps)); in test_mbrtowc_incomplete()
310 ASSERT_EQ(1U, mbrtowc(&out, "\xac" "def", 4, ps)); in test_mbrtowc_incomplete()
312 ASSERT_TRUE(mbsinit(ps)); in test_mbrtowc_incomplete()
314 ASSERT_EQ(static_cast<size_t>(-2), mbrtowc(&out, "\xf0", 1, ps)); in test_mbrtowc_incomplete()
315 ASSERT_EQ(static_cast<size_t>(-2), mbrtowc(&out, "\xa4\xad", 2, ps)); in test_mbrtowc_incomplete()
316 ASSERT_EQ(1U, mbrtowc(&out, "\xa2" "ef", 3, ps)); in test_mbrtowc_incomplete()
318 ASSERT_TRUE(mbsinit(ps)); in test_mbrtowc_incomplete()
321 ASSERT_EQ(static_cast<size_t>(-2), mbrtowc(&out, "\xc2", 1, ps)); in test_mbrtowc_incomplete()
322 ASSERT_EQ(static_cast<size_t>(-1), mbrtowc(&out, "\x20" "cdef", 5, ps)); in test_mbrtowc_incomplete()
327 mbstate_t ps; in TEST() local
328 memset(&ps, 0, sizeof(ps)); in TEST()
330 test_mbrtowc_incomplete(&ps); in TEST()
334 void test_mbsrtowcs(mbstate_t* ps) { in test_mbsrtowcs() argument
338 ASSERT_EQ(4U, mbsrtowcs(out, &valid, 4, ps)); in test_mbsrtowcs()
347 ASSERT_EQ(2U, mbsrtowcs(out, &valid, 4, ps)); in test_mbsrtowcs()
357 ASSERT_EQ(static_cast<size_t>(-1), mbsrtowcs(out, &invalid, 4, ps)); in test_mbsrtowcs()
362 ASSERT_EQ(static_cast<size_t>(-1), mbsrtowcs(out, &incomplete, 2, ps)); in test_mbsrtowcs()
371 mbstate_t ps; in TEST() local
372 memset(&ps, 0, sizeof(ps)); in TEST()
373 test_mbsrtowcs(&ps); in TEST()
379 ASSERT_EQ(static_cast<size_t>(-2), mbrtowc(&out, "\xc2", 1, &ps)); in TEST()
380 ASSERT_EQ(static_cast<size_t>(-1), mbsrtowcs(&out, &invalid, 1, &ps)); in TEST()