29 TEST(ValidateIndicTest, AddsJoinerToTerminalVirama) {
39 TEST(ValidateIndicTest, OnlyOneDependentVowel) {
56 TEST(ValidateIndicTest, OnlyOneVowelModifier) {
63 EXPECT_EQ(
std::string(
"\u0c26\u0c4d\u200c\u0c01"), result);
65 str =
"\u0995\u0983\u0981";
71 str =
"\u0d15\u0d02\u0d02";
75 EXPECT_EQ(str, result);
86 TEST(ValidateIndicTest, VowelModifierMustBeLast) {
94 str =
"\u0c28\u0c3f\u0c02";
109 TEST(ValidateIndicTest, MatrasFollowConsonantsNotVowels) {
116 str =
"\u0c1e\u0c3e";
120 EXPECT_EQ(
dest, str);
124 TEST(ValidateIndicTest, SubGraphemes) {
134 EXPECT_EQ(
dest, str);
137 TEST(ValidateIndicTest, Nukta) {
139 std::vector<std::string> glyphs;
142 true, str.c_str(), &glyphs));
143 EXPECT_EQ(glyphs.size(), 3);
151 TEST(ValidateIndicTest, SinhalaRakaransaya) {
157 EXPECT_EQ(
dest, str);
158 std::vector<std::string> glyphs;
161 true, str.c_str(), &glyphs));
162 EXPECT_EQ(glyphs.size(), 2);
163 EXPECT_EQ(glyphs[1],
std::string(
"\u0dca\u200d\u0dbb"));
169 EXPECT_EQ(
dest, str);
172 TEST(ValidateIndicTest, SinhalaYansaya) {
178 EXPECT_EQ(
dest, str);
184 EXPECT_EQ(
dest, str);
185 std::vector<std::string> glyphs;
188 true, str.c_str(), &glyphs));
189 EXPECT_EQ(glyphs.size(), 3);
190 EXPECT_EQ(glyphs[1],
std::string(
"\u0dca\u200d\u0dba"));
193 TEST(ValidateIndicTest, SinhalaRepaya) {
194 std::string str =
"\u0d9a\u0dbb\u0dca\u200d\u0db8";
195 std::vector<std::string> glyphs;
198 str.c_str(), &glyphs));
199 EXPECT_EQ(glyphs.size(), 2);
200 EXPECT_EQ(glyphs[1],
std::string(
"\u0dbb\u0dca\u200d\u0db8"));
203 true, str.c_str(), &glyphs));
204 EXPECT_EQ(glyphs.size(), 3);
205 EXPECT_EQ(glyphs[1],
std::string(
"\u0dbb\u0dca\u200d"));
208 TEST(ValidateIndicTest, SinhalaSpecials) {
210 std::string str =
"\u0dc0\u0d9c\u0dca\u200d\u0dbb\u0dca\u200d\u0dbb\u0dca\u200d";
211 std::vector<std::string> glyphs;
214 true, str.c_str(), &glyphs));
218 EXPECT_EQ(glyphs[2],
std::string(
"\u0dca\u200d\u0dbb"));
220 EXPECT_EQ(glyphs[4],
std::string(
"\u0dbb\u0dca\u200d"));
221 str =
"\u0dc3\u0dbb\u0dca\u200d\u0dbb\u0dca\u200d\u0dcf";
224 true, str.c_str(), &glyphs));
227 EXPECT_EQ(glyphs[1],
std::string(
"\u0dbb\u0dca\u200d"));
228 EXPECT_EQ(glyphs[2],
std::string(
"\u0dbb\u0dca\u200d"));