-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improvments to Incremental Generator (#45)
* Create ResultClassEqualityComparer and use it * ignore not partial classes * Fix test * Remove `ClassIsNotPartial` diagnostic * Remove diagnostic report in `TestClassMockCandidateFactory` * remove Diagnostic reports from transform * replace ContainingClassSyntax with name and namespace * Remove unused MemoryDiagnosticReporter
- Loading branch information
1 parent
ce11b91
commit d6d82d3
Showing
9 changed files
with
90 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 0 additions & 18 deletions
18
TestsHelper.SourceGenerator/Diagnostics/Reporters/MemoryDiagnosticReporter.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
TestsHelper.SourceGenerator/MockFilling/Models/AttributedTestClassMember.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
using Microsoft.CodeAnalysis; | ||
|
||
namespace TestsHelper.SourceGenerator.MockFilling.Models; | ||
|
||
public readonly record struct AttributedTestClassMember(ITypeSymbol Symbol, bool GenerateMockWrapper); |
16 changes: 11 additions & 5 deletions
16
TestsHelper.SourceGenerator/MockFilling/Models/TestClassMockCandidate.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,17 @@ | ||
using Microsoft.CodeAnalysis; | ||
using Microsoft.CodeAnalysis.CSharp.Syntax; | ||
using System.Collections.Immutable; | ||
using Microsoft.CodeAnalysis; | ||
|
||
namespace TestsHelper.SourceGenerator.MockFilling.Models; | ||
|
||
/// <summary> | ||
/// | ||
/// </summary> | ||
/// <param name="ContainsClassNamespace">empty when is in global namespace</param> | ||
/// <param name="ContainingClassSymbol"></param> | ||
/// <param name="AttributedTestClassMembers"></param> | ||
public readonly record struct TestClassMockCandidate( | ||
ClassDeclarationSyntax ContainingClassSyntax, | ||
SyntaxToken ContainingClassIdentifier, | ||
string ContainsClassNamespace, | ||
INamedTypeSymbol ContainingClassSymbol, | ||
ITypeSymbol TestedClassMember, | ||
bool GenerateMockWrappers | ||
ImmutableArray<AttributedTestClassMember> AttributedTestClassMembers | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters