Fix copy-paste error in SdkResult equality check#13491
Draft
Conversation
Contributor
|
Hello @@copilot, I noticed that you’re changing an .swr file or any file under src/Package/MSBuild.VSSetup.. Please make sure to validate this change by an experimental VS insertion. This is accomplished by pushing to an exp/* branch, which requires write permissions to this repo. |
…roperties count Agent-Logs-Url: https://github.com/dotnet/msbuild/sessions/dcd4bcc5-60b7-46b1-bd22-37d2cad41a84 Co-authored-by: rainersigwald <3347530+rainersigwald@users.noreply.github.com>
Agent-Logs-Url: https://github.com/dotnet/msbuild/sessions/dcd4bcc5-60b7-46b1-bd22-37d2cad41a84 Co-authored-by: rainersigwald <3347530+rainersigwald@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix incorrect sizing in SdkResult equality check
Fix copy-paste error in SdkResult equality check
Apr 6, 2026
| public class SdkResultItemComparison_Tests | ||
| { | ||
| [Fact] | ||
| public void SdkResult_NotEqual_DifferentItemsCount() |
Member
There was a problem hiding this comment.
Add a comment that this is a regression test for #13490
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Context
SdkResult.Equalscompared_itemsToAdd?.Countagainstresult._propertiesToAdd?.Countinstead ofresult._itemsToAdd?.Count— a copy-paste error from the line above. This means twoSdkResultinstances with different item counts could compare as equal when the item count happened to match the other's property count.Changes Made
SdkResult.Equalsto compare items count against items count:Testing
SdkResult_NotEqual_DifferentItemsCountregression test that constructs twoSdkResultobjects with identical properties but different item counts, verifying they are not equal.Notes