CommunityToolkit / CommunityToolkit/dotnet

Wrong test assertion in Test_Span2D{T}

Open
#648 0 comments 0 reactions 0 assignees View on GitHub
bug :bug:
Dominant language
C#
Stars
3.8k
Forks
400
PR merge metrics
No merged PRs in 30d

Description

### Describe the bug

In this test we check that array is equals to itself but probably it should be compared with span2d or with a constant expected value.

https://github.com/CommunityToolkit/dotnet/blob/b8df95a9f3531524209b4bf483f684a1c52e30a9/tests/CommunityToolkit.HighPerformance.UnitTests/Memory/Test_Span2D%7BT%7D.cs#L296-L316

### Regression

_No response_

### Steps to reproduce

```text
1. Open the code :)
```

### Expected behavior

the array should be compared with the span2d variable or with a constant expected value.

### Screenshots

_No response_

### IDE and version

VS 2022

### IDE version

_No response_

### Nuget packages

- [ ] CommunityToolkit.Common
- [ ] CommunityToolkit.Diagnostics
- [ ] CommunityToolkit.HighPerformance
- [ ] CommunityToolkit.Mvvm (aka MVVM Toolkit)

### Nuget package version(s)

Doesn't matter

### Additional context

_No response_

### Help us help you

Yes, I'd like to be assigned to work on this item

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.