Delete unnecessary seek from FileStream.SetLengthInternal on Unix#44097
Merged
jkotas merged 1 commit intodotnet:masterfrom Nov 1, 2020
Merged
Delete unnecessary seek from FileStream.SetLengthInternal on Unix#44097jkotas merged 1 commit intodotnet:masterfrom
jkotas merged 1 commit intodotnet:masterfrom
Conversation
stephentoub
approved these changes
Oct 31, 2020
Member
stephentoub
left a comment
There was a problem hiding this comment.
Looks good to me once CI is green. I'm trying to remember why all this was deemed necessary and coming up empty.
Member
Author
|
I suspect that it was just copy&paste from Windows where we can avoid it as well - #43863 (comment). |
Member
|
stephentoub
reviewed
Oct 31, 2020
Member
There was a problem hiding this comment.
It looks like this method is poorly named, in that whereas Assert.ThrowsAny<T> allows for the exception to be T or anything derived from it, AssertExtensions.ThrowsAny<T1, T2> is requiring the concrete type of T1 or T2:
runtime/src/libraries/Common/tests/TestUtilities/System/AssertExtensions.cs
Lines 195 to 216 in 22c3105
which is then failing if the exception is actually an ArgumentOutOfRangeException.
ae6acc1 to
5901a0c
Compare
Also, improve test coverage for FileStream.SetLength
ec6d800 to
4ae2738
Compare
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.
No description provided.