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

Commit f3fc4ae

Browse files
committed
More unit tests
1 parent 84f1e04 commit f3fc4ae

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

src/Microsoft.DotNet.CodeFormatting.Tests/CodeFormattingTestBase.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ private Solution CreateSolution(string[] sources, string language = LanguageName
5555
var fileName = FileNamePrefix + count + fileExtension;
5656
var documentId = DocumentId.CreateNewId(projectId, fileName);
5757
solution = solution.AddDocument(documentId, fileName, SourceText.From(source));
58+
count++;
5859
}
5960

6061
return solution;

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

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,5 +318,27 @@ public partial class C { }
318318

319319
Verify(text, expected, runFormatter: false);
320320
}
321+
322+
[Fact]
323+
public void PartialAcrossFiles()
324+
{
325+
var text1 = @"
326+
public partial class C { }
327+
";
328+
329+
var text2 = @"
330+
partial class C { }
331+
";
332+
333+
var expected1 = @"
334+
public partial class C { }
335+
";
336+
337+
var expected2 = @"
338+
public partial class C { }
339+
";
340+
341+
Verify(new[] { text1, text2 }, new[] { expected1, expected2 }, runFormatter: false);
342+
}
321343
}
322344
}

0 commit comments

Comments
 (0)