| 58 | } |
| 59 | |
| 60 | QString formattingObjCSample() |
| 61 | { |
| 62 | return QStringLiteral( |
| 63 | "void func(){\n" |
| 64 | "\tif(isFoo(a,b))\n" |
| 65 | "\tbar(a,b);\n" |
| 66 | "if(isFoo)\n" |
| 67 | "\ta=bar((b-c)*a,*d--);\n" |
| 68 | "if( isFoo( a,b ) )\n" |
| 69 | "\tbar(a, b);\n" |
| 70 | "if (isFoo) {isFoo=false;cat << isFoo <<endl;}\n" |
| 71 | "if(isFoo)DoBar();if (isFoo){\n" |
| 72 | "\tbar();\n" |
| 73 | "}\n" |
| 74 | "\telse if(isBar()){\n" |
| 75 | "\tannotherBar();\n" |
| 76 | "}\n" |
| 77 | "int var = 1;\n" |
| 78 | "int *ptr = &var;\n" |
| 79 | "\n" |
| 80 | "}\n" |
| 81 | "@implementation someClass \n" |
| 82 | "+ (someClass*) someClassWithFoo:(int)foo\n" |
| 83 | "{\n" |
| 84 | " someClass *this;\n" |
| 85 | " if (foo) {\n" |
| 86 | " this = [[someClass alloc] initWith:foo];\n" |
| 87 | " } else {\n" |
| 88 | " // bla\n" |
| 89 | " }\n" |
| 90 | " return self;\n" |
| 91 | "}\n" |
| 92 | "@end\n"); |
| 93 | } |
| 94 | |
| 95 | QString indentingCppSample() |
| 96 | { |
no outgoing calls
no test coverage detected