diff options
Diffstat (limited to 'clang/unittests')
-rw-r--r-- | clang/unittests/Format/UsingDeclarationsSorterTest.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/unittests/Format/UsingDeclarationsSorterTest.cpp b/clang/unittests/Format/UsingDeclarationsSorterTest.cpp index e72076a8e31..37427a51f82 100644 --- a/clang/unittests/Format/UsingDeclarationsSorterTest.cpp +++ b/clang/unittests/Format/UsingDeclarationsSorterTest.cpp @@ -348,6 +348,13 @@ TEST_F(UsingDeclarationsSorterTest, SortsPartialRangeOfUsingDeclarations) { {tooling::Range(19, 1)})); } +TEST_F(UsingDeclarationsSorterTest, SortsUsingDeclarationsWithLeadingkComments) { + EXPECT_EQ("/* comment */ using a;\n" + "/* comment */ using b;", + sortUsingDeclarations("/* comment */ using b;\n" + "/* comment */ using a;")); +} + } // end namespace } // end namespace format } // end namespace clang |