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.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestCSharp.cpp b/clang/unittests/Format/FormatTestCSharp.cpp
index 875ff74..427f725 100644
--- a/clang/unittests/Format/FormatTestCSharp.cpp
+++ b/clang/unittests/Format/FormatTestCSharp.cpp
@@ -848,6 +848,21 @@ public class A {
verifyFormat(R"(var x = (int?)y;)", Style); // Cast to a nullable type.
verifyFormat(R"(var x = new MyContainer<int?>();)", Style); // Generics.
+
+ verifyFormat(R"(//
+public interface I {
+ int? Function();
+})",
+ Style); // Interface methods.
+
+ Style.ColumnLimit = 10;
+ verifyFormat(R"(//
+public VeryLongType? Function(
+ int arg1,
+ int arg2) {
+ //
+})",
+ Style); // ? sticks with identifier.
}
TEST_F(FormatTestCSharp, CSharpArraySubscripts) {