Skip to content

Commit

Permalink
Avoid xunit's sync-over-async Assert.Equal method
Browse files Browse the repository at this point in the history
  • Loading branch information
stephentoub committed Jan 23, 2025
1 parent a494879 commit 1d7eeca
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ public void InvalidInputs_Throws()
[InlineData(new int[] { 1 })]
[InlineData(new int[] { 2, 4, 8 })]
[InlineData(new int[] { -1, 2, 5, 6, 7, 8 })]
public void VariousValues_MatchesEnumerable(int[] values)
public async Task VariousValues_MatchesEnumerable(int[] values)
{
foreach (IAsyncEnumerable<int> source in CreateSources(values))
{
Assert.Equal(
await AssertEqual(
values.Append(42),
source.Append(42));
}
Expand Down
4 changes: 2 additions & 2 deletions src/libraries/System.Linq.AsyncEnumerable/tests/IndexTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ public void InvalidInputs_Throws()
[InlineData(new int[] { 1 })]
[InlineData(new int[] { 2, 4, 8 })]
[InlineData(new int[] { -1, 2, 5, 6, 7, 8 })]
public void VariousValues_MatchesEnumerable(int[] values)
public async Task VariousValues_MatchesEnumerable(int[] values)
{
foreach (IAsyncEnumerable<int> source in CreateSources(values))
{
Assert.Equal(
await AssertEqual(
values.Index(),
source.Index());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ public void InvalidInputs_Throws()
[InlineData(new int[] { 1 })]
[InlineData(new int[] { 2, 4, 8 })]
[InlineData(new int[] { -1, 2, 5, 6, 7, 8 })]
public void VariousValues_MatchesEnumerable(int[] values)
public async Task VariousValues_MatchesEnumerable(int[] values)
{
foreach (IAsyncEnumerable<int> source in CreateSources(values))
{
Assert.Equal(
await AssertEqual(
values.Prepend(42),
source.Prepend(42));
}
Expand Down

0 comments on commit 1d7eeca

Please sign in to comment.