Remove duplicate tests from System.Linq.Parallel.Tests (#35838)
authorStephen Toub <stoub@microsoft.com>
Tue, 5 May 2020 17:22:46 +0000 (13:22 -0400)
committerGitHub <noreply@github.com>
Tue, 5 May 2020 17:22:46 +0000 (13:22 -0400)
src/libraries/System.Linq.Parallel/tests/ParallelEnumerableTests.cs

index eea02d8b45509aadab2fd5cd624fe5fa0e49ff0f..5b716a1bd86cbf892a0542251bd1f11b29052741 100644 (file)
@@ -39,7 +39,10 @@ namespace System.Linq.Parallel.Tests
                 {
                     foreach (int count in datapoints)
                     {
-                        yield return new object[] { start * sign, count };
+                        if (start != 0 || sign != -1) // don't yield a start*sign==0 twice
+                        {
+                            yield return new object[] { start * sign, count };
+                        }
                     }
                 }
             }
@@ -183,8 +186,7 @@ namespace System.Linq.Parallel.Tests
                     //yield return new object[] { (decimal)element, count };
                     yield return new object[] { "" + element, count };
                 }
-                yield return new object[] { (object)null, count };
-                yield return new object[] { (string)null, count };
+                yield return new object[] { null, count };
             }
         }