Lines Matching refs:dst

528   wchar_t dst[128];  in TEST()  local
532 memset(dst, 0, sizeof(dst)); in TEST()
534 ASSERT_EQ(0U, mbsnrtowcs(dst, &src, 0, 0, nullptr)); in TEST()
536 memset(dst, 0, sizeof(dst)); in TEST()
538 ASSERT_EQ(2U, mbsnrtowcs(dst, &src, 2, 123, nullptr)); // glibc chokes on SIZE_MAX here. in TEST()
539 ASSERT_EQ(L'h', dst[0]); in TEST()
540 ASSERT_EQ(L'e', dst[1]); in TEST()
543 memset(dst, 0, sizeof(dst)); in TEST()
545 ASSERT_EQ(3U, mbsnrtowcs(dst, &src, SIZE_MAX, 3, nullptr)); in TEST()
546 ASSERT_EQ(L'h', dst[0]); in TEST()
547 ASSERT_EQ(L'e', dst[1]); in TEST()
548 ASSERT_EQ(L'l', dst[2]); in TEST()
551 memset(dst, 0, sizeof(dst)); in TEST()
555 ASSERT_EQ(static_cast<size_t>(-1), mbsnrtowcs(dst, &src, SIZE_MAX, 3, nullptr)); in TEST()
594 wchar_t dst[NUM_WCHARS(sizeof(src))]; in TEST() local
596 EXPECT_EQ(dst, wmemcpy(dst, src, NUM_WCHARS(sizeof(src)))); in TEST()
597 EXPECT_STREQ(dst, src); in TEST()
602 wchar_t dst[NUM_WCHARS(sizeof(src))]; in TEST() local
604 EXPECT_EQ(dst + NUM_WCHARS(sizeof(src)) - 1, wcpcpy(dst, src)); in TEST()
605 EXPECT_STREQ(dst, src); in TEST()
610 wchar_t dst[NUM_WCHARS(sizeof(src)) + 5]; in TEST() local
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()
617 dst[6] = L'\0'; in TEST()
618 EXPECT_STREQ(dst, L"Source"); in TEST()
620 wmemset(dst, L'x', NUM_WCHARS(sizeof(dst))); in TEST()
621 EXPECT_EQ(dst + src_len, wcpncpy(dst, src, src_len + 4)); in TEST()
622 EXPECT_STREQ(dst, src); in TEST()
623 EXPECT_EQ(dst[src_len], L'\0'); in TEST()
624 EXPECT_EQ(dst[src_len+1], L'\0'); in TEST()
625 EXPECT_EQ(dst[src_len+2], L'\0'); in TEST()
626 EXPECT_EQ(dst[src_len+3], L'\0'); in TEST()
627 EXPECT_EQ(dst[src_len+4], L'x'); in TEST()
632 wchar_t dst[NUM_WCHARS(sizeof(src))]; in TEST() local
634 EXPECT_EQ(dst, wcscpy(dst, src)); in TEST()
635 EXPECT_STREQ(src, dst); in TEST()
640 wchar_t dst[NUM_WCHARS(sizeof(src)) + 5]; in TEST() local
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()
647 dst[6] = L'\0'; in TEST()
648 EXPECT_STREQ(dst, L"Source"); in TEST()
650 wmemset(dst, L'x', NUM_WCHARS(sizeof(dst))); in TEST()
651 EXPECT_EQ(dst, wcsncpy(dst, src, src_len + 4)); in TEST()
652 EXPECT_STREQ(dst, src); in TEST()
653 EXPECT_EQ(dst[src_len], L'\0'); in TEST()
654 EXPECT_EQ(dst[src_len+1], L'\0'); in TEST()
655 EXPECT_EQ(dst[src_len+2], L'\0'); in TEST()
656 EXPECT_EQ(dst[src_len+3], L'\0'); in TEST()
657 EXPECT_EQ(dst[src_len+4], L'x'); in TEST()
793 wchar_t dst[6]; in TEST() local
794 ASSERT_EQ(&dst[4], wmempcpy(dst, L"hello", 4)); in TEST()