-
-
Notifications
You must be signed in to change notification settings - Fork 108
fix: improve error messages for unresolved generic type arguments in test generation #4447
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
SummaryImproves error messages for generic tests and fixes detection of class-level data sources on generic types. Critical IssuesNone found ✅ Suggestions1. Source Generator Change May Need Dual-Mode VerificationThe source generator now detects class-level data sources on generic types via the var hasClassDataSources = testMethod.IsGenericType && testMethod.TypeSymbol.GetAttributesIncludingBaseTypes()
.Any(a => DataSourceAttributeHelper.IsDataSourceAttribute(a.AttributeClass));Question: Does the reflection-based test discovery in The change appears to fix a bug where generic classes with class-level data sources weren't being detected properly. If this is a bug fix, the reflection path may need the same fix, or we should verify it already handles this case. Reference: 2. Snapshot TestingSince the source generator output has changed (new code path for dotnet test TUnit.Core.SourceGenerator.TestsIf snapshots changed, commit the Reference: 3. Minor: InterceptorsNamespaces ChangeThe change to This seems unrelated to the PR's stated purpose (improving generic test error messages). Is this an incidental fix for a build issue, or should it be in a separate commit? Verdict💬 COMMENT - Excellent error message improvements! Just want to verify dual-mode compatibility and snapshot testing. |
This pull request improves generic test support and error messaging in the test engine and source generator