Skip to content
This repository was archived by the owner on Jul 12, 2022. It is now read-only.

Add code formatting rule to add newlines at the end of code files #127

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update tests to match NewLineAtEndOfFileRule
  • Loading branch information
dsplaisted committed Jun 2, 2015
commit baf7e1a8b72c5fc2374b83f1593f8dcf38c92ee2
21 changes: 14 additions & 7 deletions src/Microsoft.DotNet.CodeFormatting.Tests/Rules/CombinationTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ private void M()
{
N(_field);
}
}";
}
";

Verify(text, expected, runFormatter: false);
}
Expand All @@ -96,7 +97,8 @@ private void M()
{
_field = 42;
}
}";
}
";

Verify(text, expected, runFormatter: false);
}
Expand All @@ -119,7 +121,8 @@ internal class C
#if DOG
void M() { }
#endif
}";
}
";

Verify(text, expected, runFormatter: false);
}
Expand All @@ -145,7 +148,8 @@ internal void M()
{
}
#endif
}";
}
";

s_formattingEngine.PreprocessorConfigurations = ImmutableArray.CreateRange(new[] { new[] { "DOG" } });
Verify(text, expected, runFormatter: false);
Expand Down Expand Up @@ -179,7 +183,8 @@ private void G()
void M() {
}
#endif
}";
}
";

Verify(text, expected, runFormatter: false);
}
Expand Down Expand Up @@ -219,7 +224,8 @@ void G()
void M() {
}
#endif
}";
}
";

s_formattingEngine.PreprocessorConfigurations = ImmutableArray.CreateRange(new[] { new[] { "TEST" } });
Verify(text, expected, runFormatter: false);
Expand Down Expand Up @@ -262,7 +268,8 @@ private void M()
{
}
}
}";
}
";

Verify(source, expected, runFormatter: false);
}
Expand Down