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.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index 58712ef38f..22da93ebe3 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -646,6 +646,12 @@ TEST_F(FormatTest, UnderstandsUnaryOperators) {
verifyFormat("b ? -a : c;");
verifyFormat("n * sizeof char16;");
verifyFormat("sizeof(char);");
+
+ verifyFormat("return -1;");
+ verifyFormat("switch (a) {\n"
+ "case -1:\n"
+ " break;\n"
+ "}");
}
TEST_F(FormatTest, UndestandsOverloadedOperators) {