Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Wrong test assertion in Test_Span2D{T}

Open Beginner friendly
#648 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
csharp
Domain
testing

Research direction

Open tests/CommunityToolkit.HighPerformance.UnitTests/Memory/Test_Span2D{T}.cs and inspect lines 296-316, starting with the assertion that compares the array with itself. Replace the self-comparison with the intended Span2D or constant expected value, then run the relevant CommunityToolkit.HighPerformance unit tests; done means the assertion can detect an incorrect result.

Written by the indexing model from the issue text.

Description

bug :bug:
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
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

Dominant language
C#
Stars
3.8k
Forks
400
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from CommunityToolkit/dotnet

All issues in CommunityToolkit/dotnet

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.