diff options
Diffstat (limited to 'clang/unittests/Format/FormatTestSelective.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTestSelective.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestSelective.cpp b/clang/unittests/Format/FormatTestSelective.cpp index 699600c42d9..5885cadee62 100644 --- a/clang/unittests/Format/FormatTestSelective.cpp +++ b/clang/unittests/Format/FormatTestSelective.cpp @@ -278,6 +278,23 @@ TEST_F(FormatTestSelective, IndividualStatementsOfNestedBlocks) { " };\n" "});", 0, 0)); + EXPECT_EQ("SomeFunction(\n" + " [] {\n" + " int i;\n" + " return i;\n" // Format this line. + " },\n" + " [] {\n" + " return 2;\n" // Don't fix this. + " });", + format("SomeFunction(\n" + " [] {\n" + " int i;\n" + " return i;\n" // Format this line. + " },\n" + " [] {\n" + " return 2;\n" // Don't fix this. + " });", + 40, 0)); } TEST_F(FormatTestSelective, WrongIndent) { |