More lambda formatting tests; update test comments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189928 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index 3d2cf13..d2b2dfd 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -6258,8 +6258,6 @@
}
TEST_F(FormatTest, FormatsLambdas) {
- // FIXME: The formatting is incorrect; this test currently checks that
- // parsing of the unwrapped lines doesn't regress.
verifyFormat(
"int c = [b]() mutable {\n"
" return [&b] {\n"
@@ -6295,6 +6293,22 @@
" [=, a, b, &c] {\n"
" }();\n"
"} }\n");
+ verifyFormat(
+ "void f() {\n"
+ " other(x.begin(), x.end(), [&](int, int) {\n"
+ " return 1;\n"
+ " });\n"
+ "}\n");
+ // FIXME: The formatting is incorrect; this test currently checks that
+ // parsing of the unwrapped lines doesn't regress.
+ verifyFormat(
+ "void f() {\n"
+ " other(x.begin(), //\n"
+ " x.end(), //\n"
+ " [&](int, int) {\n"
+ " return 1;\n"
+ " });\n"
+ "}\n");
}
} // end namespace tooling