• Home
  • Raw
  • Download

Lines Matching refs:format

17 namespace format {  namespace
22 std::string format(llvm::StringRef Code, unsigned Offset, unsigned Length) { in format() function in clang::format::__anon0e4aef920111::FormatTestSelective
40 EXPECT_EQ("int a;\nint b;", format("int a; \nint b;", 0, 0)); in TEST_F()
41 EXPECT_EQ("int a;", format("int a; ", 0, 0)); in TEST_F()
42 EXPECT_EQ("int a;\n", format("int a; \n \n \n ", 0, 0)); in TEST_F()
43 EXPECT_EQ("int a;\nint b; ", format("int a; \nint b; ", 0, 0)); in TEST_F()
50 format("{int b;\n int a;}", 8, 0)); in TEST_F()
54 format("{int b;\n int a;}", 7, 0)); in TEST_F()
60 format("#define A \\\n" in TEST_F()
67 format("#define A \\\n" in TEST_F()
74 EXPECT_EQ("int b;\n\nint a;", format("int b;\n\nint a;", 8, 0)); in TEST_F()
75 EXPECT_EQ("int b;\n\nint a;", format("int b;\n\nint a;", 7, 0)); in TEST_F()
79 EXPECT_EQ("int b;\nint a;", format("int b;int a;", 7, 0)); in TEST_F()
83 EXPECT_EQ("int a;\n\n int b;", format("int a;\n \n\n int b;", 8, 0)); in TEST_F()
84 EXPECT_EQ("int a;\n\n int b;", format("int a;\n \n\n int b;", 9, 0)); in TEST_F()
93 format( in TEST_F()
102 EXPECT_EQ("if (a) return;", format("if(a)\nreturn;", 7, 1)); in TEST_F()
104 format("if(a)\nreturn; // comment", 20, 1)); in TEST_F()
110 format("int a; // comment\n" in TEST_F()
116 format("int a; // comment\n" in TEST_F()
123 format("int a; // comment\n" in TEST_F()
130 format("int aaaaaa; // comment\n" in TEST_F()
138 format("int a; // This\n" in TEST_F()
147 format("int a; // This\n" in TEST_F()
158 format("int a; // This\n" in TEST_F()
167 format("int a;\n" in TEST_F()
174 format("int x; // Format this line.\n" in TEST_F()
189 format("int i;\n" in TEST_F()
205 format("int i;\n" in TEST_F()
220 format("void f() {\n" in TEST_F()
236 format("int i = []() {\n" in TEST_F()
251 format("DEBUG( {\n" in TEST_F()
260 format("DEBUG( {\n" in TEST_F()
269 format("DEBUG( {\n" in TEST_F()
278 format("DEBUG( {\n" in TEST_F()
289 format("Debug({\n" in TEST_F()
301 format("DEBUG({\n" in TEST_F()
311 format("DEBUG({\n" in TEST_F()
321 format("someFunction(\n" in TEST_F()
334 format("int longlongname; // comment\n" in TEST_F()
346 format("int s = f({\n" in TEST_F()
361 format("SomeFunction(\n" in TEST_F()
377 format("namespace {\n" in TEST_F()
386 format("namespace {\n" in TEST_F()
400 format("int i;\n" in TEST_F()
411 format("int i;\n" in TEST_F()
426 format("{\n" in TEST_F()
441 format("{\n" in TEST_F()
456 format("{\n" in TEST_F()
471 format("{\n" in TEST_F()
483 format(" {\n" in TEST_F()
489 format("void f() {}\n" in TEST_F()
495 format("int a; // comment\n" in TEST_F()
503 format(" void f() {\n" in TEST_F()
514 format(" void f() {\n" in TEST_F()
528 format(" int a;\n" in TEST_F()
541 format("void f() {\n" in TEST_F()
550 format("void f() {\n" in TEST_F()
559 format("void f() {\n" in TEST_F()
576 format("void f() {\n" in TEST_F()
592 format("var x = \"a\";\n" in TEST_F()
603 EXPECT_EQ(Code, format(Code, 47, 1)); in TEST_F()