Lines Matching refs:ASCIIToUTF16
242 output = ASCIIToUTF16(" This is a test \r\n"); in TEST()
244 EXPECT_EQ(ASCIIToUTF16("This is a test"), output); in TEST()
247 output = ASCIIToUTF16(" \r\n"); in TEST()
480 string16 utf16 = ASCIIToUTF16(char_cases[i]); in TEST()
493 EXPECT_EQ(empty16, ASCIIToUTF16(empty)); in TEST()
499 string16 string16_with_nul = ASCIIToUTF16(string_with_nul); in TEST()
518 EXPECT_EQ(ASCIIToUTF16("cc2"), ToLowerASCII(ASCIIToUTF16("Cc2"))); in TEST()
531 EXPECT_EQ(ASCIIToUTF16("CC2"), ToUpperASCII(ASCIIToUTF16("Cc2"))); in TEST()
545 EXPECT_TRUE(LowerCaseEqualsASCII(ASCIIToUTF16(lowercase_cases[i].src_a), in TEST()
582 EXPECT_EQ(ASCIIToUTF16(cases[i].expected), in TEST()
627 string16 str = ASCIIToUTF16(scenario.str); in TEST()
629 ASCIIToUTF16(scenario.find_this), in TEST()
630 ASCIIToUTF16(scenario.replace_with)); in TEST()
631 EXPECT_EQ(ASCIIToUTF16(scenario.expected), str); in TEST()
677 string16 str = ASCIIToUTF16(cases[i].str); in TEST()
679 ASCIIToUTF16(cases[i].find_this), in TEST()
680 ASCIIToUTF16(cases[i].replace_with)); in TEST()
681 EXPECT_EQ(ASCIIToUTF16(cases[i].expected), str); in TEST()
735 string16 separator = ASCIIToUTF16(", "); in TEST()
743 parts.push_back(ASCIIToUTF16("a")); in TEST()
744 EXPECT_EQ(ASCIIToUTF16("a"), JoinString(parts, separator)); in TEST()
746 parts.push_back(ASCIIToUTF16("b")); in TEST()
747 parts.push_back(ASCIIToUTF16("c")); in TEST()
748 EXPECT_EQ(ASCIIToUTF16("a, b, c"), JoinString(parts, separator)); in TEST()
750 parts.push_back(ASCIIToUTF16("")); in TEST()
751 EXPECT_EQ(ASCIIToUTF16("a, b, c, "), JoinString(parts, separator)); in TEST()
752 parts.push_back(ASCIIToUTF16(" ")); in TEST()
753 EXPECT_EQ(ASCIIToUTF16("a|b|c|| "), JoinString(parts, ASCIIToUTF16("|"))); in TEST()
780 string16 separator = ASCIIToUTF16(", "); in TEST()
789 const string16 kA = ASCIIToUTF16("a"); in TEST()
791 EXPECT_EQ(ASCIIToUTF16("a"), JoinString(parts, separator)); in TEST()
793 const string16 kB = ASCIIToUTF16("b"); in TEST()
795 const string16 kC = ASCIIToUTF16("c"); in TEST()
797 EXPECT_EQ(ASCIIToUTF16("a, b, c"), JoinString(parts, separator)); in TEST()
800 EXPECT_EQ(ASCIIToUTF16("a, b, c, "), JoinString(parts, separator)); in TEST()
801 const string16 kSpace = ASCIIToUTF16(" "); in TEST()
803 EXPECT_EQ(ASCIIToUTF16("a|b|c|| "), JoinString(parts, ASCIIToUTF16("|"))); in TEST()
831 string16 separator = ASCIIToUTF16(", "); in TEST()
838 const string16 kA = ASCIIToUTF16("a"); in TEST()
839 EXPECT_EQ(ASCIIToUTF16("a"), JoinString({kA}, separator)); in TEST()
841 const string16 kB = ASCIIToUTF16("b"); in TEST()
842 const string16 kC = ASCIIToUTF16("c"); in TEST()
843 EXPECT_EQ(ASCIIToUTF16("a, b, c"), JoinString({kA, kB, kC}, separator)); in TEST()
845 EXPECT_EQ(ASCIIToUTF16("a, b, c, "), in TEST()
847 const string16 kSpace = ASCIIToUTF16(" "); in TEST()
849 ASCIIToUTF16("a|b|c|| "), in TEST()
850 JoinString({kA, kB, kC, StringPiece16(), kSpace}, ASCIIToUTF16("|"))); in TEST()
855 EXPECT_EQ(ASCIIToUTF16("a, b"), JoinString({kPieceA, kPieceB}, separator)); in TEST()
878 EXPECT_TRUE(StartsWith(ASCIIToUTF16("javascript:url"), in TEST()
879 ASCIIToUTF16("javascript"), in TEST()
881 EXPECT_FALSE(StartsWith(ASCIIToUTF16("JavaScript:url"), in TEST()
882 ASCIIToUTF16("javascript"), in TEST()
884 EXPECT_TRUE(StartsWith(ASCIIToUTF16("javascript:url"), in TEST()
885 ASCIIToUTF16("javascript"), in TEST()
887 EXPECT_TRUE(StartsWith(ASCIIToUTF16("JavaScript:url"), in TEST()
888 ASCIIToUTF16("javascript"), in TEST()
890 EXPECT_FALSE(StartsWith(ASCIIToUTF16("java"), ASCIIToUTF16("javascript"), in TEST()
892 EXPECT_FALSE(StartsWith(ASCIIToUTF16("java"), ASCIIToUTF16("javascript"), in TEST()
894 EXPECT_FALSE(StartsWith(string16(), ASCIIToUTF16("javascript"), in TEST()
896 EXPECT_FALSE(StartsWith(string16(), ASCIIToUTF16("javascript"), in TEST()
898 EXPECT_TRUE(StartsWith(ASCIIToUTF16("java"), string16(), in TEST()
900 EXPECT_TRUE(StartsWith(ASCIIToUTF16("java"), string16(), in TEST()
905 EXPECT_TRUE(EndsWith(ASCIIToUTF16("Foo.plugin"), ASCIIToUTF16(".plugin"), in TEST()
907 EXPECT_FALSE(EndsWith(ASCIIToUTF16("Foo.Plugin"), ASCIIToUTF16(".plugin"), in TEST()
909 EXPECT_TRUE(EndsWith(ASCIIToUTF16("Foo.plugin"), ASCIIToUTF16(".plugin"), in TEST()
911 EXPECT_TRUE(EndsWith(ASCIIToUTF16("Foo.Plugin"), ASCIIToUTF16(".plugin"), in TEST()
913 EXPECT_FALSE(EndsWith(ASCIIToUTF16(".plug"), ASCIIToUTF16(".plugin"), in TEST()
915 EXPECT_FALSE(EndsWith(ASCIIToUTF16(".plug"), ASCIIToUTF16(".plugin"), in TEST()
917 EXPECT_FALSE(EndsWith(ASCIIToUTF16("Foo.plugin Bar"), ASCIIToUTF16(".plugin"), in TEST()
919 EXPECT_FALSE(EndsWith(ASCIIToUTF16("Foo.plugin Bar"), ASCIIToUTF16(".plugin"), in TEST()
921 EXPECT_FALSE(EndsWith(string16(), ASCIIToUTF16(".plugin"), in TEST()
923 EXPECT_FALSE(EndsWith(string16(), ASCIIToUTF16(".plugin"), in TEST()
925 EXPECT_TRUE(EndsWith(ASCIIToUTF16("Foo.plugin"), string16(), in TEST()
927 EXPECT_TRUE(EndsWith(ASCIIToUTF16("Foo.plugin"), string16(), in TEST()
929 EXPECT_TRUE(EndsWith(ASCIIToUTF16(".plugin"), ASCIIToUTF16(".plugin"), in TEST()
931 EXPECT_TRUE(EndsWith(ASCIIToUTF16(".plugin"), ASCIIToUTF16(".plugin"), in TEST()
940 subst.push_back(ASCIIToUTF16("1")); in TEST()
941 subst.push_back(ASCIIToUTF16("2")); in TEST()
944 ReplaceStringPlaceholders(ASCIIToUTF16("Hello, $1. Your number is $2."), in TEST()
952 ReplaceStringPlaceholders(ASCIIToUTF16("Hello, $2. Your number is $1."), in TEST()
965 subst.push_back(ASCIIToUTF16("9a")); in TEST()
966 subst.push_back(ASCIIToUTF16("8b")); in TEST()
967 subst.push_back(ASCIIToUTF16("7c")); in TEST()
971 ASCIIToUTF16("$1a,$2b,$3c,$4d,$5e,$6f,$1g,$2h,$3i"), subst, nullptr); in TEST()
973 EXPECT_EQ(ASCIIToUTF16("9aa,8bb,7cc,d,e,f,9ag,8bh,7ci"), formatted); in TEST()
978 subst.push_back(ASCIIToUTF16("9a")); in TEST()
979 subst.push_back(ASCIIToUTF16("8b")); in TEST()
980 subst.push_back(ASCIIToUTF16("7c")); in TEST()
981 subst.push_back(ASCIIToUTF16("6d")); in TEST()
982 subst.push_back(ASCIIToUTF16("5e")); in TEST()
983 subst.push_back(ASCIIToUTF16("4f")); in TEST()
984 subst.push_back(ASCIIToUTF16("3g")); in TEST()
985 subst.push_back(ASCIIToUTF16("2h")); in TEST()
986 subst.push_back(ASCIIToUTF16("1i")); in TEST()
990 ASCIIToUTF16("$1a,$2b,$3c,$4d,$5e,$6f,$7g,$8h,$9i"), subst, nullptr); in TEST()
992 EXPECT_EQ(ASCIIToUTF16("9aa,8bb,7cc,6dd,5ee,4ff,3gg,2hh,1ii"), formatted); in TEST()
999 subst.push_back(ASCIIToUTF16("9a____")); in TEST()
1000 subst.push_back(ASCIIToUTF16("B")); in TEST()
1001 subst.push_back(ASCIIToUTF16("7c___")); in TEST()
1002 subst.push_back(ASCIIToUTF16("d")); in TEST()
1003 subst.push_back(ASCIIToUTF16("5e____")); in TEST()
1004 subst.push_back(ASCIIToUTF16("F")); in TEST()
1005 subst.push_back(ASCIIToUTF16("3g___")); in TEST()
1006 subst.push_back(ASCIIToUTF16("h")); in TEST()
1007 subst.push_back(ASCIIToUTF16("1i_____")); in TEST()
1009 string16 original = ASCIIToUTF16("$1a,$2b,$3c,$4d,$5e,$6f,$7g,$8h,$9i"); in TEST()
1011 ASCIIToUTF16("9a____a,Bb,7c___c,dd,5e____e,Ff,3g___g,hh,1i_____i"); in TEST()
1031 subst.push_back(ASCIIToUTF16("z")); in TEST()
1032 subst.push_back(ASCIIToUTF16("y")); in TEST()
1033 subst.push_back(ASCIIToUTF16("XYZW")); in TEST()
1034 subst.push_back(ASCIIToUTF16("x")); in TEST()
1035 subst.push_back(ASCIIToUTF16("w")); in TEST()
1038 ReplaceStringPlaceholders(ASCIIToUTF16("$3_$4$2$1$5"), subst, nullptr); in TEST()
1040 EXPECT_EQ(ASCIIToUTF16("XYZW_xyzw"), formatted); in TEST()
1045 subst.push_back(ASCIIToUTF16("1a")); in TEST()
1047 ReplaceStringPlaceholders(ASCIIToUTF16(" $16 "), subst, nullptr); in TEST()
1048 EXPECT_EQ(ASCIIToUTF16(" 1a6 "), formatted); in TEST()
1053 subst.push_back(ASCIIToUTF16("1a")); in TEST()
1055 ReplaceStringPlaceholders(ASCIIToUTF16("+$-+$A+$1+"), subst, nullptr); in TEST()
1056 EXPECT_EQ(ASCIIToUTF16("+++1a+"), formatted); in TEST()
1296 EXPECT_TRUE(ContainsOnlyChars(ASCIIToUTF16(" "), kWhitespaceUTF16)); in TEST()
1297 EXPECT_TRUE(ContainsOnlyChars(ASCIIToUTF16("\t"), kWhitespaceUTF16)); in TEST()
1298 EXPECT_TRUE(ContainsOnlyChars(ASCIIToUTF16("\t \r \n "), kWhitespaceUTF16)); in TEST()
1299 EXPECT_FALSE(ContainsOnlyChars(ASCIIToUTF16("a"), kWhitespaceUTF16)); in TEST()
1300 EXPECT_FALSE(ContainsOnlyChars(ASCIIToUTF16("\thello\r \n "), in TEST()