From af4e8db1dcb8c298c3b15d7a056dc5bd8bd02d98 Mon Sep 17 00:00:00 2001 From: Brandon Minnick <13558917+brminnick@users.noreply.github.com> Date: Sat, 13 Mar 2021 23:35:04 -0800 Subject: [PATCH] Passthrough ValueTask --- azure-pipelines.yml | 2 +- .../AsyncValueCommandTests/BaseAsyncValueCommandTests.cs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 12a6ba559..12a1a2b7f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -201,7 +201,7 @@ jobs: inputs: script: | dotnet restore $(PathToUnitTestCsproj) /p:Configuration=Release - $(PathToMsBuildOnMacOS) $(PathToUnitTestCsproj) /p:Configuration=UnitTest /p:Platform="" /restore /t:Build + $(PathToMsBuildOnMacOS) $(PathToUnitTestCsproj) /p:Configuration=Release /restore /t:Build echo "********** Running Unit Tests on .NET Framework (xUnit does not support dotnet test for .NET Framework: https://xunit.net/docs/getting-started/netfx/cmdline) **********" diff --git a/src/CommunityToolkit/Xamarin.CommunityToolkit.UnitTests/ObjectModel/ICommandTests/AsyncValueCommandTests/BaseAsyncValueCommandTests.cs b/src/CommunityToolkit/Xamarin.CommunityToolkit.UnitTests/ObjectModel/ICommandTests/AsyncValueCommandTests/BaseAsyncValueCommandTests.cs index 29471cbc4..41594e882 100644 --- a/src/CommunityToolkit/Xamarin.CommunityToolkit.UnitTests/ObjectModel/ICommandTests/AsyncValueCommandTests/BaseAsyncValueCommandTests.cs +++ b/src/CommunityToolkit/Xamarin.CommunityToolkit.UnitTests/ObjectModel/ICommandTests/AsyncValueCommandTests/BaseAsyncValueCommandTests.cs @@ -15,7 +15,6 @@ public abstract class BaseAsyncValueCommandTests : BaseCommandTests protected new ValueTask ParameterImmediateNullReferenceExceptionTask(int delay) => throw new NullReferenceException(); - protected async ValueTask ValueTaskDelay(int delay) => await Task.Delay(delay).ConfigureAwait(false); protected new async ValueTask NoParameterDelayedNullReferenceExceptionTask() { @@ -28,5 +27,7 @@ protected new async ValueTask IntParameterDelayedNullReferenceExceptionTask(int await Task.Delay(delay); throw new NullReferenceException(); } + + ValueTask ValueTaskDelay(int delay) => new ValueTask(Task.Delay(delay)); } } \ No newline at end of file