Lines Matching refs:L
47 EXPECT_EQ(0, wctomb(nullptr, L'h')); in TEST()
48 EXPECT_EQ(0, wctomb(nullptr, L'\0')); in TEST()
49 EXPECT_EQ(1U, wcrtomb(nullptr, L'\0', nullptr)); in TEST()
50 EXPECT_EQ(1U, wcrtomb(nullptr, L'h', nullptr)); in TEST()
55 EXPECT_EQ(1, wctomb(bytes, L'\0')); in TEST()
56 EXPECT_EQ(1U, wcrtomb(bytes, L'\0', nullptr)); in TEST()
60 EXPECT_EQ(1, wctomb(bytes, L'h')); in TEST()
63 EXPECT_EQ(1U, wcrtomb(bytes, L'h', nullptr)); in TEST()
71 EXPECT_EQ(1U, wcrtomb(bytes, L'h', nullptr)); in TEST()
115 EXPECT_EQ(1U, wcrtomb(out, L'\0', &ps)); in TEST()
120 const wchar_t chars[] = { L'h', L'e', L'l', L'l', L'o', 0 }; in TEST()
121 const wchar_t bad_chars[] = { L'h', L'i', static_cast<wchar_t>(0xffffffff), 0 }; in TEST()
231 const wchar_t* haystack = L"big daddy/giant haystacks!"; in TEST()
232 const wchar_t* empty_haystack = L""; in TEST()
235 ASSERT_EQ(haystack, wcsstr(haystack, L"")); in TEST()
236 ASSERT_EQ(empty_haystack, wcsstr(empty_haystack, L"")); in TEST()
238 ASSERT_EQ(haystack, wcsstr(haystack, L"b")); in TEST()
239 ASSERT_EQ(haystack, wcsstr(haystack, L"big")); in TEST()
240 ASSERT_EQ(haystack + 9, wcsstr(haystack, L"/")); in TEST()
241 ASSERT_EQ(haystack + 9, wcsstr(haystack, L"/giant")); in TEST()
242 ASSERT_EQ(haystack + 25, wcsstr(haystack, L"!")); in TEST()
243 ASSERT_EQ(haystack + 19, wcsstr(haystack, L"stacks!")); in TEST()
245 ASSERT_EQ(nullptr, wcsstr(haystack, L"monkey")); in TEST()
246 ASSERT_EQ(nullptr, wcsstr(empty_haystack, L"monkey")); in TEST()
251 ASSERT_TRUE(wcsstr(L"romrom", L"rom") != nullptr); in TEST()
264 ASSERT_EQ(L'h', out[0]); in TEST()
283 ASSERT_EQ(L'h', out[0]); in TEST()
296 ASSERT_EQ(L'a', out[0]); in TEST()
383 ASSERT_EQ(L'A', out[0]); in test_mbsrtowcs()
390 wmemset(out, L'x', NUM_WCHARS(sizeof(out))); in test_mbsrtowcs()
392 ASSERT_EQ(L'e', out[0]); in test_mbsrtowcs()
393 ASSERT_EQ(L'f', out[1]); in test_mbsrtowcs()
394 ASSERT_EQ(L'\0', out[2]); in test_mbsrtowcs()
396 ASSERT_EQ(L'x', out[3]); in test_mbsrtowcs()
454 TestSingleWcsToInt(fn, L"123", 10, static_cast<T>(123), 3); in TestWcsToInt()
455 TestSingleWcsToInt(fn, L"123", 0, static_cast<T>(123), 3); in TestWcsToInt()
456 TestSingleWcsToInt(fn, L"123#", 10, static_cast<T>(123), 3); in TestWcsToInt()
457 TestSingleWcsToInt(fn, L"01000", 8, static_cast<T>(512), 5); in TestWcsToInt()
458 TestSingleWcsToInt(fn, L"01000", 0, static_cast<T>(512), 5); in TestWcsToInt()
459 TestSingleWcsToInt(fn, L" 123 45", 0, static_cast<T>(123), 6); in TestWcsToInt()
460 TestSingleWcsToInt(fn, L" -123", 0, static_cast<T>(-123), 6); in TestWcsToInt()
461 TestSingleWcsToInt(fn, L"0x10000", 0, static_cast<T>(65536), 7); in TestWcsToInt()
484 TestWcsToIntLimits(wcstol, L"-9223372036854775809", L"9223372036854775808"); in TEST()
486 TestWcsToIntLimits(wcstol, L"-2147483649", L"2147483648"); in TEST()
496 TestWcsToIntLimits(wcstoul, L"-1", L"18446744073709551616"); in TEST()
498 TestWcsToIntLimits(wcstoul, L"-1", L"4294967296"); in TEST()
507 TestWcsToIntLimits(wcstoll, L"-9223372036854775809", L"9223372036854775808"); in TEST()
515 TestWcsToIntLimits(wcstoull, L"-1", L"18446744073709551616"); in TEST()
523 TestWcsToIntLimits(wcstoimax, L"-9223372036854775809", in TEST()
524 L"9223372036854775808"); in TEST()
532 TestWcsToIntLimits(wcstoumax, L"-1", L"18446744073709551616"); in TEST()
547 ASSERT_EQ(L'h', dst[0]); in TEST()
548 ASSERT_EQ(L'e', dst[1]); 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()
583 EXPECT_EQ(24U, wcsftime(buf, sizeof(buf), L"%c", &t)); in TEST()
584 EXPECT_STREQ(L"Sun Mar 10 00:00:00 2100", buf); in TEST()
585 EXPECT_EQ(24U, wcsftime_l(buf, sizeof(buf), L"%c", &t, LC_GLOBAL_LOCALE)); in TEST()
586 EXPECT_STREQ(L"Sun Mar 10 00:00:00 2100", buf); in TEST()
590 const wchar_t const_wstr[] = L"This is a test of something or other....."; in TEST()
597 EXPECT_STREQ(L"This This is a test of something or other", wstr); in TEST()
601 const wchar_t src[] = L"Source string"; in TEST()
609 const wchar_t src[] = L"Source string"; in TEST()
617 const wchar_t src[] = L"Source string"; 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()
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()
639 const wchar_t src[] = L"Source string"; in TEST()
647 const wchar_t src[] = L"Source string"; 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()
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()
684 EXPECT_EQ(L'x', wc); in TEST()
688 EXPECT_EQ(L'¢', wc); in TEST()
692 EXPECT_EQ(L'€', wc); in TEST()
696 EXPECT_EQ(L'', wc); in TEST()
703 ASSERT_NE(EOF, fputws(L"hello, world!", fp)); in TEST()
706 ASSERT_STREQ(L"hello, world!", p); in TEST()
707 ASSERT_EQ(wcslen(L"hello, world!"), size); in TEST()
732 wcstol(L"123", nullptr, -1); in TEST()
735 wcstol(L"123", nullptr, 1); in TEST()
738 wcstol(L"123", nullptr, 37); in TEST()
744 wcstoll(L"123", nullptr, -1); in TEST()
747 wcstoll(L"123", nullptr, 1); in TEST()
750 wcstoll(L"123", nullptr, 37); in TEST()
756 wcstoul(L"123", nullptr, -1); in TEST()
759 wcstoul(L"123", nullptr, 1); in TEST()
762 wcstoul(L"123", nullptr, 37); in TEST()
768 wcstoull(L"123", nullptr, -1); in TEST()
771 wcstoull(L"123", nullptr, 1); in TEST()
774 wcstoull(L"123", nullptr, 37); in TEST()
780 wcstoll_l(L"123", nullptr, -1, LC_GLOBAL_LOCALE); in TEST()
783 wcstoll_l(L"123", nullptr, 1, LC_GLOBAL_LOCALE); in TEST()
786 wcstoll_l(L"123", nullptr, 37, LC_GLOBAL_LOCALE); in TEST()
792 wcstoull_l(L"123", nullptr, -1, LC_GLOBAL_LOCALE); in TEST()
795 wcstoull_l(L"123", nullptr, 1, LC_GLOBAL_LOCALE); in TEST()
798 wcstoull_l(L"123", nullptr, 37, LC_GLOBAL_LOCALE); in TEST()
804 ASSERT_EQ(&dst[4], wmempcpy(dst, L"hello", 4)); in TEST()
820 TestSingleWcsToFloat(fn, L"123", static_cast<T>(123.0L), 3); in TestWcsToFloat()
821 TestSingleWcsToFloat(fn, L"123#", static_cast<T>(123.0L), 3); in TestWcsToFloat()
822 TestSingleWcsToFloat(fn, L" 123 45", static_cast<T>(123.0L), 6); in TestWcsToFloat()
823 TestSingleWcsToFloat(fn, L"9.0", static_cast<T>(9.0L), 3); in TestWcsToFloat()
824 TestSingleWcsToFloat(fn, L"-9.0", static_cast<T>(-9.0L), 4); in TestWcsToFloat()
825 TestSingleWcsToFloat(fn, L" \t\v\f\r\n9.0", static_cast<T>(9.0L), 9); in TestWcsToFloat()
830 TestSingleWcsToFloat(fn, L"0.9e1", static_cast<T>(9.0L), 5); in TestWcsToFloatHexFloats()
831 TestSingleWcsToFloat(fn, L"0x1.2p3", static_cast<T>(9.0L), 7); in TestWcsToFloatHexFloats()
832 TestSingleWcsToFloat(fn, L"+1e+100", static_cast<T>(1e100L), 7); in TestWcsToFloatHexFloats()
833 TestSingleWcsToFloat(fn, L"0x10000.80", static_cast<T>(65536.50L), 10); in TestWcsToFloatHexFloats()
838 ASSERT_TRUE(isnan(fn(L"+nan", nullptr))); in TestWcsToFloatInfNan()
839 ASSERT_TRUE(isnan(fn(L"nan", nullptr))); in TestWcsToFloatInfNan()
840 ASSERT_TRUE(isnan(fn(L"-nan", nullptr))); in TestWcsToFloatInfNan()
842 ASSERT_TRUE(isnan(fn(L"+nan(0xff)", nullptr))); in TestWcsToFloatInfNan()
843 ASSERT_TRUE(isnan(fn(L"nan(0xff)", nullptr))); in TestWcsToFloatInfNan()
844 ASSERT_TRUE(isnan(fn(L"-nan(0xff)", nullptr))); in TestWcsToFloatInfNan()
847 ASSERT_TRUE(isnan(fn(L"+nanny", &p))); in TestWcsToFloatInfNan()
848 ASSERT_STREQ(L"ny", p); in TestWcsToFloatInfNan()
849 ASSERT_TRUE(isnan(fn(L"nanny", &p))); in TestWcsToFloatInfNan()
850 ASSERT_STREQ(L"ny", p); in TestWcsToFloatInfNan()
851 ASSERT_TRUE(isnan(fn(L"-nanny", &p))); in TestWcsToFloatInfNan()
852 ASSERT_STREQ(L"ny", p); in TestWcsToFloatInfNan()
854 ASSERT_EQ(0, fn(L"muppet", &p)); in TestWcsToFloatInfNan()
855 ASSERT_STREQ(L"muppet", p); in TestWcsToFloatInfNan()
856 ASSERT_EQ(0, fn(L" muppet", &p)); in TestWcsToFloatInfNan()
857 ASSERT_STREQ(L" muppet", p); in TestWcsToFloatInfNan()
859 ASSERT_EQ(std::numeric_limits<T>::infinity(), fn(L"+inf", nullptr)); in TestWcsToFloatInfNan()
860 ASSERT_EQ(std::numeric_limits<T>::infinity(), fn(L"inf", nullptr)); in TestWcsToFloatInfNan()
861 ASSERT_EQ(-std::numeric_limits<T>::infinity(), fn(L"-inf", nullptr)); in TestWcsToFloatInfNan()
863 ASSERT_EQ(std::numeric_limits<T>::infinity(), fn(L"+infinity", nullptr)); in TestWcsToFloatInfNan()
864 ASSERT_EQ(std::numeric_limits<T>::infinity(), fn(L"infinity", nullptr)); in TestWcsToFloatInfNan()
865 ASSERT_EQ(-std::numeric_limits<T>::infinity(), fn(L"-infinity", nullptr)); in TestWcsToFloatInfNan()
867 ASSERT_EQ(std::numeric_limits<T>::infinity(), fn(L"+infinitude", &p)); in TestWcsToFloatInfNan()
868 ASSERT_STREQ(L"initude", p); in TestWcsToFloatInfNan()
869 ASSERT_EQ(std::numeric_limits<T>::infinity(), fn(L"infinitude", &p)); in TestWcsToFloatInfNan()
870 ASSERT_STREQ(L"initude", p); in TestWcsToFloatInfNan()
871 ASSERT_EQ(-std::numeric_limits<T>::infinity(), fn(L"-infinitude", &p)); in TestWcsToFloatInfNan()
872 ASSERT_STREQ(L"initude", p); in TestWcsToFloatInfNan()
875 ASSERT_EQ(std::numeric_limits<T>::infinity(), fn(L"InFiNiTy", nullptr)); in TestWcsToFloatInfNan()
876 ASSERT_TRUE(isnan(fn(L"NaN", nullptr))); in TestWcsToFloatInfNan()
916 EXPECT_EQ(1.23, wcstod_l(L"1.23", nullptr, LC_GLOBAL_LOCALE)); in TEST()
920 EXPECT_EQ(1.23f, wcstof_l(L"1.23", nullptr, LC_GLOBAL_LOCALE)); in TEST()
924 EXPECT_EQ(123L, wcstol_l(L"123", nullptr, 10, LC_GLOBAL_LOCALE)); in TEST()
928 EXPECT_EQ(1.23L, wcstold_l(L"1.23", nullptr, LC_GLOBAL_LOCALE)); in TEST()
932 EXPECT_EQ(123LL, wcstoll_l(L"123", nullptr, 10, LC_GLOBAL_LOCALE)); in TEST()
936 EXPECT_EQ(123UL, wcstoul_l(L"123", nullptr, 10, LC_GLOBAL_LOCALE)); in TEST()
940 EXPECT_EQ(123ULL, wcstoul_l(L"123", nullptr, 10, LC_GLOBAL_LOCALE)); in TEST()
1034 EXPECT_EQ(2, wcwidth(L'ㅜ')); // Korean "crying" emoticon. in TEST()
1035 EXPECT_EQ(2, wcwidth(L'ㅋ')); // Korean "laughing" emoticon. in TEST()
1039 EXPECT_EQ(2, wcswidth(L"abc", 2)); in TEST()
1040 EXPECT_EQ(2, wcswidth(L"ab\t", 2)); in TEST()
1041 EXPECT_EQ(-1, wcswidth(L"a\tb", 2)); in TEST()
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()
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()
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()
1073 ASSERT_EQ(0, wcscasecmp(L"hello", L"HELLO")); in TEST()
1074 ASSERT_TRUE(wcscasecmp(L"hello1", L"HELLO2") < 0); in TEST()
1075 ASSERT_TRUE(wcscasecmp(L"hello2", L"HELLO1") > 0); in TEST()
1076 ASSERT_TRUE(wcscasecmp(L"hello", L"HELL") > 0); in TEST()
1077 ASSERT_TRUE(wcscasecmp(L"hell", L"HELLO") < 0); in TEST()
1081 ASSERT_EQ(0U, wcscspn(L"hello world", L"abcdefghijklmnopqrstuvwxyz")); in TEST()
1082 ASSERT_EQ(5U, wcscspn(L"hello world", L" ")); in TEST()
1083 ASSERT_EQ(11U, wcscspn(L"hello world", L"!")); in TEST()
1087 ASSERT_EQ(0U, wcsspn(L"hello world", L"!")); in TEST()
1088 ASSERT_EQ(5U, wcsspn(L"hello world", L"abcdefghijklmnopqrstuvwxyz")); in TEST()
1089 ASSERT_EQ(11U, wcsspn(L"hello world", L"abcdefghijklmnopqrstuvwxyz ")); in TEST()
1093 wchar_t* s = wcsdup(L"hello"); in TEST()
1094 ASSERT_STREQ(s, L"hello"); in TEST()
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()
1110 ASSERT_EQ(0, wcsncasecmp(L"foo", L"bar", 0)); in TEST()
1112 ASSERT_EQ(0, wcsncasecmp(L"hello1", L"HELLO2", 5)); in TEST()
1113 ASSERT_TRUE(wcsncasecmp(L"hello1", L"HELLO2", 6) < 0); in TEST()
1114 ASSERT_TRUE(wcsncasecmp(L"hello2", L"HELLO1", 6) > 0); in TEST()
1115 ASSERT_TRUE(wcsncasecmp(L"hello", L"HELL", 5) > 0); in TEST()
1116 ASSERT_TRUE(wcsncasecmp(L"hell", L"HELLO", 5) < 0); in TEST()
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()
1130 ASSERT_EQ(0, wcsncmp(L"foo", L"bar", 0)); in TEST()
1131 ASSERT_EQ(0, wcsncmp(L"aaaa", L"aaab", 3)); in TEST()
1132 ASSERT_TRUE(wcsncmp(L"aaaa", L"aaab", 4) < 0); in TEST()
1133 ASSERT_TRUE(wcsncmp(L"aaab", L"aaaa", 4) > 0); in TEST()
1137 ASSERT_EQ(2U, wcsnlen(L"hello", 2)); in TEST()
1138 ASSERT_EQ(5U, wcsnlen(L"hello", 5)); in TEST()
1139 ASSERT_EQ(5U, wcsnlen(L"hello", 666)); in TEST()
1143 const wchar_t* s = L"hello, world!"; in TEST()
1144 ASSERT_EQ(nullptr, wcspbrk(s, L"-")); in TEST()
1145 ASSERT_EQ(s, wcspbrk(s, L"abch")); in TEST()
1146 ASSERT_EQ(s + 2, wcspbrk(s, L"l")); in TEST()
1147 ASSERT_EQ(s + 5, wcspbrk(s, L",. !")); in TEST()
1151 wchar_t s[] = L"this is\ta\nstring"; in TEST()
1153 ASSERT_EQ(s, wcstok(s, L"\t\n ", &p)); in TEST()
1154 ASSERT_STREQ(s, L"this"); in TEST()
1155 ASSERT_STREQ(p, L"is\ta\nstring"); in TEST()
1156 ASSERT_EQ(s + 5, wcstok(nullptr, L"\t\n ", &p)); in TEST()
1157 ASSERT_STREQ(s + 5, L"is"); in TEST()
1158 ASSERT_STREQ(p, L"a\nstring"); in TEST()
1159 ASSERT_EQ(s + 8, wcstok(nullptr, L"\t\n ", &p)); in TEST()
1160 ASSERT_STREQ(s + 8, L"a"); in TEST()
1161 ASSERT_STREQ(p, L"string"); in TEST()
1162 ASSERT_EQ(s + 10, wcstok(nullptr, L"\t\n ", &p)); in TEST()
1163 ASSERT_STREQ(s + 10, L"string"); in TEST()
1168 const wchar_t* s = L"hello, world!"; in TEST()
1169 ASSERT_EQ(s, wmemchr(s, L'h', 13)); in TEST()
1170 ASSERT_EQ(s + 5, wmemchr(s, L',', 13)); in TEST()
1171 ASSERT_EQ(s + 12, wmemchr(s, L'!', 13)); in TEST()
1172 ASSERT_EQ(nullptr, wmemchr(s, L'a', 13)); in TEST()
1176 ASSERT_EQ(0, wmemcmp(L"aaaa", L"aaab", 3)); in TEST()
1177 ASSERT_TRUE(wmemcmp(L"aaaa", L"aaab", 4) < 0); in TEST()
1178 ASSERT_TRUE(wmemcmp(L"aaab", L"aaaa", 4) > 0); in TEST()
1183 ASSERT_EQ(dst, wmemcpy(dst, L"hello", 5)); in TEST()
1184 ASSERT_STREQ(dst, L"hello"); in TEST()
1189 ASSERT_EQ(dst, wmemmove(dst, L"hello", 5)); in TEST()
1190 ASSERT_STREQ(dst, L"hello"); in TEST()
1200 ASSERT_EQ(dst, wmemset(dst, L'y', 0)); in TEST()