summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTestJS.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2015-05-05 08:12:50 +0000
committerDaniel Jasper <djasper@google.com>2015-05-05 08:12:50 +0000
commit2964749cfad609d4e191af77162db79d8e02fcf6 (patch)
tree6fb328e097344f9ccff59b1a11ff8c55d910f28c /clang/unittests/Format/FormatTestJS.cpp
parentda6d5b919d0cce5561f4800a1540cac6938d78b9 (diff)
downloadbcm5719-llvm-2964749cfad609d4e191af77162db79d8e02fcf6.tar.gz
bcm5719-llvm-2964749cfad609d4e191af77162db79d8e02fcf6.zip
clang-format: [JS] Do not collapse short interfaces.
Patch by Martin Probst. llvm-svn: 236485
Diffstat (limited to 'clang/unittests/Format/FormatTestJS.cpp')
-rw-r--r--clang/unittests/Format/FormatTestJS.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestJS.cpp b/clang/unittests/Format/FormatTestJS.cpp
index a7d8dd3effa..0c36dce93dd 100644
--- a/clang/unittests/Format/FormatTestJS.cpp
+++ b/clang/unittests/Format/FormatTestJS.cpp
@@ -547,6 +547,12 @@ TEST_F(FormatTestJS, ClassDeclarations) {
verifyFormat("class C extends p.P implements i.I {}");
}
+TEST_F(FormatTestJS, InterfaceDeclarations) {
+ verifyFormat("interface I {\n"
+ " x: string;\n"
+ "}");
+}
+
TEST_F(FormatTestJS, MetadataAnnotations) {
verifyFormat("@A\nclass C {\n}");
verifyFormat("@A({arg: 'value'})\nclass C {\n}");
OpenPOWER on IntegriCloud