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.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestJS.cpp b/clang/unittests/Format/FormatTestJS.cpp
index 2dfd10faf1b..73e050d6f4f 100644
--- a/clang/unittests/Format/FormatTestJS.cpp
+++ b/clang/unittests/Format/FormatTestJS.cpp
@@ -118,6 +118,16 @@ TEST_F(FormatTestJS, ClosureStyleComments) {
verifyFormat("var x = /** @type {foo} */ (bar);");
}
+TEST_F(FormatTestJS, TryCatch) {
+ verifyFormat("try {\n"
+ " f();\n"
+ "} catch (e) {\n"
+ " g();\n"
+ "} finally {\n"
+ " h();\n"
+ "}");
+}
+
TEST_F(FormatTestJS, RegexLiteralClassification) {
// Regex literals.
verifyFormat("var regex = /abc/;");
OpenPOWER on IntegriCloud