More lambda formatting tests; update test comments.

llvm-svn: 189928
This commit is contained in:
Manuel Klimek 2013-09-04 10:06:46 +00:00
parent ee9fba2042
commit a1a43abe38
1 changed files with 16 additions and 2 deletions

View File

@ -6258,8 +6258,6 @@ TEST_F(FormatTest, FormatsProtocolBufferDefinitions) {
}
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 @@ TEST_F(FormatTest, FormatsLambdas) {
" [=, 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