aboutsummaryrefslogtreecommitdiff
path: root/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r--unittests/Format/FormatTest.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index b719acfabc..99204f56f5 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -682,6 +682,16 @@ TEST_F(FormatTest, UnderstandsUsesOfStar) {
verifyGoogleFormat("A<int**, int**> a;");
}
+TEST_F(FormatTest, DoesNotBreakBeforePointerOrReference) {
+ verifyFormat(
+ "int *someFunction(int LoooooooooooooooongParam1,\n"
+ " int LoooooooooooooooongParam2) {\n}");
+ verifyFormat(
+ "TypeSpecDecl *TypeSpecDecl::Create(ASTContext &C, DeclContext *DC,\n"
+ " SourceLocation L, IdentifierIn *II,\n"
+ " Type *T) {\n}");
+}
+
TEST_F(FormatTest, LineStartsWithSpecialCharacter) {
verifyFormat("(a)->b();");
verifyFormat("--a;");