Skip to content

Commit c241fa1

Browse files
committed
Merge remote-tracking branch 'origin/master' into v1.3
2 parents 228213f + ad56a34 commit c241fa1

File tree

2 files changed

+4
-26
lines changed

2 files changed

+4
-26
lines changed

tests/FSharpPlus.Tests/FSharpPlus.Tests.fsproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
<FscToolExe>$(FSC_ExePathCompilerBuild)</FscToolExe>
66
</PropertyGroup>
77
<PropertyGroup>
8-
<TargetFrameworks>net7.0;net462</TargetFrameworks>
9-
<TargetFrameworks>net6.0</TargetFrameworks>
8+
<TargetFrameworks>net6.0;net462</TargetFrameworks>
109
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
1110
<LangVersion Condition=" '$(Configuration)' == 'Fable' OR '$(Configuration)' == 'Fable3' ">6.0</LangVersion>
1211
<IsPackable>false</IsPackable>

tests/FSharpPlus.Tests/ValueTask.fs

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,18 @@
11
namespace FSharpPlus.Tests
22

3-
#if NET7
3+
#if NETSTANDARD2_1
4+
45
module ValueTask =
56

67
open System
8+
open System.Threading
79
open System.Threading.Tasks
810
open NUnit.Framework
911
open FSharpPlus
1012
open FSharpPlus.Data
1113
open FSharpPlus.Tests.Helpers
1214

1315
exception TestException of string
14-
15-
16-
module ValueTask =
17-
18-
// Following is not available in F#6
19-
20-
/// <summary>Creates a <see cref="ValueTask{TResult}"/> that's completed successfully with the specified result.</summary>
21-
/// <typeparam name="TResult">The type of the result returned by the task.</typeparam>
22-
/// <param name="result">The result to store into the completed task.</param>
23-
/// <returns>The successfully completed task.</returns>
24-
let FromResult<'TResult> (result: 'TResult) = ValueTask<'TResult> result
25-
26-
/// <summary>Creates a <see cref="ValueTask{TResult}"/> that's completed exceptionally with the specified exception.</summary>
27-
/// <typeparam name="TResult">The type of the result returned by the task.</typeparam>
28-
/// <param name="exception">The exception with which to complete the task.</param>
29-
/// <returns>The faulted task.</returns>
30-
let FromException<'TResult> (``exception``: exn) = ValueTask<'TResult> (Task.FromException<'TResult> ``exception``)
31-
32-
/// <summary>Creates a <see cref="ValueTask{TResult}"/> that's completed due to cancellation with the specified token.</summary>
33-
/// <typeparam name="TResult">The type of the result returned by the task.</typeparam>
34-
/// <param name="cancellationToken">The token with which to complete the task.</param>
35-
/// <returns>The canceled task.</returns>
36-
let FromCanceled<'TResult> (cancellationToken: CancellationToken) = ValueTask<'TResult> (Task.FromCanceled<'TResult> cancellationToken)
3716

3817
module ValueTaskTests =
3918

0 commit comments

Comments
 (0)