summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTestJS.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/unittests/Format/FormatTestJS.cpp')
-rw-r--r--clang/unittests/Format/FormatTestJS.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestJS.cpp b/clang/unittests/Format/FormatTestJS.cpp
index 0c36dce93dd..43fc4b47284 100644
--- a/clang/unittests/Format/FormatTestJS.cpp
+++ b/clang/unittests/Format/FormatTestJS.cpp
@@ -709,6 +709,10 @@ TEST_F(FormatTestJS, OptionalTypes) {
" y?: z;\n"
" z?;\n"
"}");
+ verifyFormat("interface X {\n"
+ " y?(): z;\n"
+ "}");
+ verifyFormat("x ? 1 : 2;");
}
TEST_F(FormatTestJS, IndexSignature) {
OpenPOWER on IntegriCloud