File tree Expand file tree Collapse file tree 2 files changed +2
-32
lines changed
Expand file tree Collapse file tree 2 files changed +2
-32
lines changed Original file line number Diff line number Diff line change @@ -1531,8 +1531,6 @@ bool UnwrappedLineParser::tryToParsePropertyAccessor() {
15311531 // Try to parse the property accessor:
15321532 // https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/properties
15331533 Tokens->setPosition (StoredPosition);
1534- if (Style.BraceWrapping .AfterFunction == true )
1535- addUnwrappedLine ();
15361534 nextToken ();
15371535 do {
15381536 switch (FormatTok->Tok .getKind ()) {
Original file line number Diff line number Diff line change @@ -245,13 +245,11 @@ TEST_F(FormatTestCSharp, Attributes) {
245245 " }" );
246246
247247 verifyFormat (" [TestMethod]\n "
248- " public string Host\n "
249- " { set; get; }" );
248+ " public string Host { set; get; }" );
250249
251250 verifyFormat (" [TestMethod(\" start\" , HelpText = \" Starts the server "
252251 " listening on provided host\" )]\n "
253- " public string Host\n "
254- " { set; get; }" );
252+ " public string Host { set; get; }" );
255253
256254 verifyFormat (
257255 " [DllImport(\" Hello\" , EntryPoint = \" hello_world\" )]\n "
@@ -671,32 +669,6 @@ class MyClass {
671669 set => veryLongNamedField = value;
672670 } = VeryLongNamedTypeIndeed.Create(DefaultFirstArgument, DefaultSecondArgument,
673671 DefaultThirdArgument);
674- })" ,
675- Style);
676-
677- // Brace wrapping and single-lining of accessor can be controlled by config.
678- Style.AllowShortBlocksOnASingleLine = FormatStyle::SBS_Never;
679- Style.BreakBeforeBraces = FormatStyle::BS_Custom;
680- Style.BraceWrapping .AfterFunction = true ;
681-
682- verifyFormat (R"( //
683- public class SaleItem {
684- public decimal Price
685- { get; set; }
686- })" ,
687- Style);
688-
689- verifyFormat (R"( //
690- class TimePeriod {
691- public double Hours
692- {
693- get {
694- return _seconds / 3600;
695- }
696- set {
697- _seconds = value * 3600;
698- }
699- }
700672})" ,
701673 Style);
702674}
You can’t perform that action at this time.
0 commit comments