Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Cleanup Buffer tests #7614

Merged
merged 3 commits into from
Apr 10, 2016
Merged

Cleanup Buffer tests #7614

merged 3 commits into from
Apr 10, 2016

Conversation

hughbe
Copy link

@hughbe hughbe commented Apr 9, 2016

  • Take advantage of xunit
  • Add some missing tests

Contributes to #6286
Cherry picked from #5490

{
Assert.Equal(sourceArray[i], destinationArray[i + destinationIndexOffset - sourceIndexOffset]);
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add loops verifying that before and after the range in the destinationArray remain 0?

@stephentoub
Copy link
Member

Some comments, otherwise LGTM.

hughbe added 2 commits April 10, 2016 21:31
- Take advantage of xunit
- Add some missing tests

Contributes to #6286

Note to reviewers: I did not remove the Buffer.MemoryCopy file for the
sake of combining test files into a single file. I did this because I
did a major overhaul of the tests, and this suited the Buffer.cs file
@hughbe
Copy link
Author

hughbe commented Apr 10, 2016

Thanks, I addressed your comments - unfortunately I couldn't add all the extra tests you asked for, as sizeof(int) == 4 so I got strange results if sourceBytesToCopy was not a value of 4.

If we want to test all inputs up to 16, I think we need to use a different non-integer primitive type

@stephentoub
Copy link
Member

If we want to test all inputs up to 16, I think we need to use a different non-integer primitive type

Yes, byte will be the easiest way.

@hughbe
Copy link
Author

hughbe commented Apr 10, 2016

Yes, byte will be the easiest way.

Done

@stephentoub
Copy link
Member

Thanks. LGTM.

@stephentoub stephentoub merged commit 7f57da2 into dotnet:master Apr 10, 2016
@hughbe hughbe deleted the runtime-tests-buffer branch April 11, 2016 07:35
@karelz karelz modified the milestone: 1.0.0-rtm Dec 3, 2016
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
* Cleanup Buffer tests

- Take advantage of xunit
- Add some missing tests

Contributes to dotnet/corefx#6286

Commit migrated from dotnet/corefx@7f57da2
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants