From 93016c1ae03e37889687411974aa74e83d1bd201 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Fi=C5=A1era?= Date: Thu, 9 Nov 2023 11:52:18 +0100 Subject: [PATCH] Remove ValueTask interop test placeholders --- .../JavaScript/HelperMarshal.cs | 32 ------------- .../JavaScript/MarshalTests.cs | 46 ------------------- 2 files changed, 78 deletions(-) diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/tests/System.Runtime.InteropServices.JavaScript.Legacy.UnitTests/System/Runtime/InteropServices/JavaScript/HelperMarshal.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/tests/System.Runtime.InteropServices.JavaScript.Legacy.UnitTests/System/Runtime/InteropServices/JavaScript/HelperMarshal.cs index a3845136a03d6..f37408f32f10d 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/tests/System.Runtime.InteropServices.JavaScript.Legacy.UnitTests/System/Runtime/InteropServices/JavaScript/HelperMarshal.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/tests/System.Runtime.InteropServices.JavaScript.Legacy.UnitTests/System/Runtime/InteropServices/JavaScript/HelperMarshal.cs @@ -452,38 +452,6 @@ public static async Task FailedAsynchronousTask() await Task.Yield(); throw new Exception(); } - - public static async ValueTask AsynchronousValueTask() - { - await Task.Yield(); - } - - public static ValueTask SynchronousValueTask() - { - return ValueTask.CompletedTask; - } - - public static ValueTask SynchronousValueTaskInt(int i) - { - return ValueTask.FromResult(i); - } - - public static async ValueTask AsynchronousValueTaskInt(int i) - { - await Task.Yield(); - return i; - } - - public static ValueTask FailedSynchronousValueTask() - { - return ValueTask.FromException(new Exception()); - } - - public static async ValueTask FailedAsynchronousValueTask() - { - await Task.Yield(); - throw new Exception(); - } } public enum TestEnum : uint { diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/tests/System.Runtime.InteropServices.JavaScript.Legacy.UnitTests/System/Runtime/InteropServices/JavaScript/MarshalTests.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/tests/System.Runtime.InteropServices.JavaScript.Legacy.UnitTests/System/Runtime/InteropServices/JavaScript/MarshalTests.cs index 9cee9aa13bef3..3d27ba7948c24 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/tests/System.Runtime.InteropServices.JavaScript.Legacy.UnitTests/System/Runtime/InteropServices/JavaScript/MarshalTests.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/tests/System.Runtime.InteropServices.JavaScript.Legacy.UnitTests/System/Runtime/InteropServices/JavaScript/MarshalTests.cs @@ -787,51 +787,5 @@ public static async Task MarshalFailedAsynchronousTask() bool success = await MarshalTask("FailedAsynchronousTask"); Assert.False(success, "FailedAsynchronousTask didn't failed."); } - - [Fact] - [ActiveIssue("https://github.com/dotnet/runtime/issues/61368")] - public static async Task MarshalSynchronousValueTaskDoesNotWorkYet() - { - bool success = await MarshalTask("SynchronousValueTask"); - Assert.True(success, "SynchronousValueTask didn't succeeded."); - } - - [Fact] - [ActiveIssue("https://github.com/dotnet/runtime/issues/61368")] - public static async Task MarshalAsynchronousValueTaskDoesNotWorkYet() - { - bool success = await MarshalTask("AsynchronousValueTask"); - Assert.True(success, "AsynchronousValueTask didn't succeeded."); - } - - [Fact] - [ActiveIssue("https://github.com/dotnet/runtime/issues/61368")] - public static Task MarshalSynchronousValueTaskIntDoesNotWorkYet() - { - return MarshalTaskReturningInt("SynchronousValueTaskInt"); - } - - [Fact] - [ActiveIssue("https://github.com/dotnet/runtime/issues/61368")] - public static Task MarshalAsynchronousValueTaskIntDoesNotWorkYet() - { - return MarshalTaskReturningInt("AsynchronousValueTaskInt"); - } - - [Fact] - [ActiveIssue("https://github.com/dotnet/runtime/issues/61368")] - public static async Task MarshalFailedSynchronousValueTaskDoesNotWorkYet() - { - bool success = await MarshalTask("FailedSynchronousValueTask"); - Assert.False(success, "FailedSynchronousValueTask didn't failed."); - } - - [Fact] - [ActiveIssue("https://github.com/dotnet/runtime/issues/61368")] - public static async Task MarshalFailedAsynchronousValueTaskDoesNotWorkYet() - { - bool success = await MarshalTask("FailedAsynchronousValueTask"); - Assert.False(success, "FailedAsynchronousValueTask didn't failed."); - } } }