Skip to content

Commit

Permalink
Fix some naming and test comments in TaskSeq.exists tests
Browse files Browse the repository at this point in the history
  • Loading branch information
abelbraaksma committed Mar 16, 2024
1 parent 3a951bd commit 30c751e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/FSharp.Control.TaskSeq.Test/TaskSeq.Exists.Tests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ module Immutable =

module SideEffects =
[<Theory; ClassData(typeof<TestSideEffectTaskSeq>)>]
let ``TaskSeq-exists KeyNotFoundException only sometimes for mutated state`` variant = task {
let ``TaskSeq-exists success only sometimes for mutated state`` variant = task {
let ts = Gen.getSeqWithSideEffect variant
let finder = (=) 11

Expand All @@ -100,7 +100,7 @@ module SideEffects =
}

[<Theory; ClassData(typeof<TestSideEffectTaskSeq>)>]
let ``TaskSeq-existsAsync KeyNotFoundException only sometimes for mutated state`` variant = task {
let ``TaskSeq-existsAsync success only sometimes for mutated state`` variant = task {
let ts = Gen.getSeqWithSideEffect variant
let finder x = task { return x = 11 }

Expand Down Expand Up @@ -201,7 +201,7 @@ module SideEffects =
found |> should be True
i |> should equal 0 // notice that it should be one higher if the statement after 'yield' is evaluated

// find some next item. We do get a new iterator, but mutable state is now starting at '1'
// find some next item. We do get a new iterator, but mutable state is now still starting at '0'
let! found = ts |> TaskSeq.exists ((=) 4)
found |> should be True
i |> should equal 4 // only partial evaluation!
Expand All @@ -221,7 +221,7 @@ module SideEffects =
found |> should be True
i |> should equal 0 // notice that it should be one higher if the statement after 'yield' is evaluated

// find some next item. We do get a new iterator, but mutable state is now starting at '1'
// find some next item. We do get a new iterator, but mutable state is now still starting at '0'
let! found = ts |> TaskSeq.existsAsync (fun x -> task { return x = 4 })
found |> should be True
i |> should equal 4 // only partial evaluation!
Expand Down

0 comments on commit 30c751e

Please sign in to comment.