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

Commit 0f924a6

Browse files
committed
Fix unit test failure
The unit tests which depend on table formatting need to enable that feature before running.
1 parent ae6678a commit 0f924a6

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Microsoft.DotNet.CodeFormatting.Tests/Rules/CombinationTest.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace Microsoft.DotNet.CodeFormatting.Tests
1313
/// <summary>
1414
/// A test which runs all rules on a given piece of code
1515
/// </summary>
16-
public sealed class CombinationTest : CodeFormattingTestBase
16+
public sealed class CombinationTest : CodeFormattingTestBase, IDisposable
1717
{
1818
private static FormattingEngineImplementation s_formattingEngine;
1919

@@ -25,10 +25,16 @@ static CombinationTest()
2525
public CombinationTest()
2626
{
2727
s_formattingEngine.CopyrightHeader = ImmutableArray.Create("// header");
28+
s_formattingEngine.AllowTables = true;
2829
s_formattingEngine.FormatLogger = new EmptyFormatLogger();
2930
s_formattingEngine.PreprocessorConfigurations = ImmutableArray<string[]>.Empty;
3031
}
3132

33+
public void Dispose()
34+
{
35+
s_formattingEngine.AllowTables = false;
36+
}
37+
3238
protected override async Task<Document> RewriteDocumentAsync(Document document)
3339
{
3440
var solution = await s_formattingEngine.FormatCoreAsync(

0 commit comments

Comments
 (0)