Skip to content

Commit 7ef27a3

Browse files
committed
update tests
1 parent f27a573 commit 7ef27a3

File tree

1 file changed

+22
-34
lines changed

1 file changed

+22
-34
lines changed

tests/FSharp.Compiler.ComponentTests/Language/UseBangBindingsTests.fs

+22-34
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,9 @@ let main _ =
6666
|> shouldSucceed
6767
|> run
6868
|> shouldSucceed
69-
|> withOutputContainsAllInOrder [
70-
"disposed 1"
71-
"disposed 3"
72-
"disposed 2"
73-
]
69+
|> withStdOutContains "disposed 1"
70+
|> withStdOutContains "disposed 2"
71+
|> withStdOutContains "disposed 3"
7472

7573
[<Fact>]
7674
let ``Both named and discard patterns in custom computation expression use! binding`` () =
@@ -125,10 +123,8 @@ let main _ =
125123
|> shouldSucceed
126124
|> run
127125
|> shouldSucceed
128-
|> withOutputContainsAllInOrder [
129-
"Counter with value 4 disposed"
130-
"Counter with value 5 disposed"
131-
]
126+
|> withStdOutContains "Counter with value 4 disposed"
127+
|> withStdOutContains "Counter with value 5 disposed"
132128

133129
module UseBangBindingsPreviewTests =
134130
[<Fact>]
@@ -171,16 +167,14 @@ let main _ =
171167
|> shouldSucceed
172168
|> run
173169
|> shouldSucceed
174-
|> withOutputContainsAllInOrder [
175-
"Starting async workflow"
176-
"Created counter with value 5"
177-
"Created counter with value 4"
178-
"Created counter with value 3"
179-
"Done using the resource"
180-
"Counter with value 3 disposed"
181-
"Counter with value 4 disposed"
182-
"Counter with value 5 disposed"
183-
]
170+
|> withStdOutContains "Starting async workflow"
171+
|> withStdOutContains "Created counter with value 5"
172+
|> withStdOutContains "Created counter with value 4"
173+
|> withStdOutContains "Created counter with value 3"
174+
|> withStdOutContains "Done using the resource"
175+
|> withStdOutContains "Counter with value 3 disposed"
176+
|> withStdOutContains "Counter with value 4 disposed"
177+
|> withStdOutContains "Counter with value 5 disposed"
184178

185179
[<Fact>]
186180
let ``Discard pattern allowed in async use! binding 2`` () =
@@ -210,12 +204,10 @@ let main _ =
210204
|> shouldSucceed
211205
|> run
212206
|> shouldSucceed
213-
|> withOutputContainsAllInOrder [
214-
"disposed 1"
215-
"disposed 4"
216-
"disposed 3"
217-
"disposed 2"
218-
]
207+
|> withStdOutContains "disposed 1"
208+
|> withStdOutContains "disposed 2"
209+
|> withStdOutContains "disposed 3"
210+
|> withStdOutContains "disposed 4"
219211

220212
[<Fact>]
221213
let ``Both named and discard patterns in custom computation expression use! binding`` () =
@@ -271,11 +263,9 @@ let main _ =
271263
|> shouldSucceed
272264
|> run
273265
|> shouldSucceed
274-
|> withOutputContainsAllInOrder [
275-
"Counter with value 3 disposed"
276-
"Counter with value 4 disposed"
277-
"Counter with value 5 disposed"
278-
]
266+
|> withStdOutContains "Counter with value 3 disposed"
267+
|> withStdOutContains "Counter with value 4 disposed"
268+
|> withStdOutContains "Counter with value 5 disposed"
279269

280270
[<Fact>]
281271
let ``Discard patterns are allowed in use and use! binding`` () =
@@ -330,7 +320,5 @@ let main _ =
330320
|> shouldSucceed
331321
|> run
332322
|> shouldSucceed
333-
|> withOutputContainsAllInOrder [
334-
"Counter with value 2 disposed"
335-
"disposed 1"
336-
]
323+
|> withStdOutContains "disposed 1"
324+
|> withStdOutContains "Counter with value 2 disposed"

0 commit comments

Comments
 (0)