Skip to content

Commit ea8b8cf

Browse files
committed
Improved code coverage
1 parent 48bd60c commit ea8b8cf

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/DotNext.Tests/Threading/Tasks/ConversionTests.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ public static async Task DynamicTaskValueType()
4444
[Fact]
4545
public static async Task SuspendException()
4646
{
47-
await Task.FromException(new Exception()).SuspendException();
48-
await ValueTask.FromException(new Exception()).SuspendException();
47+
await Task.FromException(new Exception()).SuspendException().ConfigureAwait(true);
48+
await ValueTask.FromException(new Exception()).SuspendException().ConfigureAwait(true);
4949

50-
var result = await Task.FromException<int>(new ArithmeticException()).SuspendException();
50+
var result = await Task.FromException<int>(new ArithmeticException()).SuspendException().ConfigureAwait(true);
5151
False(result.IsSuccessful);
5252
IsType<ArithmeticException>(result.Error);
5353
}
@@ -63,8 +63,8 @@ public static async Task SuspendException2()
6363
[Fact]
6464
public static async Task SuspendExceptionParametrized()
6565
{
66-
await Task.FromException(new Exception()).SuspendException(42, (_, i) => i is 42);
67-
await ValueTask.FromException(new Exception()).SuspendException(42, (_, i) => i is 42);
68-
await ThrowsAsync<Exception>(async () => await Task.FromException(new Exception()).SuspendException(43, (_, i) => i is 42));
66+
await Task.FromException(new Exception()).SuspendException(42, (_, i) => i is 42).ConfigureAwait(true);
67+
await ValueTask.FromException(new Exception()).SuspendException(42, (_, i) => i is 42).ConfigureAwait(true);
68+
await ThrowsAsync<Exception>(async () => await Task.FromException(new Exception()).SuspendException(43, (_, i) => i is 42).ConfigureAwait(true));
6969
}
7070
}

0 commit comments

Comments
 (0)