| 307 | } |
| 308 | |
| 309 | void TestAstyle::testForeach() |
| 310 | { |
| 311 | AStyleFormatter formatter; |
| 312 | QVERIFY(formatter.predefinedStyle("KDELibs")); |
| 313 | |
| 314 | const QString initial(QStringLiteral("int a(){QList<int> v;\n foreach(int i,v){\nreturn i;}}\n")); |
| 315 | const QString expected(QStringLiteral("int a()\n{\n QList<int> v;\n foreach (int i, v) {\n return i;\n }\n}\n")); |
| 316 | const QString formatted = formatter.formatSource(initial); |
| 317 | QCOMPARE(formatted, expected); |
| 318 | } |
| 319 | |
| 320 | void TestAstyle::testPointerAlignment() |
| 321 | { |
nothing calls this directly
no test coverage detected