You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assert.AreEqual (true, Async.AsTaskAndWait(t13).IsFaulted,"Async.zip(3) between a value, an exception and a cancellation -> exception wins.")
65
-
letac2= Async.AsTaskAndWait(t13).Exception.InnerExceptions |> Seq.map (fun x ->int (Char.GetNumericValue x.Message.[35]))
67
+
letac2= Async.AsTaskAndWait(t13).Exception.InnerExceptions |> Seq.map (fun x ->x.Data["key"]:?> int)
66
68
CollectionAssert.AreEquivalent ([1;3], ac2,"Async.zip between 2 exceptions => both exceptions returned, even after combining with cancellation and values.")
67
69
68
70
[<Test>]
@@ -84,15 +86,15 @@ module Async =
84
86
lett12123= Async.zip3 t12t12 t33 t4
85
87
letac1=
86
88
try
87
-
Async.AsTaskAndWait(t12123).Exception.InnerExceptions |> Seq.map (fun x ->int (Char.GetNumericValue x.Message.[35]))
89
+
Async.AsTaskAndWait(t12123).Exception.InnerExceptions |> Seq.map (fun x ->x.Data["key"]:?> int)
88
90
with e ->
89
91
failwithf "Failure in testAsyncZipAsync. Async status is %A . Exception is %A"(Async.AsTaskAndWait t12123).Status e
90
92
91
93
CollectionAssert.AreEquivalent ([1;2;1;2;3], ac1,"Async.zip(3)Async should add only non already existing exceptions.")
Assert.AreEqual (true, Async.AsTaskAndWait(t13).IsFaulted,"Async.zip(3)Async between a value, an exception and a cancellation -> exception wins.")
95
-
letac2= Async.AsTaskAndWait(t13).Exception.InnerExceptions |> Seq.map (fun x ->int (Char.GetNumericValue x.Message.[35]))
97
+
letac2= Async.AsTaskAndWait(t13).Exception.InnerExceptions |> Seq.map (fun x ->x.Data["key"]:?> int)
96
98
CollectionAssert.AreEquivalent ([1;3], ac2,"Async.zipAsync between 2 exceptions => both exceptions returned, even after combining with cancellation and values.")
0 commit comments