Skip to content

Don't use '[ExpectedException]' in Diagnostics tests #60

Don't use '[ExpectedException]' in Diagnostics tests

Don't use '[ExpectedException]' in Diagnostics tests #60

Triggered via push November 7, 2025 20:05
Status Failure
Total duration 9m 27s
Artifacts 2

ci-build.yml

on: push
Matrix: build-and-test
release
0s
release
Fit to window
Zoom out
Zoom in

Annotations

3 errors and 20 warnings
build-and-test (Release)
Process completed with exit code 1.
build-and-test (Debug)
The strategy configuration was canceled because "build-and-test.Release" failed
build-and-test (Debug)
The operation was canceled.
build-and-test (Release): tests/CommunityToolkit.HighPerformance.UnitTests/Extensions/Test_ArrayPoolExtensions.cs#L93
Prefer 'Assert.ThrowsExactly/ThrowsExactlyAsync' over '[ExpectedException]' (https://learn.microsoft.com/dotnet/core/testing/mstest-analyzers/mstest0006)
build-and-test (Release): tests/CommunityToolkit.HighPerformance.UnitTests/Extensions/Test_ArrayPoolExtensions.cs#L18
Prefer 'Assert.ThrowsExactly/ThrowsExactlyAsync' over '[ExpectedException]' (https://learn.microsoft.com/dotnet/core/testing/mstest-analyzers/mstest0006)
build-and-test (Release): tests/CommunityToolkit.HighPerformance.UnitTests/Extensions/Test_MemoryExtensions.cs#L514
Do not duplicate 'DataRow' attributes. This is usually a copy/paste error. The attribute indices are '2' and '5'. (https://learn.microsoft.com/dotnet/core/testing/mstest-analyzers/mstest0042)
build-and-test (Release): tests/CommunityToolkit.HighPerformance.UnitTests/Extensions/Test_MemoryExtensions.cs#L463
Do not duplicate 'DataRow' attributes. This is usually a copy/paste error. The attribute indices are '2' and '5'. (https://learn.microsoft.com/dotnet/core/testing/mstest-analyzers/mstest0042)
build-and-test (Release): tests/CommunityToolkit.HighPerformance.UnitTests/Extensions/Test_MemoryExtensions.cs#L433
Do not duplicate 'DataRow' attributes. This is usually a copy/paste error. The attribute indices are '2' and '5'. (https://learn.microsoft.com/dotnet/core/testing/mstest-analyzers/mstest0042)
build-and-test (Release): tests/CommunityToolkit.HighPerformance.UnitTests/Buffers/Test_ArrayPoolBufferWriter{T}.cs#L141
Prefer 'Assert.ThrowsExactly/ThrowsExactlyAsync' over '[ExpectedException]' (https://learn.microsoft.com/dotnet/core/testing/mstest-analyzers/mstest0006)
build-and-test (Release): tests/CommunityToolkit.HighPerformance.UnitTests/Buffers/Test_MemoryOwner{T}.cs#L75
Prefer 'Assert.ThrowsExactly/ThrowsExactlyAsync' over '[ExpectedException]' (https://learn.microsoft.com/dotnet/core/testing/mstest-analyzers/mstest0006)
build-and-test (Release): tests/CommunityToolkit.HighPerformance.UnitTests/Buffers/Test_MemoryOwner{T}.cs#L64
Prefer 'Assert.ThrowsExactly/ThrowsExactlyAsync' over '[ExpectedException]' (https://learn.microsoft.com/dotnet/core/testing/mstest-analyzers/mstest0006)
build-and-test (Release): tests/CommunityToolkit.HighPerformance.UnitTests/Buffers/Test_MemoryOwner{T}.cs#L55
Prefer 'Assert.ThrowsExactly/ThrowsExactlyAsync' over '[ExpectedException]' (https://learn.microsoft.com/dotnet/core/testing/mstest-analyzers/mstest0006)
build-and-test (Release): tests/CommunityToolkit.HighPerformance.UnitTests/Buffers/Test_SpanOwner{T}.cs#L51
Prefer 'Assert.ThrowsExactly/ThrowsExactlyAsync' over '[ExpectedException]' (https://learn.microsoft.com/dotnet/core/testing/mstest-analyzers/mstest0006)
build-and-test (Debug): tests/CommunityToolkit.HighPerformance.UnitTests/Memory/Test_Span2D{T}.cs#L615
Prefer 'Assert.ThrowsExactly/ThrowsExactlyAsync' over '[ExpectedException]' (https://learn.microsoft.com/dotnet/core/testing/mstest-analyzers/mstest0006)
build-and-test (Debug): tests/CommunityToolkit.HighPerformance.UnitTests/Memory/Test_Span2D{T}.cs#L578
Prefer 'Assert.ThrowsExactly/ThrowsExactlyAsync' over '[ExpectedException]' (https://learn.microsoft.com/dotnet/core/testing/mstest-analyzers/mstest0006)
build-and-test (Debug): tests/CommunityToolkit.HighPerformance.UnitTests/Buffers/Test_MemoryOwner{T}.cs#L75
Prefer 'Assert.ThrowsExactly/ThrowsExactlyAsync' over '[ExpectedException]' (https://learn.microsoft.com/dotnet/core/testing/mstest-analyzers/mstest0006)
build-and-test (Debug): tests/CommunityToolkit.HighPerformance.UnitTests/Buffers/Test_MemoryOwner{T}.cs#L64
Prefer 'Assert.ThrowsExactly/ThrowsExactlyAsync' over '[ExpectedException]' (https://learn.microsoft.com/dotnet/core/testing/mstest-analyzers/mstest0006)
build-and-test (Debug): tests/CommunityToolkit.HighPerformance.UnitTests/Buffers/Test_MemoryOwner{T}.cs#L55
Prefer 'Assert.ThrowsExactly/ThrowsExactlyAsync' over '[ExpectedException]' (https://learn.microsoft.com/dotnet/core/testing/mstest-analyzers/mstest0006)
build-and-test (Debug): tests/CommunityToolkit.HighPerformance.UnitTests/Buffers/Test_SpanOwner{T}.cs#L51
Prefer 'Assert.ThrowsExactly/ThrowsExactlyAsync' over '[ExpectedException]' (https://learn.microsoft.com/dotnet/core/testing/mstest-analyzers/mstest0006)
build-and-test (Debug): tests/CommunityToolkit.HighPerformance.UnitTests/Test_NullableReadOnlyRef{T}.cs#L89
Prefer 'Assert.ThrowsExactly/ThrowsExactlyAsync' over '[ExpectedException]' (https://learn.microsoft.com/dotnet/core/testing/mstest-analyzers/mstest0006)
build-and-test (Debug): tests/CommunityToolkit.HighPerformance.UnitTests/Test_NullableRef{T}.cs#L71
Prefer 'Assert.ThrowsExactly/ThrowsExactlyAsync' over '[ExpectedException]' (https://learn.microsoft.com/dotnet/core/testing/mstest-analyzers/mstest0006)
build-and-test (Debug): tests/CommunityToolkit.HighPerformance.UnitTests/Test_NullableReadOnlyRef{T}.cs#L38
Prefer 'Assert.ThrowsExactly/ThrowsExactlyAsync' over '[ExpectedException]' (https://learn.microsoft.com/dotnet/core/testing/mstest-analyzers/mstest0006)
build-and-test (Debug): tests/CommunityToolkit.HighPerformance.UnitTests/Test_NullableRef{T}.cs#L42
Prefer 'Assert.ThrowsExactly/ThrowsExactlyAsync' over '[ExpectedException]' (https://learn.microsoft.com/dotnet/core/testing/mstest-analyzers/mstest0006)

Artifacts

Produced during runtime
Name Size Digest
msbuild_log_Debug Expired
4.2 MB
sha256:fe47386a5ca35f09f8899c39e529bdf9f4c642935751f3066f73ca020de5ca02
msbuild_log_Release Expired
4.18 MB
sha256:6114ffffe4797b9f3fa34c2bc8b62bc7eb134c04226ed07494ed8b0718f0c416