diff options
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
| -rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index d2ec6431a15..7404c85de62 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -2303,6 +2303,13 @@ TEST_F(FormatTest, FormatTryCatchBraceStyles) { " // something\n" "}", Style); + verifyFormat("@try {\n" + " // something\n" + "}\n" + "@finally {\n" + " // something\n" + "}", + Style); Style.BreakBeforeBraces = FormatStyle::BS_Allman; verifyFormat("try\n" "{\n" @@ -2328,13 +2335,16 @@ TEST_F(FormatTest, FormatTryCatchBraceStyles) { TEST_F(FormatTest, FormatObjCTryCatch) { verifyFormat("@try {\n" " f();\n" - "}\n" - "@catch (NSException e) {\n" + "} @catch (NSException e) {\n" " @throw;\n" - "}\n" - "@finally {\n" + "} @finally {\n" " exit(42);\n" "}"); + verifyFormat("DEBUG({\n" + " @try {\n" + " } @finally {\n" + " }\n" + "});\n"); } TEST_F(FormatTest, StaticInitializers) { |

