summaryrefslogtreecommitdiff
path: root/unittests
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
commit904365edb126fca6434a14dc241686a8734b485c (patch)
tree36b079f9c22a50fba3cfd967b160ce128dcb2fef /unittests
parent33afa5e903341844612580861ec76cd4b7945f61 (diff)
downloadclang-904365edb126fca6434a14dc241686a8734b485c.tar.gz
clang-format: [JS] Properly reset parse state after parsing interface.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241446 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/Format/FormatTestJS.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/unittests/Format/FormatTestJS.cpp b/unittests/Format/FormatTestJS.cpp
index d8e17f9d8d..24891f54a6 100644
--- a/unittests/Format/FormatTestJS.cpp
+++ b/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) {