You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This pull request adds tests for new language features and improved error handling for unsupported method signatures.
Support for static abstract members and explicit implementations:
Added tests to ensure that when interfaces declare static abstract methods or properties with colliding names in base and derived interfaces, the generated code emits explicit static implementations with the static keyword preserved.
Added a test to verify that static abstract methods with parameters correctly append arguments to the fast buffer, ensuring proper interaction recording.
Added a test to confirm that when a concrete base class is combined with an interface declaring static abstract members, the generated constructor primes the MockRegistryProvider so that virtual calls during base-class construction can resolve the registry.
Improved handling and validation for ref struct methods:
Added tests to ensure that methods returning a non-span ref struct or using out/ref ref struct parameters throw NotSupportedException and skip setup surface generation, preventing unsupported ref struct signatures from being used in the setup pipeline.
Source generator code and overloads:
Refactored the generator code to require non-null constructor lists for overload generation, simplifying the logic in AppendTypedCreateMockOverloads.
Removed an unnecessary constructor overload and related code for cases where no constructors are present, streamlining the generated code.
This file contains hidden or 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
coverageAdditional tests for edge cases or improvement of test coveragestate: releasedThe issue is released
1 participant
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds tests for new language features and improved error handling for unsupported method signatures.
Support for static abstract members and explicit implementations:
statickeyword preserved.MockRegistryProviderso that virtual calls during base-class construction can resolve the registry.Improved handling and validation for ref struct methods:
NotSupportedExceptionand skip setup surface generation, preventing unsupported ref struct signatures from being used in the setup pipeline.Source generator code and overloads:
AppendTypedCreateMockOverloads.