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.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) {