Lines Matching refs:src
160 const wchar_t* src; in TEST() local
167 src = chars; in TEST()
168 EXPECT_EQ(5U, wcsrtombs(nullptr, &src, 0, nullptr)); in TEST()
169 EXPECT_EQ(&chars[0], src); in TEST()
170 src = chars; in TEST()
171 EXPECT_EQ(5U, wcsrtombs(nullptr, &src, 4, nullptr)); in TEST()
172 EXPECT_EQ(&chars[0], src); in TEST()
173 src = chars; in TEST()
174 EXPECT_EQ(5U, wcsrtombs(nullptr, &src, 256, nullptr)); in TEST()
175 EXPECT_EQ(&chars[0], src); in TEST()
188 src = bad_chars; in TEST()
189 EXPECT_EQ(static_cast<size_t>(-1), wcsrtombs(nullptr, &src, 0, nullptr)); in TEST()
190 EXPECT_EQ(&bad_chars[0], src); in TEST()
193 src = bad_chars; in TEST()
194 EXPECT_EQ(static_cast<size_t>(-1), wcsrtombs(nullptr, &src, 256, nullptr)); in TEST()
195 EXPECT_EQ(&bad_chars[0], src); in TEST()
220 src = chars; in TEST()
221 EXPECT_EQ(0U, wcsrtombs(bytes, &src, 0, nullptr)); in TEST()
222 EXPECT_EQ(&chars[0], src); // No input consumed. in TEST()
226 src = chars; in TEST()
227 EXPECT_EQ(4U, wcsrtombs(bytes, &src, 4, nullptr)); in TEST()
228 EXPECT_EQ(&chars[4], src); // Some input consumed. in TEST()
234 src = chars; in TEST()
235 EXPECT_EQ(5U, wcsrtombs(bytes, &src, 256, nullptr)); in TEST()
236 EXPECT_EQ(nullptr, src); // All input consumed! in TEST()
241 src = chars; in TEST()
242 EXPECT_EQ(5U, wcsrtombs(bytes, &src, 6, nullptr)); in TEST()
243 EXPECT_EQ(nullptr, src); // All input consumed. in TEST()
248 src = bad_chars; in TEST()
249 EXPECT_EQ(static_cast<size_t>(-1), wcsrtombs(bytes, &src, 256, nullptr)); in TEST()
250 EXPECT_EQ(&bad_chars[2], src); in TEST()
257 src = chars; in TEST()
260 EXPECT_EQ(static_cast<size_t>(-1), wcsrtombs(nullptr, &src, 0, &ps)); in TEST()
625 const char* src; in TEST() local
628 src = s; in TEST()
629 ASSERT_EQ(0U, mbsnrtowcs(dst, &src, 0, 0, nullptr)); in TEST()
632 src = s; in TEST()
633 ASSERT_EQ(2U, mbsnrtowcs(dst, &src, 2, 123, nullptr)); // glibc chokes on SIZE_MAX here. in TEST()
636 ASSERT_EQ(&s[2], src); in TEST()
639 src = s; in TEST()
640 ASSERT_EQ(3U, mbsnrtowcs(dst, &src, SIZE_MAX, 3, nullptr)); in TEST()
644 ASSERT_EQ(&s[3], src); in TEST()
648 src = incomplete; in TEST()
650 ASSERT_EQ(static_cast<size_t>(-1), mbsnrtowcs(dst, &src, SIZE_MAX, 3, nullptr)); in TEST()
653 src = incomplete; in TEST()
655 ASSERT_EQ(static_cast<size_t>(-1), mbsnrtowcs(nullptr, &src, SIZE_MAX, 3, nullptr)); in TEST()
688 const wchar_t src[] = L"Source string"; in TEST() local
689 wchar_t dst[NUM_WCHARS(sizeof(src))]; in TEST()
691 EXPECT_EQ(dst, wmemcpy(dst, src, NUM_WCHARS(sizeof(src)))); in TEST()
692 EXPECT_STREQ(dst, src); in TEST()
696 const wchar_t src[] = L"Source string"; in TEST() local
697 wchar_t dst[NUM_WCHARS(sizeof(src))]; in TEST()
699 EXPECT_EQ(dst + NUM_WCHARS(sizeof(src)) - 1, wcpcpy(dst, src)); in TEST()
700 EXPECT_STREQ(dst, src); in TEST()
704 const wchar_t src[] = L"Source string"; in TEST() local
705 wchar_t dst[NUM_WCHARS(sizeof(src)) + 5]; in TEST()
707 size_t src_len = NUM_WCHARS(sizeof(src)) - 1; in TEST()
708 EXPECT_EQ(dst + src_len, wcpncpy(dst, src, src_len + 1)); in TEST()
709 EXPECT_STREQ(dst, src); in TEST()
711 EXPECT_EQ(dst + 6, wcpncpy(dst, src, 6)); in TEST()
716 EXPECT_EQ(dst + src_len, wcpncpy(dst, src, src_len + 4)); in TEST()
717 EXPECT_STREQ(dst, src); in TEST()
726 const wchar_t src[] = L"Source string"; in TEST() local
727 wchar_t dst[NUM_WCHARS(sizeof(src))]; in TEST()
729 EXPECT_EQ(dst, wcscpy(dst, src)); in TEST()
730 EXPECT_STREQ(src, dst); in TEST()
734 const wchar_t src[] = L"Source string"; in TEST() local
735 wchar_t dst[NUM_WCHARS(sizeof(src)) + 5]; in TEST()
737 size_t src_len = NUM_WCHARS(sizeof(src)) - 1; in TEST()
738 EXPECT_EQ(dst, wcsncpy(dst, src, src_len + 1)); in TEST()
739 EXPECT_STREQ(dst, src); in TEST()
741 EXPECT_EQ(dst, wcsncpy(dst, src, 6)); in TEST()
748 EXPECT_EQ(dst, wcsncpy(dst, src, src_len + 4)); in TEST()
749 EXPECT_STREQ(dst, src); in TEST()