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.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestSelective.cpp b/clang/unittests/Format/FormatTestSelective.cpp
index d53d1c04292..699600c42d9 100644
--- a/clang/unittests/Format/FormatTestSelective.cpp
+++ b/clang/unittests/Format/FormatTestSelective.cpp
@@ -162,6 +162,13 @@ TEST_F(FormatTestSelective, FormatsCommentsLocally) {
"// This is\n"
"// not formatted. ",
0, 0));
+ EXPECT_EQ("int x; // Format this line.\n"
+ "int xx; //\n"
+ "int xxxxx; //",
+ format("int x; // Format this line.\n"
+ "int xx; //\n"
+ "int xxxxx; //",
+ 0, 0));
}
TEST_F(FormatTestSelective, IndividualStatementsOfNestedBlocks) {
OpenPOWER on IntegriCloud