diff options
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r-- | unittests/Format/FormatTest.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp index d1af838a73..806a7eb9c0 100644 --- a/unittests/Format/FormatTest.cpp +++ b/unittests/Format/FormatTest.cpp @@ -1365,6 +1365,13 @@ TEST_F(FormatTest, UnderstandsUsesOfStarAndAmp) { verifyGoogleFormat("A = new SomeType* [Length]();"); } +TEST_F(FormatTest, FormatsBinaryOperatorsPrecedingEquals) { + verifyFormat("void f() {\n" + " x[aaaaaaaaa -\n" + " b] = 23;\n" + "}", getLLVMStyleWithColumns(15)); +} + TEST_F(FormatTest, FormatsCasts) { verifyFormat("Type *A = static_cast<Type *>(P);"); verifyFormat("Type *A = (Type *)P;"); |