Update generated test verifications and packages#393
Merged
ChrisPulman merged 2 commits intomainfrom Apr 3, 2026
Merged
Conversation
Regenerate and adjust many test verification files to match updated source-generator output: rename generated properties/fields (e.g. to MyNamedProperty), adjust ObservableAsPropertyHelper nullability and protection levels, add/modify JSON/DataContract attributes (JsonInclude/JsonIgnore/DataMemberName), change property accessors (init/required/protected), and fix member-not-null placement. Add a large set of new REACTIVECMD verification files. Update Directory.Packages.props to add/reorder package versions (Basic.Reference.Assemblies for multiple frameworks, Splat, ReactiveUI, System.Reactive, TUnit, Verify.TUnit, etc.) and update the tests project and TestHelper accordingly.
Add helper methods to safely convert attribute named arguments and handle enum/raw values, plus add generated ReactiveCommand test verification files. - Modified AttributeDataExtensions.cs to import System.Globalization and replace direct TypedConstant.Value casts with TryConvertNamedArgument, which uses Convert.ChangeType with InvariantCulture and catches conversion errors. - Implemented TryGetRawValue to resolve enum constants from TypedConstant (including IFieldSymbol and member lookup). - Added four generated test verification files under src/ReactiveUI.SourceGenerator.Tests/REACTIVECMD to capture expected ReactiveCommand outputs. These changes ensure more robust conversion of attribute named arguments (including enums and numeric/string conversions) and provide test artifacts for the ReactiveCommand source generator.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #393 +/- ##
==========================================
+ Coverage 46.96% 55.84% +8.88%
==========================================
Files 75 75
Lines 4035 4063 +28
Branches 491 500 +9
==========================================
+ Hits 1895 2269 +374
+ Misses 1986 1600 -386
- Partials 154 194 +40 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
What kind of change does this PR introduce?
fix for tests
What is the current behavior?
Tests failing to generate code for comparison
What is the new behavior?
Regenerate and adjust many test verification files to match updated source-generator output: rename generated properties/fields (e.g. to MyNamedProperty), adjust ObservableAsPropertyHelper nullability and protection levels, add/modify JSON/DataContract attributes (JsonInclude/JsonIgnore/DataMemberName), change property accessors (init/required/protected), and fix member-not-null placement.
Update Directory.Packages.props to add/reorder package versions (Basic.Reference.Assemblies for multiple frameworks, Splat, ReactiveUI, System.Reactive, TUnit, Verify.TUnit, etc.) and update the tests project and TestHelper accordingly.
Add helper methods to safely convert attribute named arguments and handle enum/raw values, plus add generated ReactiveCommand test verification files.
These changes ensure more robust conversion of attribute named arguments (including enums and numeric/string conversions) and provide test artifacts for the ReactiveCommand source generator.
What might this PR break?
N/A Tests only
Please check if the PR fulfills these requirements
Other information: