Lines Matching refs:dst
536 wchar_t dst[128]; in TEST() local
540 memset(dst, 0, sizeof(dst)); in TEST()
542 ASSERT_EQ(0U, mbsnrtowcs(dst, &src, 0, 0, nullptr)); in TEST()
544 memset(dst, 0, sizeof(dst)); in TEST()
546 ASSERT_EQ(2U, mbsnrtowcs(dst, &src, 2, 123, nullptr)); // glibc chokes on SIZE_MAX here. in TEST()
547 ASSERT_EQ(L'h', dst[0]); in TEST()
548 ASSERT_EQ(L'e', dst[1]); in TEST()
551 memset(dst, 0, sizeof(dst)); in TEST()
553 ASSERT_EQ(3U, mbsnrtowcs(dst, &src, SIZE_MAX, 3, nullptr)); in TEST()
554 ASSERT_EQ(L'h', dst[0]); in TEST()
555 ASSERT_EQ(L'e', dst[1]); in TEST()
556 ASSERT_EQ(L'l', dst[2]); in TEST()
559 memset(dst, 0, sizeof(dst)); in TEST()
563 ASSERT_EQ(static_cast<size_t>(-1), mbsnrtowcs(dst, &src, SIZE_MAX, 3, nullptr)); in TEST()
602 wchar_t dst[NUM_WCHARS(sizeof(src))]; in TEST() local
604 EXPECT_EQ(dst, wmemcpy(dst, src, NUM_WCHARS(sizeof(src)))); in TEST()
605 EXPECT_STREQ(dst, src); in TEST()
610 wchar_t dst[NUM_WCHARS(sizeof(src))]; in TEST() local
612 EXPECT_EQ(dst + NUM_WCHARS(sizeof(src)) - 1, wcpcpy(dst, src)); in TEST()
613 EXPECT_STREQ(dst, src); in TEST()
618 wchar_t dst[NUM_WCHARS(sizeof(src)) + 5]; in TEST() local
621 EXPECT_EQ(dst + src_len, wcpncpy(dst, src, src_len + 1)); in TEST()
622 EXPECT_STREQ(dst, src); in TEST()
624 EXPECT_EQ(dst + 6, wcpncpy(dst, src, 6)); in TEST()
625 dst[6] = L'\0'; in TEST()
626 EXPECT_STREQ(dst, L"Source"); in TEST()
628 wmemset(dst, L'x', NUM_WCHARS(sizeof(dst))); in TEST()
629 EXPECT_EQ(dst + src_len, wcpncpy(dst, src, src_len + 4)); in TEST()
630 EXPECT_STREQ(dst, src); in TEST()
631 EXPECT_EQ(dst[src_len], L'\0'); in TEST()
632 EXPECT_EQ(dst[src_len+1], L'\0'); in TEST()
633 EXPECT_EQ(dst[src_len+2], L'\0'); in TEST()
634 EXPECT_EQ(dst[src_len+3], L'\0'); in TEST()
635 EXPECT_EQ(dst[src_len+4], L'x'); in TEST()
640 wchar_t dst[NUM_WCHARS(sizeof(src))]; in TEST() local
642 EXPECT_EQ(dst, wcscpy(dst, src)); in TEST()
643 EXPECT_STREQ(src, dst); in TEST()
648 wchar_t dst[NUM_WCHARS(sizeof(src)) + 5]; in TEST() local
651 EXPECT_EQ(dst, wcsncpy(dst, src, src_len + 1)); in TEST()
652 EXPECT_STREQ(dst, src); in TEST()
654 EXPECT_EQ(dst, wcsncpy(dst, src, 6)); in TEST()
655 dst[6] = L'\0'; in TEST()
656 EXPECT_STREQ(dst, L"Source"); in TEST()
657 EXPECT_EQ(dst, wcsncpy(dst, L"clobber", 0)); in TEST()
658 EXPECT_STREQ(dst, L"Source"); in TEST()
660 wmemset(dst, L'x', NUM_WCHARS(sizeof(dst))); in TEST()
661 EXPECT_EQ(dst, wcsncpy(dst, src, src_len + 4)); in TEST()
662 EXPECT_STREQ(dst, src); in TEST()
663 EXPECT_EQ(dst[src_len], L'\0'); in TEST()
664 EXPECT_EQ(dst[src_len+1], L'\0'); in TEST()
665 EXPECT_EQ(dst[src_len+2], L'\0'); in TEST()
666 EXPECT_EQ(dst[src_len+3], L'\0'); in TEST()
667 EXPECT_EQ(dst[src_len+4], L'x'); in TEST()
803 wchar_t dst[6]; in TEST() local
804 ASSERT_EQ(&dst[4], wmempcpy(dst, L"hello", 4)); in TEST()
1046 wchar_t dst[32]; in TEST() local
1047 ASSERT_EQ(11U, wcslcpy(dst, L"hello world", 3)); in TEST()
1048 ASSERT_STREQ(L"he", dst); in TEST()
1049 ASSERT_EQ(11U, wcslcpy(dst, L"hello world", 32)); in TEST()
1050 ASSERT_STREQ(L"hello world", dst); in TEST()
1057 wchar_t dst[32]; in TEST() local
1058 ASSERT_EQ(dst, wcscat(dst, L"hello")); in TEST()
1059 ASSERT_STREQ(dst, L"hello"); in TEST()
1060 ASSERT_EQ(dst, wcscat(dst, L" world")); in TEST()
1061 ASSERT_STREQ(dst, L"hello world"); in TEST()
1065 wchar_t dst[32]; in TEST() local
1066 ASSERT_EQ(dst, wcscpy(dst, L"hello")); in TEST()
1067 ASSERT_STREQ(dst, L"hello"); in TEST()
1068 ASSERT_EQ(dst, wcscpy(dst, L"world")); in TEST()
1069 ASSERT_STREQ(dst, L"world"); in TEST()
1100 wchar_t dst[4] = {}; in TEST() local
1101 ASSERT_EQ(1U, wcslcat(dst, L"a", 4)); in TEST()
1102 ASSERT_EQ(7U, wcslcat(dst, L"bcdefg", 4)); in TEST()
1103 ASSERT_STREQ(dst, L"abc"); in TEST()
1120 wchar_t dst[32]; in TEST() local
1121 ASSERT_EQ(dst, wcsncat(dst, L"hello, world!", 5)); in TEST()
1122 ASSERT_STREQ(dst, L"hello"); in TEST()
1123 ASSERT_EQ(dst, wcsncat(dst, L"hello, world!", 0)); in TEST()
1124 ASSERT_STREQ(dst, L"hello"); in TEST()
1125 ASSERT_EQ(dst, wcsncat(dst, L", world!", 8)); in TEST()
1126 ASSERT_STREQ(dst, L"hello, world!"); in TEST()
1182 wchar_t dst[32] = {}; in TEST() local
1183 ASSERT_EQ(dst, wmemcpy(dst, L"hello", 5)); in TEST()
1184 ASSERT_STREQ(dst, L"hello"); in TEST()
1188 wchar_t dst[32] = {}; in TEST() local
1189 ASSERT_EQ(dst, wmemmove(dst, L"hello", 5)); in TEST()
1190 ASSERT_STREQ(dst, L"hello"); in TEST()
1194 wchar_t dst[4] = {}; in TEST() local
1195 ASSERT_EQ(dst, wmemset(dst, 0x12345678, 3)); in TEST()
1196 ASSERT_EQ(dst[0], wchar_t(0x12345678)); in TEST()
1197 ASSERT_EQ(dst[1], wchar_t(0x12345678)); in TEST()
1198 ASSERT_EQ(dst[2], wchar_t(0x12345678)); in TEST()
1199 ASSERT_EQ(dst[3], wchar_t(0)); in TEST()
1200 ASSERT_EQ(dst, wmemset(dst, L'y', 0)); in TEST()
1201 ASSERT_EQ(dst[0], wchar_t(0x12345678)); in TEST()