Lines Matching full:static_cast
86 EXPECT_EQ(static_cast<size_t>(-1), wcrtomb(bytes, 0xffffffff, NULL));
96 EXPECT_EQ(static_cast<size_t>(-2), mbrtowc(NULL, "\xc2", 1, &ps));
97 EXPECT_EQ(static_cast<size_t>(-1), wcrtomb(out, 0x00a2, &ps));
103 EXPECT_EQ(static_cast<size_t>(-2), mbrtowc(NULL, "\xc2", 1, &ps));
108 EXPECT_EQ(static_cast<size_t>(-2), mbrtowc(NULL, "\xf0\xa4", 1, &ps));
115 const wchar_t bad_chars[] = { L'h', L'i', static_cast<wchar_t>(0xffffffff), 0 };
135 EXPECT_EQ(static_cast<size_t>(-1), wcstombs(NULL, bad_chars, 0));
138 EXPECT_EQ(static_cast<size_t>(-1), wcstombs(NULL, bad_chars, 256));
145 EXPECT_EQ(static_cast<size_t>(-1), wcsrtombs(NULL, &src, 0, NULL));
150 EXPECT_EQ(static_cast<size_t>(-1), wcsrtombs(NULL, &src, 256, NULL));
169 EXPECT_EQ(static_cast<size_t>(-1), wcstombs(bytes, bad_chars, 256));
205 EXPECT_EQ(static_cast<size_t>(-1), wcsrtombs(bytes, &src, 256, NULL));
215 ASSERT_EQ(static_cast<size_t>(-2), mbrtowc(NULL, "\xc2", 1, &ps));
216 EXPECT_EQ(static_cast<size_t>(-1), wcsrtombs(NULL, &src, 0, &ps));
280 ASSERT_EQ(static_cast<wchar_t>(0x00a2), out[0]);
283 ASSERT_EQ(static_cast<wchar_t>(0x20ac), out[0]);
286 ASSERT_EQ(static_cast<wchar_t>(0x24b62), out[0]);
289 ASSERT_EQ(static_cast<size_t>(-1), mbrtowc(out, "\xf8\xa1\xa2\xa3\xa4" "f", 6, NULL));
293 ASSERT_EQ(static_cast<size_t>(-1), mbrtowc(out, "\xf0\x82\x82\xac" "ef", 6, NULL));
303 ASSERT_EQ(static_cast<size_t>(-2), mbrtowc(&out, "\xc2", 1, ps));
305 ASSERT_EQ(static_cast<wchar_t>(0x00a2), out);
308 ASSERT_EQ(static_cast<size_t>(-2), mbrtowc(&out, "\xe2", 1, ps));
309 ASSERT_EQ(static_cast<size_t>(-2), mbrtowc(&out, "\x82", 1, ps));
311 ASSERT_EQ(static_cast<wchar_t>(0x20ac), out);
314 ASSERT_EQ(static_cast<size_t>(-2), mbrtowc(&out, "\xf0", 1, ps));
315 ASSERT_EQ(static_cast<size_t>(-2), mbrtowc(&out, "\xa4\xad", 2, ps));
317 ASSERT_EQ(static_cast<wchar_t>(0x24b62), out);
321 ASSERT_EQ(static_cast<size_t>(-2), mbrtowc(&out, "\xc2", 1, ps));
322 ASSERT_EQ(static_cast<size_t>(-1), mbrtowc(&out, "\x20" "cdef", 5, ps));
340 ASSERT_EQ(static_cast<wchar_t>(0x00a2), out[1]);
341 ASSERT_EQ(static_cast<wchar_t>(0x20ac), out[2]);
342 ASSERT_EQ(static_cast<wchar_t>(0x24b62), out[3]);
357 ASSERT_EQ(static_cast<size_t>(-1), mbsrtowcs(out, &invalid, 4, ps));
362 ASSERT_EQ(static_cast<size_t>(-1), mbsrtowcs(out, &incomplete, 2, ps));
379 ASSERT_EQ(static_cast<size_t>(-2), mbrtowc(&out, "\xc2", 1, &ps));
380 ASSERT_EQ(static_cast<size_t>(-1), mbsrtowcs(&out, &invalid, 1, &ps));
469 ASSERT_GE(static_cast<size_t>(MB_LEN_MAX), MB_CUR_MAX);