Lines Matching refs:highlightC
117 highlightC(llvm::StringRef code, HighlightStyle style, in highlightC() function
126 EXPECT_EQ("", highlightC("", s)); in TEST_F()
133 EXPECT_EQ(" int i = <scalar>22</scalar>;", highlightC(" int i = 22;", s)); in TEST_F()
141 highlightC("const char *f = 22 + \"foo\";", s)); in TEST_F()
148 EXPECT_EQ(" f = \"", highlightC(" f = \"", s)); in TEST_F()
155 EXPECT_EQ(" <k>return</k> 1; ", highlightC(" return 1; ", s)); in TEST_F()
162 EXPECT_EQ("foo<c>:</c><c>:</c>bar<c>:</c>", highlightC("foo::bar:", s)); in TEST_F()
169 EXPECT_EQ("a<b>{</b><b>}</b>", highlightC("a{}", s)); in TEST_F()
176 EXPECT_EQ("a<sb>[</sb><sb>]</sb>", highlightC("a[]", s)); in TEST_F()
184 highlightC(" bool f = foo(), 1;", s)); in TEST_F()
192 highlightC("#include \"foo\" //c", s)); in TEST_F()
199 EXPECT_EQ("<cc>//</cc>\n", highlightC("//\n", s)); in TEST_F()
205 EXPECT_EQ("\\\n", highlightC("\\\n", s)); in TEST_F()
206 EXPECT_EQ("\\\r\n", highlightC("\\\r\n", s)); in TEST_F()
208 EXPECT_EQ("#define a \\\n", highlightC("#define a \\\n", s)); in TEST_F()
209 EXPECT_EQ("#define a \\\r\n", highlightC("#define a \\\r\n", s)); in TEST_F()
210 EXPECT_EQ("#define a \\\r", highlightC("#define a \\\r", s)); in TEST_F()
216 EXPECT_EQ("\\ \n", highlightC("\\ \n", s)); in TEST_F()
217 EXPECT_EQ("\\ \t\n", highlightC("\\ \t\n", s)); in TEST_F()
218 EXPECT_EQ("\\ \n", highlightC("\\ \n", s)); in TEST_F()
219 EXPECT_EQ("\\\t\n", highlightC("\\\t\n", s)); in TEST_F()
221 EXPECT_EQ("#define a \\ \n", highlightC("#define a \\ \n", s)); in TEST_F()
222 EXPECT_EQ("#define a \\ \t\n", highlightC("#define a \\ \t\n", s)); in TEST_F()
223 EXPECT_EQ("#define a \\ \n", highlightC("#define a \\ \n", s)); in TEST_F()
224 EXPECT_EQ("#define a \\\t\n", highlightC("#define a \\\t\n", s)); in TEST_F()
229 EXPECT_EQ("\\", highlightC("\\", s)); in TEST_F()
230 EXPECT_EQ("#define a\\", highlightC("#define a\\", s)); in TEST_F()
238 highlightC(" /*com */ // com /*n*/", s)); in TEST_F()
245 EXPECT_EQ(" 1[+]2[/]a[*]f[&]x[|][~]l", highlightC(" 1+2/a*f&x|~l", s)); in TEST_F()
253 highlightC(" foo c = bar(); return 1;", s)); in TEST_F()
261 highlightC(" foo c = bar(); return 1;", s, 0)); in TEST_F()
263 highlightC(" foo c = bar(); return 1;", s, 1)); in TEST_F()
265 highlightC(" foo c = bar(); return 1;", s, 2)); in TEST_F()
267 highlightC(" foo c = bar(); return 1;", s, 3)); in TEST_F()
269 highlightC(" foo c = bar(); return 1;", s, 4)); in TEST_F()
271 highlightC(" foo c = bar(); return 1;", s, 5)); in TEST_F()
278 EXPECT_EQ("f", highlightC("f", s, 1)); in TEST_F()
284 EXPECT_EQ("f", highlightC("f", s, 2)); in TEST_F()
285 EXPECT_EQ("f", highlightC("f", s, 3)); in TEST_F()
286 EXPECT_EQ("f", highlightC("f", s, 4)); in TEST_F()
295 highlightC(" foo c = bar(); return 1;", s, 0)); in TEST_F()
304 highlightC(" foo c = bar(); return 1;", s, 4)); in TEST_F()
313 highlightC(" foo c = bar(); return 1;", s, 1)); in TEST_F()
315 highlightC(" foo c = bar(); return 1;", s, 2)); in TEST_F()
317 highlightC(" foo c = bar(); return 1;", s, 3)); in TEST_F()