summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTestJS.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2015-07-06 14:26:04 +0000
committerDaniel Jasper <djasper@google.com>2015-07-06 14:26:04 +0000
commit5c235c09665d7b30529a8e88f66b353026cbf8ff (patch)
tree7ffb367ee7dce27937dffa4c0f1677db99513f4a /clang/unittests/Format/FormatTestJS.cpp
parenta092fd8fc44feb7fc83a184d9dd283294edff71c (diff)
downloadbcm5719-llvm-5c235c09665d7b30529a8e88f66b353026cbf8ff.tar.gz
bcm5719-llvm-5c235c09665d7b30529a8e88f66b353026cbf8ff.zip
clang-format: [JS] Properly reset parse state after parsing interface.
llvm-svn: 241446
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 d8e17f9d8d6..24891f54a6e 100644
--- a/clang/unittests/Format/FormatTestJS.cpp
+++ b/clang/unittests/Format/FormatTestJS.cpp
@@ -703,6 +703,10 @@ TEST_F(FormatTestJS, InterfaceDeclarations) {
" x: string;\n"
"}\n"
"var y;");
+ // Ensure that state is reset after parsing the interface.
+ verifyFormat("interface a {}\n"
+ "export function b() {}\n"
+ "var x;");
}
TEST_F(FormatTestJS, EnumDeclarations) {
OpenPOWER on IntegriCloud