aboutsummaryrefslogtreecommitdiff
path: root/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2012-12-21 09:41:31 +0000
committerDaniel Jasper <djasper@google.com>2012-12-21 09:41:31 +0000
commit98e6b4a65fcc81b1be11f09837e0fc8fac85897b (patch)
tree0bceac0b1646aef92a128f1e6b844932996c2682 /unittests/Format/FormatTest.cpp
parent7f5e76b783159694b27cb9933afba387a63cbd41 (diff)
Formatting fixes for PR14680
Also, some (automated) formatting fixes and slight cleanups. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170873 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r--unittests/Format/FormatTest.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index 53253f0c79..1e92848b8e 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -545,7 +545,7 @@ TEST_F(FormatTest, UnderstandsTemplateParameters) {
verifyFormat("template <typename T> void f() {\n}");
}
-TEST_F(FormatTest, UndestandsUnaryOperators) {
+TEST_F(FormatTest, UnderstandsUnaryOperators) {
verifyFormat("int a = -2;");
verifyFormat("f(-1, -2, -3);");
verifyFormat("a[-1] = 5;");
@@ -557,6 +557,11 @@ TEST_F(FormatTest, UndestandsUnaryOperators) {
verifyFormat("++(a->f());");
verifyFormat("--(a->f());");
verifyFormat("if (!(a->f())) {\n}");
+
+ verifyFormat("a-- > b;");
+ verifyFormat("b ? -a : c;");
+ verifyFormat("n * sizeof char16;");
+ verifyFormat("sizeof(char);");
}
TEST_F(FormatTest, UndestandsOverloadedOperators) {