Remove duplicate [Theory] and [MemberData] from ROSequenceStreamConformanceTests.Seek_PastEnd_ReadReturns0#129979
Remove duplicate [Theory] and [MemberData] from ROSequenceStreamConformanceTests.Seek_PastEnd_ReadReturns0#129979Copilot wants to merge 2 commits into
Conversation
…rmanceTests.Seek_PastEnd_ReadReturns0 Co-authored-by: adamsitnik <6011991+adamsitnik@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR cleans up the System.Memory ReadOnlySequenceStream conformance test override by removing redundant xUnit attributes so that the test continues to use the base class’ data source and theory definition.
Changes:
- Removed
[Theory]and[MemberData(nameof(AllSeekModes))]fromROSequenceStreamConformanceTests.Seek_PastEnd_ReadReturns0. - Ensures the override relies on the base
StreamConformanceTests.Seek_PastEnd_ReadReturns0attributes (whereAllSeekModesis declared), avoidingMemberDatareflection on derived test types.
|
Tagging subscribers to this area: @dotnet/area-system-io |
|
/azp list |
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
adamsitnik
left a comment
There was a problem hiding this comment.
@copilot on tvOS, where trimming is enabled, the tests are still failing:
[14:41:33] dbug: [14:18:27.3976820] Test collection for System.Memory.Tests.NativeReadOnlyMemoryStreamConformanceTests
[14:41:33] dbug: [14:18:27.4255060] 2026-06-29 11:18:27.532 System.Memory.Tests[10718:8359778] [FAIL] System.Memory.Tests.NativeReadOnlyMemoryStreamConformanceTests.Seek_PastEnd_ReadReturns0
[14:41:33] dbug: [14:18:27.4255500] 2026-06-29 11:18:27.532 System.Memory.Tests[10718:8359778] System.ArgumentException : Could not find public static member (property, field, or method) named 'AllSeekModes' on System.Memory.Tests.NativeReadOnlyMemoryStreamConformanceTests
Figure out the best way to solve it
…classes Co-authored-by: adamsitnik <6011991+adamsitnik@users.noreply.github.com>
Fixed in 935dd2d. I added a class-local
I also ran targeted System.Memory conformance classes and they pass locally. |

The
Seek_PastEnd_ReadReturns0override inROSequenceStreamConformanceTestsredundantly declared[Theory]and[MemberData(nameof(AllSeekModes))]— these are inherited from the base virtual method inStandaloneStreamConformanceTestsand don't need to be repeated.All 52,894 System.Memory tests pass;
Seek_PastEnd_ReadReturns0confirmed running across all 3 conformance test classes (20 results).fixes #129922