Lines Matching refs:src
122 const wchar_t* src; in TEST() local
129 src = chars; in TEST()
130 EXPECT_EQ(5U, wcsrtombs(nullptr, &src, 0, nullptr)); in TEST()
131 EXPECT_EQ(&chars[0], src); in TEST()
132 src = chars; in TEST()
133 EXPECT_EQ(5U, wcsrtombs(nullptr, &src, 4, nullptr)); in TEST()
134 EXPECT_EQ(&chars[0], src); in TEST()
135 src = chars; in TEST()
136 EXPECT_EQ(5U, wcsrtombs(nullptr, &src, 256, nullptr)); in TEST()
137 EXPECT_EQ(&chars[0], src); in TEST()
150 src = bad_chars; in TEST()
151 EXPECT_EQ(static_cast<size_t>(-1), wcsrtombs(nullptr, &src, 0, nullptr)); in TEST()
152 EXPECT_EQ(&bad_chars[0], src); in TEST()
155 src = bad_chars; in TEST()
156 EXPECT_EQ(static_cast<size_t>(-1), wcsrtombs(nullptr, &src, 256, nullptr)); in TEST()
157 EXPECT_EQ(&bad_chars[0], src); in TEST()
182 src = chars; in TEST()
183 EXPECT_EQ(0U, wcsrtombs(bytes, &src, 0, nullptr)); in TEST()
184 EXPECT_EQ(&chars[0], src); // No input consumed. in TEST()
188 src = chars; in TEST()
189 EXPECT_EQ(4U, wcsrtombs(bytes, &src, 4, nullptr)); in TEST()
190 EXPECT_EQ(&chars[4], src); // Some input consumed. in TEST()
196 src = chars; in TEST()
197 EXPECT_EQ(5U, wcsrtombs(bytes, &src, 256, nullptr)); in TEST()
198 EXPECT_EQ(nullptr, src); // All input consumed! in TEST()
203 src = chars; in TEST()
204 EXPECT_EQ(5U, wcsrtombs(bytes, &src, 6, nullptr)); in TEST()
205 EXPECT_EQ(nullptr, src); // All input consumed. in TEST()
210 src = bad_chars; in TEST()
211 EXPECT_EQ(static_cast<size_t>(-1), wcsrtombs(bytes, &src, 256, nullptr)); in TEST()
212 EXPECT_EQ(&bad_chars[2], src); in TEST()
219 src = chars; in TEST()
222 EXPECT_EQ(static_cast<size_t>(-1), wcsrtombs(nullptr, &src, 0, &ps)); in TEST()
530 const char* src; in TEST() local
533 src = s; in TEST()
534 ASSERT_EQ(0U, mbsnrtowcs(dst, &src, 0, 0, nullptr)); in TEST()
537 src = s; in TEST()
538 ASSERT_EQ(2U, mbsnrtowcs(dst, &src, 2, 123, nullptr)); // glibc chokes on SIZE_MAX here. in TEST()
541 ASSERT_EQ(&s[2], src); in TEST()
544 src = s; in TEST()
545 ASSERT_EQ(3U, mbsnrtowcs(dst, &src, SIZE_MAX, 3, nullptr)); in TEST()
549 ASSERT_EQ(&s[3], src); in TEST()
553 src = incomplete; in TEST()
555 ASSERT_EQ(static_cast<size_t>(-1), mbsnrtowcs(dst, &src, SIZE_MAX, 3, nullptr)); in TEST()
558 src = incomplete; in TEST()
560 ASSERT_EQ(static_cast<size_t>(-1), mbsnrtowcs(nullptr, &src, SIZE_MAX, 3, nullptr)); in TEST()
593 const wchar_t src[] = L"Source string"; in TEST() local
594 wchar_t dst[NUM_WCHARS(sizeof(src))]; in TEST()
596 EXPECT_EQ(dst, wmemcpy(dst, src, NUM_WCHARS(sizeof(src)))); in TEST()
597 EXPECT_STREQ(dst, src); in TEST()
601 const wchar_t src[] = L"Source string"; in TEST() local
602 wchar_t dst[NUM_WCHARS(sizeof(src))]; in TEST()
604 EXPECT_EQ(dst + NUM_WCHARS(sizeof(src)) - 1, wcpcpy(dst, src)); in TEST()
605 EXPECT_STREQ(dst, src); in TEST()
609 const wchar_t src[] = L"Source string"; in TEST() local
610 wchar_t dst[NUM_WCHARS(sizeof(src)) + 5]; in TEST()
612 size_t src_len = NUM_WCHARS(sizeof(src)) - 1; in TEST()
613 EXPECT_EQ(dst + src_len, wcpncpy(dst, src, src_len + 1)); in TEST()
614 EXPECT_STREQ(dst, src); in TEST()
616 EXPECT_EQ(dst + 6, wcpncpy(dst, src, 6)); in TEST()
621 EXPECT_EQ(dst + src_len, wcpncpy(dst, src, src_len + 4)); in TEST()
622 EXPECT_STREQ(dst, src); in TEST()
631 const wchar_t src[] = L"Source string"; in TEST() local
632 wchar_t dst[NUM_WCHARS(sizeof(src))]; in TEST()
634 EXPECT_EQ(dst, wcscpy(dst, src)); in TEST()
635 EXPECT_STREQ(src, dst); in TEST()
639 const wchar_t src[] = L"Source string"; in TEST() local
640 wchar_t dst[NUM_WCHARS(sizeof(src)) + 5]; in TEST()
642 size_t src_len = NUM_WCHARS(sizeof(src)) - 1; in TEST()
643 EXPECT_EQ(dst, wcsncpy(dst, src, src_len + 1)); in TEST()
644 EXPECT_STREQ(dst, src); in TEST()
646 EXPECT_EQ(dst, wcsncpy(dst, src, 6)); in TEST()
651 EXPECT_EQ(dst, wcsncpy(dst, src, src_len + 4)); in TEST()
652 EXPECT_STREQ(dst, src); in TEST()