summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTestSelective.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/unittests/Format/FormatTestSelective.cpp')
-rw-r--r--clang/unittests/Format/FormatTestSelective.cpp17
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) {
OpenPOWER on IntegriCloud