diff options
Diffstat (limited to 'clang/unittests/Format/FormatTestJS.cpp')
| -rw-r--r-- | clang/unittests/Format/FormatTestJS.cpp | 10 |
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/;"); |

