@@ -306,11 +306,12 @@ type FlatListParallelTests () =
306306
307307 [<TestMethod>]
308308 member _. ``init throws for a negative count as Array.Parallel does`` () =
309- ExceptionAssert.same
310- id
311- ( fun () -> Array.Parallel.init - 1 id |> ignore)
312- ( fun () -> FlatList.Parallel.init - 1 id |> ignore)
309+ ExceptionAssert.Same (
310+ id,
311+ ( fun () -> Array.Parallel.init - 1 id |> ignore),
312+ ( fun () -> FlatList.Parallel.init - 1 id |> ignore),
313313 " FlatList.Parallel.init -1 must throw as Array.Parallel.init does"
314+ )
314315
315316 // ---- Search ----
316317
@@ -467,14 +468,15 @@ type FlatListParallelTests () =
467468
468469 [<TestMethod; DynamicData( nameof FlatListParallelTests.DifferentLengths) >]
469470 member _. ``zip throws for different lengths as Array.Parallel does`` ( first : int array , second : int array ) =
470- ExceptionAssert.same
471- id
472- ( fun () -> Array.Parallel.zip first second |> ignore)
471+ ExceptionAssert.Same (
472+ id,
473+ ( fun () -> Array.Parallel.zip first second |> ignore),
473474 ( fun () ->
474475 FlatList.Parallel.zip ( FlatList.ofArray first) ( FlatList.ofArray second)
475476 |> ignore
476- )
477+ ),
477478 " FlatList.Parallel.zip of flat lists of different lengths must throw as Array.Parallel.zip does"
479+ )
478480
479481 [<TestMethod; DynamicData( nameof FlatListParallelTests.ZipChunks) >]
480482 member _. ``zip divides every array length into chunks without overflow``
@@ -525,11 +527,12 @@ type FlatListParallelTests () =
525527
526528 [<TestMethod>]
527529 member _. ``average throws for an empty flat list as Array.Parallel does`` () =
528- ExceptionAssert.same
529- id
530- ( fun () -> Array.Parallel.average Array.empty< float> |> ignore)
531- ( fun () -> FlatList.Parallel.average FlatList.empty< float> |> ignore)
530+ ExceptionAssert.Same (
531+ id,
532+ ( fun () -> Array.Parallel.average Array.empty< float> |> ignore),
533+ ( fun () -> FlatList.Parallel.average FlatList.empty< float> |> ignore),
532534 " FlatList.Parallel.average of an empty flat list must throw as Array.Parallel.average does"
535+ )
533536
534537 [<TestMethod; DynamicData( nameof FlatListParallelTests.NonEmptyInputs) >]
535538 member _. ``averageBy returns the average of the projections`` ( input : ParallelInput ) =
@@ -543,14 +546,15 @@ type FlatListParallelTests () =
543546
544547 [<TestMethod>]
545548 member _. ``averageBy throws for an empty flat list as Array.Parallel does`` () =
546- ExceptionAssert.same
547- id
548- ( fun () -> Array.Parallel.averageBy float Array.empty< int> |> ignore)
549+ ExceptionAssert.Same (
550+ id,
551+ ( fun () -> Array.Parallel.averageBy float Array.empty< int> |> ignore),
549552 ( fun () ->
550553 FlatList.Parallel.averageBy float FlatList.empty< int>
551554 |> ignore
552- )
555+ ),
553556 " FlatList.Parallel.averageBy of an empty flat list must throw as Array.Parallel.averageBy does"
557+ )
554558
555559 [<TestMethod; DynamicData( nameof FlatListParallelTests.AllInputs) >]
556560 member _. ``iter visits every element once`` ( input : ParallelInput ) =
@@ -589,11 +593,12 @@ type FlatListParallelTests () =
589593
590594 [<TestMethod>]
591595 member _. ``max throws for an empty flat list as Array.Parallel does`` () =
592- ExceptionAssert.same
593- id
594- ( fun () -> Array.Parallel.max Array.empty< int> |> ignore)
595- ( fun () -> FlatList.Parallel.max FlatList.empty< int> |> ignore)
596+ ExceptionAssert.Same (
597+ id,
598+ ( fun () -> Array.Parallel.max Array.empty< int> |> ignore),
599+ ( fun () -> FlatList.Parallel.max FlatList.empty< int> |> ignore),
596600 " FlatList.Parallel.max of an empty flat list must throw as Array.Parallel.max does"
601+ )
597602
598603 [<TestMethod; DynamicData( nameof FlatListParallelTests.NonEmptyInputs) >]
599604 member _. ``maxBy returns the element with the greatest projection`` ( input : ParallelInput ) =
@@ -618,11 +623,12 @@ type FlatListParallelTests () =
618623
619624 [<TestMethod>]
620625 member _. ``maxBy throws for an empty flat list as Array.Parallel does`` () =
621- ExceptionAssert.same
622- id
623- ( fun () -> Array.Parallel.maxBy abs Array.empty< int> |> ignore)
624- ( fun () -> FlatList.Parallel.maxBy abs FlatList.empty< int> |> ignore)
626+ ExceptionAssert.Same (
627+ id,
628+ ( fun () -> Array.Parallel.maxBy abs Array.empty< int> |> ignore),
629+ ( fun () -> FlatList.Parallel.maxBy abs FlatList.empty< int> |> ignore),
625630 " FlatList.Parallel.maxBy of an empty flat list must throw as Array.Parallel.maxBy does"
631+ )
626632
627633 [<TestMethod; DynamicData( nameof FlatListParallelTests.NonEmptyInputs) >]
628634 member _. ``min returns the smallest element`` ( input : ParallelInput ) =
@@ -635,11 +641,12 @@ type FlatListParallelTests () =
635641
636642 [<TestMethod>]
637643 member _. ``min throws for an empty flat list as Array.Parallel does`` () =
638- ExceptionAssert.same
639- id
640- ( fun () -> Array.Parallel.min Array.empty< int> |> ignore)
641- ( fun () -> FlatList.Parallel.min FlatList.empty< int> |> ignore)
644+ ExceptionAssert.Same (
645+ id,
646+ ( fun () -> Array.Parallel.min Array.empty< int> |> ignore),
647+ ( fun () -> FlatList.Parallel.min FlatList.empty< int> |> ignore),
642648 " FlatList.Parallel.min of an empty flat list must throw as Array.Parallel.min does"
649+ )
643650
644651 [<TestMethod; DynamicData( nameof FlatListParallelTests.NonEmptyInputs) >]
645652 member _. ``minBy returns the element with the smallest projection`` ( input : ParallelInput ) =
@@ -664,11 +671,12 @@ type FlatListParallelTests () =
664671
665672 [<TestMethod>]
666673 member _. ``minBy throws for an empty flat list as Array.Parallel does`` () =
667- ExceptionAssert.same
668- id
669- ( fun () -> Array.Parallel.minBy abs Array.empty< int> |> ignore)
670- ( fun () -> FlatList.Parallel.minBy abs FlatList.empty< int> |> ignore)
674+ ExceptionAssert.Same (
675+ id,
676+ ( fun () -> Array.Parallel.minBy abs Array.empty< int> |> ignore),
677+ ( fun () -> FlatList.Parallel.minBy abs FlatList.empty< int> |> ignore),
671678 " FlatList.Parallel.minBy of an empty flat list must throw as Array.Parallel.minBy does"
679+ )
672680
673681 [<TestMethod; DynamicData( nameof FlatListParallelTests.NonEmptyInputs) >]
674682 member _. ``reduce combines the elements as the sequential reduce does for an associative and commutative function``
@@ -684,11 +692,12 @@ type FlatListParallelTests () =
684692
685693 [<TestMethod>]
686694 member _. ``reduce throws for an empty flat list as Array.Parallel does`` () =
687- ExceptionAssert.same
688- id
689- ( fun () -> Array.Parallel.reduce (+) Array.empty< int> |> ignore)
690- ( fun () -> FlatList.Parallel.reduce (+) FlatList.empty< int> |> ignore)
695+ ExceptionAssert.Same (
696+ id,
697+ ( fun () -> Array.Parallel.reduce (+) Array.empty< int> |> ignore),
698+ ( fun () -> FlatList.Parallel.reduce (+) FlatList.empty< int> |> ignore),
691699 " FlatList.Parallel.reduce of an empty flat list must throw as Array.Parallel.reduce does"
700+ )
692701
693702 [<TestMethod; DynamicData( nameof FlatListParallelTests.NonEmptyInputs) >]
694703 member _. ``reduceBy combines the projections as Array.Parallel does`` ( input : ParallelInput ) =
@@ -710,14 +719,15 @@ type FlatListParallelTests () =
710719
711720 [<TestMethod>]
712721 member _. ``reduceBy throws for an empty flat list as Array.Parallel does`` () =
713- ExceptionAssert.same
714- id
715- ( fun () -> Array.Parallel.reduceBy abs (+) Array.empty< int> |> ignore)
722+ ExceptionAssert.Same (
723+ id,
724+ ( fun () -> Array.Parallel.reduceBy abs (+) Array.empty< int> |> ignore),
716725 ( fun () ->
717726 FlatList.Parallel.reduceBy abs (+) FlatList.empty< int>
718727 |> ignore
719- )
728+ ),
720729 " FlatList.Parallel.reduceBy of an empty flat list must throw as Array.Parallel.reduceBy does"
730+ )
721731
722732 [<TestMethod; DynamicData( nameof FlatListParallelTests.AllInputs) >]
723733 member _. ``sum adds the elements`` ( input : ParallelInput ) =
@@ -900,7 +910,7 @@ type FlatListParallelTests () =
900910 [<TestMethod; DynamicData( nameof FlatListParallelTests.ArrayRejections) >]
901911 member _. ``functions reject a default flat list as Array.Parallel rejects a null array`` ( name : string ) =
902912 let struct ( oracle , actual ) = arrayRejections[ name]
903- ExceptionAssert.same id oracle actual $" FlatList.Parallel.%s {name} must reject a default flat list"
913+ ExceptionAssert.Same ( id , oracle, actual, $" FlatList.Parallel.%s {name} must reject a default flat list" )
904914
905915 [<TestMethod; DynamicData( nameof FlatListParallelTests.Dereferences) >]
906916 member _. ``sum and sumBy reject a default flat list where Array.Parallel dereferences a null array`` ( name : string ) =
0 commit comments