aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Format/FormatTestCSharp.cpp
diff options
context:
space:
mode:
authorJonathan Coe <jbcoe@google.com>2020-04-28 17:41:17 +0100
committerJonathan Coe <jbcoe@google.com>2020-04-28 17:41:17 +0100
commit85ee97fd894b2d0432dfaf20347e73f3e154ae97 (patch)
treef2467a38ac42c5f83eb51e5eabdf2c6c2a405172 /clang/unittests/Format/FormatTestCSharp.cpp
parent015bca3e67cbb88f74f01fb5ae4e46392bec6416 (diff)
downloadllvm-85ee97fd894b2d0432dfaf20347e73f3e154ae97.zip
llvm-85ee97fd894b2d0432dfaf20347e73f3e154ae97.tar.gz
llvm-85ee97fd894b2d0432dfaf20347e73f3e154ae97.tar.bz2
Revert "[clang-format] C# property formatting can be controlled by config options"
Committed in error without approval https://reviews.llvm.org/D79000 This reverts commit 015bca3e67cbb88f74f01fb5ae4e46392bec6416.
Diffstat (limited to 'clang/unittests/Format/FormatTestCSharp.cpp')
-rw-r--r--clang/unittests/Format/FormatTestCSharp.cpp32
1 files changed, 2 insertions, 30 deletions
diff --git a/clang/unittests/Format/FormatTestCSharp.cpp b/clang/unittests/Format/FormatTestCSharp.cpp
index 550f5b4..91962ef 100644
--- a/clang/unittests/Format/FormatTestCSharp.cpp
+++ b/clang/unittests/Format/FormatTestCSharp.cpp
@@ -245,13 +245,11 @@ TEST_F(FormatTestCSharp, Attributes) {
"}");
verifyFormat("[TestMethod]\n"
- "public string Host\n"
- "{ set; get; }");
+ "public string Host { set; get; }");
verifyFormat("[TestMethod(\"start\", HelpText = \"Starts the server "
"listening on provided host\")]\n"
- "public string Host\n"
- "{ set; get; }");
+ "public string Host { set; get; }");
verifyFormat(
"[DllImport(\"Hello\", EntryPoint = \"hello_world\")]\n"
@@ -673,32 +671,6 @@ class MyClass {
DefaultThirdArgument);
})",
Style);
-
- // Brace wrapping and single-lining of accessor can be controlled by config.
- Style.AllowShortBlocksOnASingleLine = FormatStyle::SBS_Never;
- Style.BreakBeforeBraces = FormatStyle::BS_Custom;
- Style.BraceWrapping.AfterFunction = true;
-
- verifyFormat(R"(//
-public class SaleItem {
- public decimal Price
- { get; set; }
-})",
- Style);
-
- verifyFormat(R"(//
-class TimePeriod {
- public double Hours
- {
- get {
- return _seconds / 3600;
- }
- set {
- _seconds = value * 3600;
- }
- }
-})",
- Style);
}
TEST_F(FormatTestCSharp, CSharpSpaces) {