Skip to content

Commit

Permalink
+ Failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
gusty committed Nov 23, 2023
1 parent 1a5e595 commit 525ec2f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/FSharpPlus.Tests/ValueTask.fs
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,12 @@ module ValueTask =
let r09 = ValueTask.bind (binding true) (x1 ())
r09.AsTask().Exception.InnerExceptions |> areEquivalent [TestException "I was told to fail"]

[<Test>]
let applyValueTask () =
let e1 () = createValueTask false 1
let applyingPlus1 () = ValueTask.FromResult<_> (fun x -> 1+x)
let v1 = ValueTask.apply (applyingPlus1 ()) (e1 ())
areEqual v1.Result 2
let v2 = (applyingPlus1 ()) <*> (e1 ())
areEqual v2.Result 2

0 comments on commit 525ec2f

Please sign in to comment.