diff options
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r-- | unittests/Format/FormatTest.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp index 745ecec730..be4363353e 100644 --- a/unittests/Format/FormatTest.cpp +++ b/unittests/Format/FormatTest.cpp @@ -333,6 +333,10 @@ TEST_F(FormatTest, UndestandsUnaryOperators) { verifyFormat("f(-1, -2, -3);"); verifyFormat("a[-1] = 5;"); verifyFormat("int a = 5 + -2;"); + verifyFormat("if (i == -1) {\n}"); + verifyFormat("if (i != -1) {\n}"); + verifyFormat("if (i > -1) {\n}"); + verifyFormat("if (i < -1) {\n}"); } TEST_F(FormatTest, UndestandsOverloadedOperators) { @@ -345,10 +349,10 @@ TEST_F(FormatTest, UnderstandsUsesOfStar) { verifyFormat("f(*a);"); verifyFormat("int a = b * 10;"); verifyFormat("int a = 10 * b;"); - // verifyFormat("int a = b * c;"); + verifyFormat("int a = b * c;"); verifyFormat("int a = *b;"); - // verifyFormat("int a = *b * c;"); - // verifyFormat("int a = b * *c;"); + verifyFormat("int a = *b * c;"); + verifyFormat("int a = b * *c;"); } TEST_F(FormatTest, HandlesIncludeDirectives) { |