aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Format/FormatTestCSharp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/unittests/Format/FormatTestCSharp.cpp')
-rw-r--r--clang/unittests/Format/FormatTestCSharp.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestCSharp.cpp b/clang/unittests/Format/FormatTestCSharp.cpp
index 3b04238..0c5afa1 100644
--- a/clang/unittests/Format/FormatTestCSharp.cpp
+++ b/clang/unittests/Format/FormatTestCSharp.cpp
@@ -1688,6 +1688,18 @@ TEST_F(FormatTestCSharp, BrokenBrackets) {
EXPECT_NE("", format("int where b <")); // reduced from crasher
}
+TEST_F(FormatTestCSharp, GotoCaseLabel) {
+ verifyNoCrash("switch (i) {\n"
+ "case 0:\n"
+ " goto case 1;\n"
+ "case 1:\n"
+ " j = 0;\n"
+ " {\n"
+ " break;\n"
+ " }\n"
+ "}");
+}
+
} // namespace
} // namespace test
} // namespace format