{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/corefx/pulls/comments/31514012","id":31514012,"diff_hunk":"@@ -0,0 +1,1523 @@\n+// Copyright (c) Microsoft. All rights reserved.\n+// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n+\n+using System;\n+using System.Linq;\n+using Xunit;\n+\n+namespace Test\n+{\n+    [Trait(\"category\", \"outerloop\")]\n+    public partial class ParallelQueryCombinationTests\n+    {\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void Aggregate(LabelledOperation source, LabelledOperation operation)\n+        {\n+            Assert.Equal(Functions.SumRange(defaultStart, defaultSize),\n+                operation.Item(defaultStart, defaultSize, source.Item).Aggregate((x, y) => x + y));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void Aggregate_Seed(LabelledOperation source, LabelledOperation operation)\n+        {\n+            Assert.Equal(Functions.SumRange(defaultStart, defaultSize),\n+                operation.Item(defaultStart, defaultSize, source.Item).Aggregate(0, (x, y) => x + y));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void Aggregate_Result(LabelledOperation source, LabelledOperation operation)\n+        {\n+            Assert.Equal(Functions.SumRange(defaultStart, defaultSize) + 17,\n+                operation.Item(defaultStart, defaultSize, source.Item).Aggregate(0, (x, y) => x + y, r => r + 17));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void Aggregate_Accumulator(LabelledOperation source, LabelledOperation operation)\n+        {\n+            Assert.Equal(Functions.SumRange(defaultStart, defaultSize) + 17,\n+                operation.Item(defaultStart, defaultSize, source.Item).Aggregate(0, (a, x) => a + x, (l, r) => l + r, r => r + 17));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void Aggregate_SeedFactory(LabelledOperation source, LabelledOperation operation)\n+        {\n+            Assert.Equal(Functions.SumRange(defaultStart, defaultSize) + 17,\n+                operation.Item(defaultStart, defaultSize, source.Item).Aggregate(() => 0, (a, x) => a + x, (l, r) => l + r, r => r + 17));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryFailingOperators\")]\n+        [MemberData(\"BinaryFailingOperators\")]\n+        public static void Aggregate_AggregateException(LabelledOperation source, LabelledOperation operation)\n+        {\n+            AggregateException ae = Assert.Throws<AggregateException>(() => operation.Item(defaultStart, defaultSize, source.Item).Aggregate((x, y) => x));\n+            Assert.All(ae.InnerExceptions, e => Assert.IsType<DeliberateTestException>(e));\n+\n+            ae = Assert.Throws<AggregateException>(() => operation.Item(defaultStart, defaultSize, source.Item).Aggregate(0, (x, y) => x + y));\n+            Assert.All(ae.InnerExceptions, e => Assert.IsType<DeliberateTestException>(e));\n+\n+            ae = Assert.Throws<AggregateException>(() => operation.Item(defaultStart, defaultSize, source.Item).Aggregate(0, (x, y) => x + y, r => r));\n+            Assert.All(ae.InnerExceptions, e => Assert.IsType<DeliberateTestException>(e));\n+\n+            ae = Assert.Throws<AggregateException>(() => operation.Item(defaultStart, defaultSize, source.Item).Aggregate(0, (a, x) => a + x, (l, r) => l + r, r => r));\n+            Assert.All(ae.InnerExceptions, e => Assert.IsType<DeliberateTestException>(e));\n+\n+            ae = Assert.Throws<AggregateException>(() => operation.Item(defaultStart, defaultSize, source.Item).Aggregate(() => 0, (a, x) => a + x, (l, r) => l + r, r => r));\n+            Assert.All(ae.InnerExceptions, e => Assert.IsType<DeliberateTestException>(e));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void All_False(LabelledOperation source, LabelledOperation operation)\n+        {\n+            Assert.False(operation.Item(defaultStart, defaultSize, source.Item).All(x => false));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void All_True(LabelledOperation source, LabelledOperation operation)\n+        {\n+            IntegerRangeSet seen = new IntegerRangeSet(defaultStart, defaultSize);\n+            Assert.True(operation.Item(defaultStart, defaultSize, source.Item).All(x => seen.Add(x)));\n+            Assert.True(seen.Complete());\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryFailingOperators\")]\n+        [MemberData(\"BinaryFailingOperators\")]\n+        public static void All_AggregateException(LabelledOperation source, LabelledOperation operation)\n+        {\n+            AggregateException ae = Assert.Throws<AggregateException>(() => operation.Item(defaultStart, defaultSize, source.Item).All(x => true));\n+            Assert.All(ae.InnerExceptions, e => Assert.IsType<DeliberateTestException>(e));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void Any_False(LabelledOperation source, LabelledOperation operation)\n+        {\n+            IntegerRangeSet seen = new IntegerRangeSet(defaultStart, defaultSize);\n+            Assert.False(operation.Item(defaultStart, defaultSize, source.Item).Any(x => !seen.Add(x)));\n+            Assert.True(seen.Complete());\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void Any_True(LabelledOperation source, LabelledOperation operation)\n+        {\n+            Assert.True(operation.Item(defaultStart, defaultSize, source.Item).Any(x => true));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryFailingOperators\")]\n+        [MemberData(\"BinaryFailingOperators\")]\n+        public static void Any_AggregateException(LabelledOperation source, LabelledOperation operation)\n+        {\n+            AggregateException ae = Assert.Throws<AggregateException>(() => operation.Item(defaultStart, defaultSize, source.Item).Any(x => false));\n+            Assert.All(ae.InnerExceptions, e => Assert.IsType<DeliberateTestException>(e));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void Average(LabelledOperation source, LabelledOperation operation)\n+        {\n+            Assert.Equal(Functions.SumRange(defaultStart, defaultSize) / (double)defaultSize,\n+                operation.Item(defaultStart, defaultSize, source.Item).Average());\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void Average_Nullable(LabelledOperation source, LabelledOperation operation)\n+        {\n+            Assert.Equal(Functions.SumRange(defaultStart, defaultSize) / (double?)defaultSize,\n+                operation.Item(defaultStart, defaultSize, source.Item).Average(x => (int?)x));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryFailingOperators\")]\n+        [MemberData(\"BinaryFailingOperators\")]\n+        public static void Average_AggregateException(LabelledOperation source, LabelledOperation operation)\n+        {\n+            AggregateException ae = Assert.Throws<AggregateException>(() => operation.Item(defaultStart, defaultSize, source.Item).Average());\n+            Assert.All(ae.InnerExceptions, e => Assert.IsType<DeliberateTestException>(e));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void Cast(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = defaultStart;\n+            foreach (int? i in operation.Item(defaultStart, defaultSize, source.Item).Cast<int?>())\n+            {\n+                Assert.True(i.HasValue);\n+                Assert.Equal(seen++, i.Value);\n+            }\n+            Assert.Equal(defaultStart + defaultSize, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void Cast_NotPipelined(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = defaultStart;\n+            Assert.All(operation.Item(defaultStart, defaultSize, source.Item).Cast<int?>().ToList(), x => Assert.Equal(seen++, x));\n+            Assert.Equal(defaultStart + defaultSize, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void Contains_True(LabelledOperation source, LabelledOperation operation)\n+        {\n+            Assert.True(operation.Item(defaultStart, defaultSize, source.Item).Contains(defaultStart + defaultSize / 2));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void Contains_False(LabelledOperation source, LabelledOperation operation)\n+        {\n+            Assert.False(operation.Item(defaultStart, defaultSize, source.Item).Contains(defaultStart + defaultSize));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryFailingOperators\")]\n+        [MemberData(\"BinaryFailingOperators\")]\n+        public static void Contains_AggregateException(LabelledOperation source, LabelledOperation operation)\n+        {\n+            AggregateException ae = Assert.Throws<AggregateException>(() => operation.Item(defaultStart, defaultSize, source.Item).Contains(defaultStart + defaultSize));\n+            Assert.All(ae.InnerExceptions, e => Assert.IsType<DeliberateTestException>(e));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void Count_Elements(LabelledOperation source, LabelledOperation operation)\n+        {\n+            Assert.Equal(defaultSize, operation.Item(defaultStart, defaultSize, source.Item).Count());\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void Count_Predicate_Some(LabelledOperation source, LabelledOperation operation)\n+        {\n+            Assert.Equal(defaultSize / 2, operation.Item(defaultStart, defaultSize, source.Item).Count(x => x < defaultStart + defaultSize / 2));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void Count_Predicate_None(LabelledOperation source, LabelledOperation operation)\n+        {\n+            Assert.Equal(0, operation.Item(defaultStart, defaultSize, source.Item).Count(x => x < defaultStart));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryFailingOperators\")]\n+        [MemberData(\"BinaryFailingOperators\")]\n+        public static void Count_AggregateException(LabelledOperation source, LabelledOperation operation)\n+        {\n+            AggregateException ae = Assert.Throws<AggregateException>(() => operation.Item(defaultStart, defaultSize, source.Item).Count());\n+            Assert.All(ae.InnerExceptions, e => Assert.IsType<DeliberateTestException>(e));\n+\n+            ae = Assert.Throws<AggregateException>(() => operation.Item(defaultStart, defaultSize, source.Item).Count(x => true));\n+            Assert.All(ae.InnerExceptions, e => Assert.IsType<DeliberateTestException>(e));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void DefaultIfEmpty(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = defaultStart;\n+            foreach (int i in operation.Item(defaultStart, defaultSize, source.Item).DefaultIfEmpty())\n+            {\n+                Assert.Equal(seen++, i);\n+            }\n+            Assert.Equal(defaultStart + defaultSize, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void DefaultIfEmpty_NotPipelined(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = defaultStart;\n+            Assert.All(operation.Item(defaultStart, defaultSize, source.Item).DefaultIfEmpty().ToList(), x => Assert.Equal(seen++, x));\n+            Assert.Equal(defaultStart + defaultSize, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void Distinct(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = defaultStart;\n+            ParallelQuery<int> query = operation.Item(defaultStart * 2, defaultSize * 2, source.Item).Select(x => x / 2).Distinct();\n+            foreach (int i in query)\n+            {\n+                Assert.Equal(seen++, i);\n+            }\n+            Assert.Equal(defaultStart + defaultSize, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void Distinct_NotPipelined(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = defaultStart;\n+            ParallelQuery<int> query = operation.Item(defaultStart * 2, defaultSize * 2, source.Item).Select(x => x / 2).Distinct();\n+            Assert.All(query.ToList(), x => Assert.Equal(seen++, x));\n+            Assert.Equal(defaultStart + defaultSize, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void ElementAt(LabelledOperation source, LabelledOperation operation)\n+        {\n+            ParallelQuery<int> query = operation.Item(defaultStart, defaultSize, source.Item);\n+\n+            int seen = defaultStart;\n+            for (int i = 0; i < defaultSize; i++)\n+            {\n+                Assert.Equal(seen++, query.ElementAt(i));\n+            }\n+            Assert.Equal(defaultStart + defaultSize, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryFailingOperators\")]\n+        [MemberData(\"BinaryFailingOperators\")]\n+        public static void ElementAt_AggregateException(LabelledOperation source, LabelledOperation operation)\n+        {\n+            AggregateException ae = Assert.Throws<AggregateException>(() => operation.Item(defaultStart, defaultSize, source.Item).ElementAt(defaultSize - 1));\n+            Assert.All(ae.InnerExceptions, e => Assert.IsType<DeliberateTestException>(e));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void ElementAtOrDefault(LabelledOperation source, LabelledOperation operation)\n+        {\n+            ParallelQuery<int> query = operation.Item(defaultStart, defaultSize, source.Item);\n+\n+            int seen = defaultStart;\n+            for (int i = 0; i < defaultSize; i++)\n+            {\n+                Assert.Equal(seen++, query.ElementAtOrDefault(i));\n+            }\n+            Assert.Equal(defaultStart + defaultSize, seen);\n+            Assert.Equal(default(int), query.ElementAtOrDefault(-1));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryFailingOperators\")]\n+        [MemberData(\"BinaryFailingOperators\")]\n+        public static void ElementAtOrDefault_AggregateException(LabelledOperation source, LabelledOperation operation)\n+        {\n+            AggregateException ae = Assert.Throws<AggregateException>(() => operation.Item(defaultStart, defaultSize, source.Item).ElementAtOrDefault(defaultSize - 1));\n+            Assert.All(ae.InnerExceptions, e => Assert.IsType<DeliberateTestException>(e));\n+\n+            ae = Assert.Throws<AggregateException>(() => operation.Item(defaultStart, defaultSize, source.Item).ElementAtOrDefault(defaultSize + 1));\n+            Assert.All(ae.InnerExceptions, e => Assert.IsType<DeliberateTestException>(e));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void Except(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = defaultStart;\n+            ParallelQuery<int> query = operation.Item(defaultStart, defaultSize + defaultSize / 2, source.Item)\n+                .Except(operation.Item(defaultStart + defaultSize, defaultSize, source.Item));\n+            foreach (int i in query)\n+            {\n+                Assert.Equal(seen++, i);\n+            }\n+            Assert.Equal(defaultStart + defaultSize, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void Except_NotPipelined(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = defaultStart;\n+            ParallelQuery<int> query = operation.Item(defaultStart, defaultSize + defaultSize / 2, source.Item)\n+                .Except(operation.Item(defaultStart + defaultSize, defaultSize, source.Item));\n+            Assert.All(query.ToList(), x => Assert.Equal(seen++, x));\n+            Assert.Equal(defaultStart + defaultSize, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void First(LabelledOperation source, LabelledOperation operation)\n+        {\n+            Assert.Equal(defaultStart, operation.Item(defaultStart, defaultSize, source.Item).First());\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void First_Predicate(LabelledOperation source, LabelledOperation operation)\n+        {\n+            Assert.Equal(defaultStart + defaultSize / 2, operation.Item(defaultStart, defaultSize, source.Item).First(x => x >= defaultStart + defaultSize / 2));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void First_Predicate_None(LabelledOperation source, LabelledOperation operation)\n+        {\n+            Assert.Throws<InvalidOperationException>(() => operation.Item(defaultStart, defaultSize, source.Item).First(x => false));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryFailingOperators\")]\n+        [MemberData(\"BinaryFailingOperators\")]\n+        public static void First_AggregateException(LabelledOperation source, LabelledOperation operation)\n+        {\n+            AggregateException ae = null;\n+            // Concat seems able to return the first element when the left query does not fail (\"first\" query).\n+            // This test might be flaky in the case that it decides to run the right query too...\n+            if (operation.ToString().Contains(\"Concat-Left\"))\n+            {\n+                Assert.InRange(operation.Item(defaultStart, defaultSize, source.Item).First(), defaultStart, defaultStart + defaultSize);\n+            }\n+            else\n+            {\n+                ae = Assert.Throws<AggregateException>(() => operation.Item(defaultStart, defaultSize, source.Item).First());\n+                Assert.All(ae.InnerExceptions, e => Assert.IsType<DeliberateTestException>(e));\n+            }\n+\n+            ae = Assert.Throws<AggregateException>(() => operation.Item(defaultStart, defaultSize, source.Item).First(x => false));\n+            Assert.All(ae.InnerExceptions, e => Assert.IsType<DeliberateTestException>(e));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void FirstOrDefault(LabelledOperation source, LabelledOperation operation)\n+        {\n+            Assert.Equal(defaultStart, operation.Item(defaultStart, defaultSize, source.Item).FirstOrDefault());\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void FirstOrDefault_Predicate(LabelledOperation source, LabelledOperation operation)\n+        {\n+            Assert.Equal(defaultStart + defaultSize / 2, operation.Item(defaultStart, defaultSize, source.Item).FirstOrDefault(x => x >= defaultStart + defaultSize / 2));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void FirstOrDefault_Predicate_None(LabelledOperation source, LabelledOperation operation)\n+        {\n+            Assert.Equal(default(int), operation.Item(defaultStart, defaultSize, source.Item).FirstOrDefault(x => false));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryFailingOperators\")]\n+        [MemberData(\"BinaryFailingOperators\")]\n+        public static void FirstOrDefault_AggregateException(LabelledOperation source, LabelledOperation operation)\n+        {\n+            AggregateException ae = null;\n+            // Concat seems able to return the first element when the left query does not fail (\"first\" query).\n+            // This test might be flaky in the case that it decides to run the right query too...\n+            if (operation.ToString().Contains(\"Concat-Left\"))\n+            {\n+                Assert.InRange(operation.Item(defaultStart, defaultSize, source.Item).FirstOrDefault(), defaultStart, defaultStart + defaultSize);\n+            }\n+            else\n+            {\n+                ae = Assert.Throws<AggregateException>(() => operation.Item(defaultStart, defaultSize, source.Item).FirstOrDefault());\n+                Assert.All(ae.InnerExceptions, e => Assert.IsType<DeliberateTestException>(e));\n+            }\n+\n+            ae = Assert.Throws<AggregateException>(() => operation.Item(defaultStart, defaultSize, source.Item).FirstOrDefault(x => false));\n+            Assert.All(ae.InnerExceptions, e => Assert.IsType<DeliberateTestException>(e));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void ForAll(LabelledOperation source, LabelledOperation operation)\n+        {\n+            IntegerRangeSet seen = new IntegerRangeSet(defaultStart, defaultSize);\n+            operation.Item(defaultStart, defaultSize, source.Item).ForAll(x => seen.Add(x));\n+            Assert.True(seen.Complete());\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryFailingOperators\")]\n+        [MemberData(\"BinaryFailingOperators\")]\n+        public static void ForAll_AggregateException(LabelledOperation source, LabelledOperation operation)\n+        {\n+            AggregateException ae = Assert.Throws<AggregateException>(() => operation.Item(defaultStart, defaultSize, source.Item).ForAll(x => { }));\n+            Assert.All(ae.InnerExceptions, e => Assert.IsType<DeliberateTestException>(e));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void GroupBy(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seenKey = defaultStart / 8;\n+            foreach (IGrouping<int, int> group in operation.Item(defaultStart, defaultSize, source.Item).GroupBy(x => x / 8))\n+            {\n+                Assert.Equal(seenKey++, group.Key);\n+                int seenElement = group.Key * 8;\n+                Assert.All(group, x => Assert.Equal(seenElement++, x));\n+                Assert.Equal(Math.Min((group.Key + 1) * 8, defaultStart + defaultSize), seenElement);\n+            }\n+            Assert.Equal((defaultSize + 7) / 8 + 1, seenKey);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void GroupBy_NotPipelined(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seenKey = defaultStart / 8;\n+            foreach (IGrouping<int, int> group in operation.Item(defaultStart, defaultSize, source.Item).GroupBy(x => x / 8).ToList())\n+            {\n+                Assert.Equal(seenKey++, group.Key);\n+                int seenElement = group.Key * 8;\n+                Assert.All(group, x => Assert.Equal(seenElement++, x));\n+                Assert.Equal(Math.Min((group.Key + 1) * 8, defaultStart + defaultSize), seenElement);\n+            }\n+            Assert.Equal((defaultSize + 7) / 8 + 1, seenKey);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void GroupBy_ElementSelector(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seenKey = defaultStart / 8;\n+            foreach (IGrouping<int, int> group in operation.Item(defaultStart, defaultSize, source.Item).GroupBy(x => x / 8, y => -y))\n+            {\n+                Assert.Equal(seenKey++, group.Key);\n+                int seenElement = -group.Key * 8;\n+                Assert.All(group, x => Assert.Equal(seenElement--, x));\n+                Assert.Equal(-Math.Min((group.Key + 1) * 8, defaultStart + defaultSize), seenElement);\n+            }\n+            Assert.Equal((defaultSize + 7) / 8 + 1, seenKey);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void GroupBy_ElementSelector_NotPipelined(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seenKey = defaultStart / 8;\n+            foreach (IGrouping<int, int> group in operation.Item(defaultStart, defaultSize, source.Item).GroupBy(x => x / 8, y => -y).ToList())\n+            {\n+                Assert.Equal(seenKey++, group.Key);\n+                int seenElement = -group.Key * 8;\n+                Assert.All(group, x => Assert.Equal(seenElement--, x));\n+                Assert.Equal(-Math.Min((group.Key + 1) * 8, defaultStart + defaultSize), seenElement);\n+            }\n+            Assert.Equal((defaultSize + 7) / 8 + 1, seenKey);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void Intersect(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = defaultStart;\n+            ParallelQuery<int> query = operation.Item(defaultStart - defaultSize / 2, defaultSize + defaultSize / 2, source.Item)\n+                .Intersect(operation.Item(defaultStart, defaultSize + defaultSize / 2, source.Item));\n+            foreach (int i in query)\n+            {\n+                Assert.Equal(seen++, i);\n+            }\n+            Assert.Equal(defaultStart + defaultSize, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void Intersect_NotPipelined(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = defaultStart;\n+            ParallelQuery<int> query = operation.Item(defaultStart - defaultSize / 2, defaultSize + defaultSize / 2, source.Item)\n+                .Intersect(operation.Item(defaultStart, defaultSize + defaultSize / 2, source.Item));\n+            Assert.All(query.ToList(), x => Assert.Equal(seen++, x));\n+            Assert.Equal(defaultStart + defaultSize, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void Last(LabelledOperation source, LabelledOperation operation)\n+        {\n+            Assert.Equal(defaultStart + defaultSize - 1, operation.Item(defaultStart, defaultSize, source.Item).Last());\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void Last_Predicate(LabelledOperation source, LabelledOperation operation)\n+        {\n+            Assert.Equal(defaultStart + defaultSize / 2 - 1, operation.Item(defaultStart, defaultSize, source.Item).Last(x => x < defaultStart + defaultSize / 2));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void Last_Predicate_None(LabelledOperation source, LabelledOperation operation)\n+        {\n+            Assert.Throws<InvalidOperationException>(() => operation.Item(defaultStart, defaultSize, source.Item).Last(x => false));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryFailingOperators\")]\n+        [MemberData(\"BinaryFailingOperators\")]\n+        public static void Last_AggregateException(LabelledOperation source, LabelledOperation operation)\n+        {\n+            AggregateException ae = Assert.Throws<AggregateException>(() => operation.Item(defaultStart, defaultSize, source.Item).Last());\n+            Assert.All(ae.InnerExceptions, e => Assert.IsType<DeliberateTestException>(e));\n+\n+            ae = Assert.Throws<AggregateException>(() => operation.Item(defaultStart, defaultSize, source.Item).Last(x => true));\n+            Assert.All(ae.InnerExceptions, e => Assert.IsType<DeliberateTestException>(e));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void LastOrDefault(LabelledOperation source, LabelledOperation operation)\n+        {\n+            Assert.Equal(defaultStart + defaultSize - 1, operation.Item(defaultStart, defaultSize, source.Item).LastOrDefault());\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void LastOrDefault_Predicate(LabelledOperation source, LabelledOperation operation)\n+        {\n+            Assert.Equal(defaultStart + defaultSize / 2 - 1, operation.Item(defaultStart, defaultSize, source.Item).LastOrDefault(x => x < defaultStart + defaultSize / 2));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void LastOrDefault_Predicate_None(LabelledOperation source, LabelledOperation operation)\n+        {\n+            Assert.Equal(default(int), operation.Item(defaultStart, defaultSize, source.Item).LastOrDefault(x => false));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryFailingOperators\")]\n+        [MemberData(\"BinaryFailingOperators\")]\n+        public static void LastOrDefault_AggregateException(LabelledOperation source, LabelledOperation operation)\n+        {\n+            AggregateException ae = Assert.Throws<AggregateException>(() => operation.Item(defaultStart, defaultSize, source.Item).LastOrDefault());\n+            Assert.All(ae.InnerExceptions, e => Assert.IsType<DeliberateTestException>(e));\n+\n+            ae = Assert.Throws<AggregateException>(() => operation.Item(defaultStart, defaultSize, source.Item).LastOrDefault(x => true));\n+            Assert.All(ae.InnerExceptions, e => Assert.IsType<DeliberateTestException>(e));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void LongCount_Elements(LabelledOperation source, LabelledOperation operation)\n+        {\n+            Assert.Equal(defaultSize, operation.Item(defaultStart, defaultSize, source.Item).LongCount());\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void LongCount_Predicate_Some(LabelledOperation source, LabelledOperation operation)\n+        {\n+            Assert.Equal(defaultSize / 2, operation.Item(defaultStart, defaultSize, source.Item).LongCount(x => x < defaultStart + defaultSize / 2));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void LongCount_Predicate_None(LabelledOperation source, LabelledOperation operation)\n+        {\n+            Assert.Equal(0, operation.Item(defaultStart, defaultSize, source.Item).LongCount(x => x < defaultStart));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryFailingOperators\")]\n+        [MemberData(\"BinaryFailingOperators\")]\n+        public static void LongCount_AggregateException(LabelledOperation source, LabelledOperation operation)\n+        {\n+            AggregateException ae = Assert.Throws<AggregateException>(() => operation.Item(defaultStart, defaultSize, source.Item).LongCount());\n+            Assert.All(ae.InnerExceptions, e => Assert.IsType<DeliberateTestException>(e));\n+\n+            ae = Assert.Throws<AggregateException>(() => operation.Item(defaultStart, defaultSize, source.Item).LongCount(x => true));\n+            Assert.All(ae.InnerExceptions, e => Assert.IsType<DeliberateTestException>(e));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void Max(LabelledOperation source, LabelledOperation operation)\n+        {\n+            Assert.Equal(defaultStart + defaultSize - 1, operation.Item(defaultStart, defaultSize, source.Item).Max());\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void Max_Nullable(LabelledOperation source, LabelledOperation operation)\n+        {\n+            Assert.Equal(defaultStart + defaultSize - 1, operation.Item(defaultStart, defaultSize, source.Item).Max(x => (int?)x));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryFailingOperators\")]\n+        [MemberData(\"BinaryFailingOperators\")]\n+        public static void Max_AggregateException(LabelledOperation source, LabelledOperation operation)\n+        {\n+            AggregateException ae = Assert.Throws<AggregateException>(() => operation.Item(defaultStart, defaultSize, source.Item).Max());\n+            Assert.All(ae.InnerExceptions, e => Assert.IsType<DeliberateTestException>(e));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void Min(LabelledOperation source, LabelledOperation operation)\n+        {\n+            Assert.Equal(defaultStart, operation.Item(defaultStart, defaultSize, source.Item).Min());\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void Min_Nullable(LabelledOperation source, LabelledOperation operation)\n+        {\n+            Assert.Equal(defaultStart, operation.Item(defaultStart, defaultSize, source.Item).Min(x => (int?)x));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryFailingOperators\")]\n+        [MemberData(\"BinaryFailingOperators\")]\n+        public static void Min_AggregateException(LabelledOperation source, LabelledOperation operation)\n+        {\n+            AggregateException ae = Assert.Throws<AggregateException>(() => operation.Item(defaultStart, defaultSize, source.Item).Min());\n+            Assert.All(ae.InnerExceptions, e => Assert.IsType<DeliberateTestException>(e));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void OfType(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = defaultStart;\n+            foreach (int i in operation.Item(defaultStart, defaultSize, source.Item).OfType<int>())\n+            {\n+                Assert.Equal(seen++, i);\n+            }\n+            Assert.Equal(defaultStart + defaultSize, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void OfType_NotPipelined(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = defaultStart;\n+            Assert.All(operation.Item(defaultStart, defaultSize, source.Item).OfType<int>().ToList(), x => Assert.Equal(seen++, x));\n+            Assert.Equal(defaultStart + defaultSize, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void OfType_Other(LabelledOperation source, LabelledOperation operation)\n+        {\n+            Assert.Empty(operation.Item(defaultStart, defaultSize, source.Item).OfType<long>());\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void OfType_Other_NotPipelined(LabelledOperation source, LabelledOperation operation)\n+        {\n+            Assert.Empty(operation.Item(defaultStart, defaultSize, source.Item).OfType<long>().ToList());\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        [MemberData(\"UnaryUnorderedOperators\")]\n+        [MemberData(\"BinaryUnorderedOperators\")]\n+        public static void OrderBy_Initial(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = defaultStart;\n+            foreach (int i in operation.Item(defaultStart, defaultSize, source.Item).OrderBy(x => x))\n+            {\n+                Assert.Equal(seen++, i);\n+            }\n+            Assert.Equal(defaultStart + defaultSize, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        [MemberData(\"UnaryUnorderedOperators\")]\n+        [MemberData(\"BinaryUnorderedOperators\")]\n+        public static void OrderBy_Initial_NotPipelined(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = defaultStart;\n+            Assert.All(operation.Item(defaultStart, defaultSize, source.Item).OrderBy(x => x).ToList(), x => Assert.Equal(seen++, x));\n+            Assert.Equal(defaultStart + defaultSize, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        [MemberData(\"UnaryUnorderedOperators\")]\n+        [MemberData(\"BinaryUnorderedOperators\")]\n+        public static void OrderBy_OtherDirection(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = defaultStart + defaultSize;\n+            foreach (int i in operation.Item(defaultStart, defaultSize, source.Item).OrderBy(x => -x))\n+            {\n+                Assert.Equal(--seen, i);\n+            }\n+            Assert.Equal(defaultStart, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        [MemberData(\"UnaryUnorderedOperators\")]\n+        [MemberData(\"BinaryUnorderedOperators\")]\n+        public static void OrderBy_OtherDirection_NotPipelined(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = defaultStart + defaultSize;\n+            Assert.All(operation.Item(defaultStart, defaultSize, source.Item).OrderBy(x => -x).ToList(), x => Assert.Equal(--seen, x));\n+            Assert.Equal(defaultStart, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        [MemberData(\"UnaryUnorderedOperators\")]\n+        [MemberData(\"BinaryUnorderedOperators\")]\n+        public static void OrderByDescending_Initial(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = defaultStart;\n+            foreach (int i in operation.Item(defaultStart, defaultSize, source.Item).OrderByDescending(x => -x))\n+            {\n+                Assert.Equal(seen++, i);\n+            }\n+            Assert.Equal(defaultStart + defaultSize, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        [MemberData(\"UnaryUnorderedOperators\")]\n+        [MemberData(\"BinaryUnorderedOperators\")]\n+        public static void OrderByDescending_Initial_NotPipelined(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = defaultStart;\n+            Assert.All(operation.Item(defaultStart, defaultSize, source.Item).OrderByDescending(x => -x).ToList(), x => Assert.Equal(seen++, x));\n+            Assert.Equal(defaultStart + defaultSize, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        [MemberData(\"UnaryUnorderedOperators\")]\n+        [MemberData(\"BinaryUnorderedOperators\")]\n+        public static void OrderByDescending_OtherDirection(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = defaultStart + defaultSize;\n+            foreach (int i in operation.Item(defaultStart, defaultSize, source.Item).OrderByDescending(x => x))\n+            {\n+                Assert.Equal(--seen, i);\n+            }\n+            Assert.Equal(defaultStart, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        [MemberData(\"UnaryUnorderedOperators\")]\n+        [MemberData(\"BinaryUnorderedOperators\")]\n+        public static void OrderByDescending_OtherDirection_NotPipelined(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = defaultStart + defaultSize;\n+            Assert.All(operation.Item(defaultStart, defaultSize, source.Item).OrderByDescending(x => x).ToList(), x => Assert.Equal(--seen, x));\n+            Assert.Equal(defaultStart, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void Reverse(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = defaultStart + defaultSize;\n+            foreach (int i in operation.Item(defaultStart, defaultSize, source.Item).Reverse())\n+            {\n+                Assert.Equal(--seen, i);\n+            }\n+            Assert.Equal(defaultStart, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void Reverse_NotPipelined(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = defaultStart + defaultSize;\n+            foreach (int i in operation.Item(defaultStart, defaultSize, source.Item).Reverse().ToList())\n+            {\n+                Assert.Equal(--seen, i);\n+            }\n+            Assert.Equal(defaultStart, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void Select(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = -defaultStart;\n+            foreach (int i in operation.Item(defaultStart, defaultSize, source.Item).Select(x => -x))\n+            {\n+                Assert.Equal(seen--, i);\n+            }\n+            Assert.Equal(-defaultStart - defaultSize, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void Select_NotPipelined(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = -defaultStart;\n+            Assert.All(operation.Item(defaultStart, defaultSize, source.Item).Select(x => -x).ToList(), x => Assert.Equal(seen--, x));\n+            Assert.Equal(-defaultStart - defaultSize, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void Select_Indexed(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = -defaultStart;\n+            foreach (int i in operation.Item(defaultStart, defaultSize, source.Item).Select((x, index) => { Assert.Equal(defaultStart + index, x); return -x; }))\n+            {\n+                Assert.Equal(seen--, i);\n+            }\n+            Assert.Equal(-defaultStart - defaultSize, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void Select_Indexed_NotPipelined(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = -defaultStart;\n+            Assert.All(operation.Item(defaultStart, defaultSize, source.Item).Select((x, index) => { Assert.Equal(defaultStart + index, x); return -x; }).ToList(), x => Assert.Equal(seen--, x));\n+            Assert.Equal(-defaultStart - defaultSize, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void SelectMany(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = -defaultStart;\n+            foreach (int i in operation.Item(0, defaultSize, source.Item).SelectMany(x => new[] { 0, -1 }.Select(y => y + -defaultStart - 2 * x)))\n+            {\n+                Assert.Equal(seen--, i);\n+            }\n+            Assert.Equal(-defaultStart - defaultSize * 2, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void SelectMany_NotPipelined(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = -defaultStart;\n+            Assert.All(operation.Item(0, defaultSize, source.Item).SelectMany(x => new[] { 0, -1 }.Select(y => y + -defaultStart - 2 * x)).ToList(), x => Assert.Equal(seen--, x));\n+            Assert.Equal(-defaultStart - defaultSize * 2, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void SelectMany_Indexed(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = -defaultStart;\n+            foreach (int i in operation.Item(0, defaultSize, source.Item).SelectMany((x, index) => { Assert.Equal(index, x); return new[] { 0, -1 }.Select(y => y + -defaultStart - 2 * x); }))\n+            {\n+                Assert.Equal(seen--, i);\n+            }\n+            Assert.Equal(-defaultStart - defaultSize * 2, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void SelectMany_Indexed_NotPipelined(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = -defaultStart;\n+            Assert.All(operation.Item(0, defaultSize, source.Item).SelectMany((x, index) => { Assert.Equal(index, x); return new[] { 0, -1 }.Select(y => y + -defaultStart - 2 * x); }).ToList(), x => Assert.Equal(seen--, x));\n+            Assert.Equal(-defaultStart - defaultSize * 2, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void SelectMany_ResultSelector(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = -defaultStart;\n+            foreach (int i in operation.Item(0, defaultSize, source.Item).SelectMany(x => new[] { 0, -1 }, (x, y) => y + -defaultStart - 2 * x))\n+            {\n+                Assert.Equal(seen--, i);\n+            }\n+            Assert.Equal(-defaultStart - defaultSize * 2, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void SelectMany_ResultSelector_NotPipelined(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = -defaultStart;\n+            Assert.All(operation.Item(0, defaultSize, source.Item).SelectMany(x => new[] { 0, -1 }, (x, y) => y + -defaultStart - 2 * x).ToList(), x => Assert.Equal(seen--, x));\n+            Assert.Equal(-defaultStart - defaultSize * 2, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void SelectMany_Indexed_ResultSelector(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = -defaultStart;\n+            foreach (int i in operation.Item(0, defaultSize, source.Item).SelectMany((x, index) => { Assert.Equal(index, x); return new[] { 0, -1 }; }, (x, y) => y + -defaultStart - 2 * x))\n+            {\n+                Assert.Equal(seen--, i);\n+            }\n+            Assert.Equal(-defaultStart - defaultSize * 2, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void SelectMany_Indexed_ResultSelector_NotPipelined(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = -defaultStart;\n+            Assert.All(operation.Item(0, defaultSize, source.Item).SelectMany((x, index) => { Assert.Equal(index, x); return new[] { 0, -1 }; }, (x, y) => y + -defaultStart - 2 * x).ToList(), x => Assert.Equal(seen--, x));\n+            Assert.Equal(-defaultStart - defaultSize * 2, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void SequenceEqual(LabelledOperation source, LabelledOperation operation)\n+        {\n+            Assert.True(operation.Item(defaultStart, defaultSize, source.Item).SequenceEqual(ParallelEnumerable.Range(defaultStart, defaultSize).AsOrdered()));\n+            Assert.True(ParallelEnumerable.Range(defaultStart, defaultSize).AsOrdered().SequenceEqual(operation.Item(defaultStart, defaultSize, source.Item)));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void SequenceEqual_Self(LabelledOperation source, LabelledOperation operation)\n+        {\n+            Assert.True(operation.Item(defaultStart, defaultSize, source.Item).SequenceEqual(operation.Item(defaultStart, defaultSize, source.Item)));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        [MemberData(\"UnaryUnorderedOperators\")]\n+        [MemberData(\"BinaryUnorderedOperators\")]\n+        public static void Single(LabelledOperation source, LabelledOperation operation)\n+        {\n+            Assert.Equal(defaultStart, operation.Item(defaultStart, 1, source.Item).Single());\n+            Assert.Equal(defaultStart + defaultSize / 2, operation.Item(defaultStart, defaultSize, source.Item).Single(x => x == defaultStart + defaultSize / 2));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        [MemberData(\"UnaryUnorderedOperators\")]\n+        [MemberData(\"BinaryUnorderedOperators\")]\n+        public static void SingleOrDefault(LabelledOperation source, LabelledOperation operation)\n+        {\n+            Assert.Equal(defaultStart, operation.Item(defaultStart, 1, source.Item).SingleOrDefault());\n+            Assert.Equal(defaultStart + defaultSize / 2, operation.Item(defaultStart, defaultSize, source.Item).SingleOrDefault(x => x == defaultStart + defaultSize / 2));\n+\n+            if (!operation.ToString().StartsWith(\"DefaultIfEmpty\"))\n+            {\n+                Assert.Equal(default(int), operation.Item(defaultStart, 0, source.Item).SingleOrDefault());\n+                Assert.Equal(default(int), operation.Item(defaultStart, 0, source.Item).SingleOrDefault(x => x == defaultStart + defaultSize / 2));\n+            }\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void Skip(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = defaultStart + defaultSize / 2;\n+            foreach (int i in operation.Item(defaultStart, defaultSize, source.Item).Skip(defaultSize / 2))\n+            {\n+                Assert.Equal(seen++, i);\n+            }\n+            Assert.Equal(defaultStart + defaultSize, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void Skip_NotPipelined(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = defaultStart + defaultSize / 2;\n+            Assert.All(operation.Item(defaultStart, defaultSize, source.Item).Skip(defaultSize / 2).ToList(), x => Assert.Equal(seen++, x));\n+            Assert.Equal(defaultStart + defaultSize, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void SkipWhile(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = defaultStart + defaultSize / 2;\n+            foreach (int i in operation.Item(defaultStart, defaultSize, source.Item).SkipWhile(x => x < defaultStart + defaultSize / 2))\n+            {\n+                Assert.Equal(seen++, i);\n+            }\n+            Assert.Equal(defaultStart + defaultSize, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void SkipWhile_NotPipelined(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = defaultStart + defaultSize / 2;\n+            Assert.All(operation.Item(defaultStart, defaultSize, source.Item).SkipWhile(x => x < defaultStart + defaultSize / 2).ToList(), x => Assert.Equal(seen++, x));\n+            Assert.Equal(defaultStart + defaultSize, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void SkipWhile_Indexed(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = defaultStart + defaultSize / 2;\n+            foreach (int i in operation.Item(defaultStart, defaultSize, source.Item).SkipWhile((x, index) => index < defaultSize / 2))\n+            {\n+                Assert.Equal(seen++, i);\n+            }\n+            Assert.Equal(defaultStart + defaultSize, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void SkipWhile_Indexed_NotPipelined(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = defaultStart + defaultSize / 2;\n+            Assert.All(operation.Item(defaultStart, defaultSize, source.Item).SkipWhile((x, index) => index < defaultSize / 2).ToList(), x => Assert.Equal(seen++, x));\n+            Assert.Equal(defaultStart + defaultSize, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        [MemberData(\"UnaryUnorderedOperators\")]\n+        [MemberData(\"BinaryUnorderedOperators\")]\n+        public static void Sum(LabelledOperation source, LabelledOperation operation)\n+        {\n+            Assert.Equal(Functions.SumRange(defaultStart, defaultSize), operation.Item(defaultStart, defaultSize, source.Item).Sum());\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        [MemberData(\"UnaryUnorderedOperators\")]\n+        [MemberData(\"BinaryUnorderedOperators\")]\n+        public static void Sum_Nullable(LabelledOperation source, LabelledOperation operation)\n+        {\n+            Assert.Equal(Functions.SumRange(defaultStart, defaultSize), operation.Item(defaultStart, defaultSize, source.Item).Sum(x => (int?)x));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void Take(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = defaultStart;\n+            foreach (int i in operation.Item(defaultStart, defaultSize, source.Item).Take(defaultSize / 2))\n+            {\n+                Assert.Equal(seen++, i);\n+            }\n+            Assert.Equal(defaultStart + defaultSize / 2, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void Take_NotPipelined(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = defaultStart;\n+            Assert.All(operation.Item(defaultStart, defaultSize, source.Item).Take(defaultSize / 2).ToList(), x => Assert.Equal(seen++, x));\n+            Assert.Equal(defaultStart + defaultSize / 2, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void TakeWhile(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = defaultStart;\n+            foreach (int i in operation.Item(defaultStart, defaultSize, source.Item).TakeWhile(x => x < defaultStart + defaultSize / 2))\n+            {\n+                Assert.Equal(seen++, i);\n+            }\n+            Assert.Equal(defaultStart + defaultSize / 2, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void TakeWhile_NotPipelined(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = defaultStart;\n+            Assert.All(operation.Item(defaultStart, defaultSize, source.Item).TakeWhile(x => x < defaultStart + defaultSize / 2).ToList(), x => Assert.Equal(seen++, x));\n+            Assert.Equal(defaultStart + defaultSize / 2, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void TakeWhile_Indexed(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = defaultStart;\n+            foreach (int i in operation.Item(defaultStart, defaultSize, source.Item).TakeWhile((x, index) => index < defaultSize / 2))\n+            {\n+                Assert.Equal(seen++, i);\n+            }\n+            Assert.Equal(defaultStart + defaultSize / 2, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void TakeWhile_Indexed_NotPipelined(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = defaultStart;\n+            Assert.All(operation.Item(defaultStart, defaultSize, source.Item).TakeWhile((x, index) => index < defaultSize / 2).ToList(), x => Assert.Equal(seen++, x));\n+            Assert.Equal(defaultStart + defaultSize / 2, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        [MemberData(\"UnaryUnorderedOperators\")]\n+        [MemberData(\"BinaryUnorderedOperators\")]\n+        public static void ThenBy_Initial(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = defaultStart;\n+            foreach (int i in operation.Item(defaultStart, defaultSize, source.Item).OrderBy(x => 0).ThenBy(x => x))\n+            {\n+                Assert.Equal(seen++, i);\n+            }\n+            Assert.Equal(defaultStart + defaultSize, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        [MemberData(\"UnaryUnorderedOperators\")]\n+        [MemberData(\"BinaryUnorderedOperators\")]\n+        public static void ThenBy_Initial_NotPipelined(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = defaultStart;\n+            Assert.All(operation.Item(defaultStart, defaultSize, source.Item).OrderBy(x => 0).ThenBy(x => x).ToList(), x => Assert.Equal(seen++, x));\n+            Assert.Equal(defaultStart + defaultSize, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        [MemberData(\"UnaryUnorderedOperators\")]\n+        [MemberData(\"BinaryUnorderedOperators\")]\n+        public static void ThenBy_OtherDirection(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = defaultStart + defaultSize;\n+            foreach (int i in operation.Item(defaultStart, defaultSize, source.Item).OrderBy(x => 0).ThenBy(x => -x))\n+            {\n+                Assert.Equal(--seen, i);\n+            }\n+            Assert.Equal(defaultStart, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        [MemberData(\"UnaryUnorderedOperators\")]\n+        [MemberData(\"BinaryUnorderedOperators\")]\n+        public static void ThenBy_OtherDirection_NotPipelined(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = defaultStart + defaultSize;\n+            Assert.All(operation.Item(defaultStart, defaultSize, source.Item).OrderBy(x => 0).ThenBy(x => -x).ToList(), x => Assert.Equal(--seen, x));\n+            Assert.Equal(defaultStart, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        [MemberData(\"UnaryUnorderedOperators\")]\n+        [MemberData(\"BinaryUnorderedOperators\")]\n+        public static void ThenByDescending_Initial(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = defaultStart;\n+            foreach (int i in operation.Item(defaultStart, defaultSize, source.Item).OrderBy(x => 0).ThenByDescending(x => -x))\n+            {\n+                Assert.Equal(seen++, i);\n+            }\n+            Assert.Equal(defaultStart + defaultSize, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        [MemberData(\"UnaryUnorderedOperators\")]\n+        [MemberData(\"BinaryUnorderedOperators\")]\n+        public static void ThenByDescending_Initial_NotPipelined(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = defaultStart;\n+            Assert.All(operation.Item(defaultStart, defaultSize, source.Item).OrderBy(x => 0).ThenByDescending(x => -x).ToList(), x => Assert.Equal(seen++, x));\n+            Assert.Equal(defaultStart + defaultSize, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        [MemberData(\"UnaryUnorderedOperators\")]\n+        [MemberData(\"BinaryUnorderedOperators\")]\n+        public static void ThenByDescending_OtherDirection(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = defaultStart + defaultSize;\n+            foreach (int i in operation.Item(defaultStart, defaultSize, source.Item).OrderBy(x => 0).ThenByDescending(x => x))\n+            {\n+                Assert.Equal(--seen, i);\n+            }\n+            Assert.Equal(defaultStart, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        [MemberData(\"UnaryUnorderedOperators\")]\n+        [MemberData(\"BinaryUnorderedOperators\")]\n+        public static void ThenByDescending_OtherDirection_NotPipelined(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = defaultStart + defaultSize;\n+            Assert.All(operation.Item(defaultStart, defaultSize, source.Item).OrderBy(x => 0).ThenByDescending(x => x).ToList(), x => Assert.Equal(--seen, x));\n+            Assert.Equal(defaultStart, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        public static void ToArray(LabelledOperation source, LabelledOperation operation)\n+        {\n+            int seen = defaultStart;\n+            Assert.All(operation.Item(defaultStart, defaultSize, source.Item).ToArray(), x => Assert.Equal(seen++, x));\n+            Assert.Equal(defaultStart + defaultSize, seen);\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryFailingOperators\")]\n+        [MemberData(\"BinaryFailingOperators\")]\n+        [MemberData(\"OrderFailingOperators\")]\n+        public static void ToArray_AggregateException(LabelledOperation source, LabelledOperation operation)\n+        {\n+            AggregateException ae = Assert.Throws<AggregateException>(() => operation.Item(defaultStart, defaultSize, source.Item).ToArray());\n+            Assert.All(ae.InnerExceptions, e => Assert.IsType<DeliberateTestException>(e));\n+        }\n+\n+        [Theory]\n+        [MemberData(\"UnaryOperators\")]\n+        [MemberData(\"BinaryOperators\")]\n+        [MemberData(\"UnaryUnorderedOperators\")]\n+        [MemberData(\"BinaryUnorderedOperators\")]\n+        public static void ToDictionary(LabelledOperation source, LabelledOperation operation)\n+        {\n+            IntegerRangeSet seen = new IntegerRangeSet(defaultStart, defaultSize);\n+            Assert.All(operation.Item(defaultStart, defaultSize, source.Item).ToDictionary(x => x * 2),\n+                p =>\n+                {\n+                    Assert.True(seen.Add(p.Key / 2));\n+                    Assert.Equal(p.Key, p.Value * 2);\n+                });\n+            Assert.True(seen.Complete());","path":"src/System.Linq.Parallel/tests/Combinatorial/ParallelQueryCombinationTests.cs","position":1388,"original_position":1388,"commit_id":"264ed5cbfff5f021379ef63d6aa8a5262d3d2f94","original_commit_id":"264ed5cbfff5f021379ef63d6aa8a5262d3d2f94","user":{"login":"stephentoub","id":2642209,"avatar_url":"https://avatars.githubusercontent.com/u/2642209?v=3","gravatar_id":"","url":"https://api.github.com/users/stephentoub","html_url":"https://github.com/stephentoub","followers_url":"https://api.github.com/users/stephentoub/followers","following_url":"https://api.github.com/users/stephentoub/following{/other_user}","gists_url":"https://api.github.com/users/stephentoub/gists{/gist_id}","starred_url":"https://api.github.com/users/stephentoub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephentoub/subscriptions","organizations_url":"https://api.github.com/users/stephentoub/orgs","repos_url":"https://api.github.com/users/stephentoub/repos","events_url":"https://api.github.com/users/stephentoub/events{/privacy}","received_events_url":"https://api.github.com/users/stephentoub/received_events","type":"User","site_admin":false},"body":"In all of the places you do ```Assert.True(seen.Complete())```, did you consider instead just having a call like ```seen.AssertComplete()```, where the implementation would include in the assert message information about what was missing (or even duplicated if you chose to change the implementation of the collection)?","created_at":"2015-06-02T11:46:17Z","updated_at":"2015-06-02T11:46:17Z","html_url":"https://github.com/dotnet/corefx/pull/1599#discussion_r31514012","pull_request_url":"https://api.github.com/repos/dotnet/corefx/pulls/1599","_links":{"self":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/comments/31514012"},"html":{"href":"https://github.com/dotnet/corefx/pull/1599#discussion_r31514012"},"pull_request":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/1599"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/corefx/pulls/1599","id":34511724,"html_url":"https://github.com/dotnet/corefx/pull/1599","diff_url":"https://github.com/dotnet/corefx/pull/1599.diff","patch_url":"https://github.com/dotnet/corefx/pull/1599.patch","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/1599","number":1599,"state":"open","locked":false,"title":"System.Linq.Parallel Test - initial cleanup","user":{"login":"Clockwork-Muse","id":5569508,"avatar_url":"https://avatars.githubusercontent.com/u/5569508?v=3","gravatar_id":"","url":"https://api.github.com/users/Clockwork-Muse","html_url":"https://github.com/Clockwork-Muse","followers_url":"https://api.github.com/users/Clockwork-Muse/followers","following_url":"https://api.github.com/users/Clockwork-Muse/following{/other_user}","gists_url":"https://api.github.com/users/Clockwork-Muse/gists{/gist_id}","starred_url":"https://api.github.com/users/Clockwork-Muse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Clockwork-Muse/subscriptions","organizations_url":"https://api.github.com/users/Clockwork-Muse/orgs","repos_url":"https://api.github.com/users/Clockwork-Muse/repos","events_url":"https://api.github.com/users/Clockwork-Muse/events{/privacy}","received_events_url":"https://api.github.com/users/Clockwork-Muse/received_events","type":"User","site_admin":false},"body":"Initial PR for cleaned up PLINQ tests.\r\n\r\nnote: I don't consider myself done with this by any means.  In particular, there's a number of things I want to add to the combinatorial tests (like cancellation).\r\n\r\nAll tests are passing - all 200K+ of them (most of that is the combinatorial tests).  The original version didn't appear to have many, due to not using `Theory`.  `OuterLoop` will take a _very_ long time to run, ~10 minutes on my machine(innerloop runs in about 90 seconds).\r\n\r\n@rafidka - you should be able to grab things now.  You'll actually want [this other branch instead](https://github.com/Clockwork-Muse/corefx/tree/516_System.Linq.Parallel_FullyOrdered), which assumes more ordered output than PLINQ currently delivers (but I'm not sure if it's a bug...).\r\n\r\nI'm going to be in Scotland for two weeks, so my ability to reply/deal with changes from the code review in that time will be limited.\r\n\r\nPossibly interested people: \r\n@stephentoub , @alfredoMS , @svick, @weshaggard","created_at":"2015-04-30T23:46:33Z","updated_at":"2015-06-02T11:46:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4c402b3f0b4616461da4d760b02b5b3a9af8c830","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/corefx/pulls/1599/commits","review_comments_url":"https://api.github.com/repos/dotnet/corefx/pulls/1599/comments","review_comment_url":"https://api.github.com/repos/dotnet/corefx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/1599/comments","statuses_url":"https://api.github.com/repos/dotnet/corefx/statuses/264ed5cbfff5f021379ef63d6aa8a5262d3d2f94","head":{"label":"Clockwork-Muse:516_System.Linq.Parallel","ref":"516_System.Linq.Parallel","sha":"264ed5cbfff5f021379ef63d6aa8a5262d3d2f94","user":{"login":"Clockwork-Muse","id":5569508,"avatar_url":"https://avatars.githubusercontent.com/u/5569508?v=3","gravatar_id":"","url":"https://api.github.com/users/Clockwork-Muse","html_url":"https://github.com/Clockwork-Muse","followers_url":"https://api.github.com/users/Clockwork-Muse/followers","following_url":"https://api.github.com/users/Clockwork-Muse/following{/other_user}","gists_url":"https://api.github.com/users/Clockwork-Muse/gists{/gist_id}","starred_url":"https://api.github.com/users/Clockwork-Muse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Clockwork-Muse/subscriptions","organizations_url":"https://api.github.com/users/Clockwork-Muse/orgs","repos_url":"https://api.github.com/users/Clockwork-Muse/repos","events_url":"https://api.github.com/users/Clockwork-Muse/events{/privacy}","received_events_url":"https://api.github.com/users/Clockwork-Muse/received_events","type":"User","site_admin":false},"repo":{"id":29805465,"name":"corefx","full_name":"Clockwork-Muse/corefx","owner":{"login":"Clockwork-Muse","id":5569508,"avatar_url":"https://avatars.githubusercontent.com/u/5569508?v=3","gravatar_id":"","url":"https://api.github.com/users/Clockwork-Muse","html_url":"https://github.com/Clockwork-Muse","followers_url":"https://api.github.com/users/Clockwork-Muse/followers","following_url":"https://api.github.com/users/Clockwork-Muse/following{/other_user}","gists_url":"https://api.github.com/users/Clockwork-Muse/gists{/gist_id}","starred_url":"https://api.github.com/users/Clockwork-Muse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Clockwork-Muse/subscriptions","organizations_url":"https://api.github.com/users/Clockwork-Muse/orgs","repos_url":"https://api.github.com/users/Clockwork-Muse/repos","events_url":"https://api.github.com/users/Clockwork-Muse/events{/privacy}","received_events_url":"https://api.github.com/users/Clockwork-Muse/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Clockwork-Muse/corefx","description":"Branch for issue #516.  WARNING - will be rebased often.","fork":true,"url":"https://api.github.com/repos/Clockwork-Muse/corefx","forks_url":"https://api.github.com/repos/Clockwork-Muse/corefx/forks","keys_url":"https://api.github.com/repos/Clockwork-Muse/corefx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Clockwork-Muse/corefx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Clockwork-Muse/corefx/teams","hooks_url":"https://api.github.com/repos/Clockwork-Muse/corefx/hooks","issue_events_url":"https://api.github.com/repos/Clockwork-Muse/corefx/issues/events{/number}","events_url":"https://api.github.com/repos/Clockwork-Muse/corefx/events","assignees_url":"https://api.github.com/repos/Clockwork-Muse/corefx/assignees{/user}","branches_url":"https://api.github.com/repos/Clockwork-Muse/corefx/branches{/branch}","tags_url":"https://api.github.com/repos/Clockwork-Muse/corefx/tags","blobs_url":"https://api.github.com/repos/Clockwork-Muse/corefx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Clockwork-Muse/corefx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Clockwork-Muse/corefx/git/refs{/sha}","trees_url":"https://api.github.com/repos/Clockwork-Muse/corefx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Clockwork-Muse/corefx/statuses/{sha}","languages_url":"https://api.github.com/repos/Clockwork-Muse/corefx/languages","stargazers_url":"https://api.github.com/repos/Clockwork-Muse/corefx/stargazers","contributors_url":"https://api.github.com/repos/Clockwork-Muse/corefx/contributors","subscribers_url":"https://api.github.com/repos/Clockwork-Muse/corefx/subscribers","subscription_url":"https://api.github.com/repos/Clockwork-Muse/corefx/subscription","commits_url":"https://api.github.com/repos/Clockwork-Muse/corefx/commits{/sha}","git_commits_url":"https://api.github.com/repos/Clockwork-Muse/corefx/git/commits{/sha}","comments_url":"https://api.github.com/repos/Clockwork-Muse/corefx/comments{/number}","issue_comment_url":"https://api.github.com/repos/Clockwork-Muse/corefx/issues/comments{/number}","contents_url":"https://api.github.com/repos/Clockwork-Muse/corefx/contents/{+path}","compare_url":"https://api.github.com/repos/Clockwork-Muse/corefx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Clockwork-Muse/corefx/merges","archive_url":"https://api.github.com/repos/Clockwork-Muse/corefx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Clockwork-Muse/corefx/downloads","issues_url":"https://api.github.com/repos/Clockwork-Muse/corefx/issues{/number}","pulls_url":"https://api.github.com/repos/Clockwork-Muse/corefx/pulls{/number}","milestones_url":"https://api.github.com/repos/Clockwork-Muse/corefx/milestones{/number}","notifications_url":"https://api.github.com/repos/Clockwork-Muse/corefx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Clockwork-Muse/corefx/labels{/name}","releases_url":"https://api.github.com/repos/Clockwork-Muse/corefx/releases{/id}","created_at":"2015-01-25T06:35:53Z","updated_at":"2015-04-30T10:08:57Z","pushed_at":"2015-06-02T11:41:43Z","git_url":"git://github.com/Clockwork-Muse/corefx.git","ssh_url":"git@github.com:Clockwork-Muse/corefx.git","clone_url":"https://github.com/Clockwork-Muse/corefx.git","svn_url":"https://github.com/Clockwork-Muse/corefx","homepage":"","size":20458,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dotnet:master","ref":"master","sha":"819f3c3c151a716cf59c0d2f185f4f6ceb8d49fd","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":26295345,"name":"corefx","full_name":"dotnet/corefx","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotnet/corefx","description":"This repo contains the .NET Core foundational libraries, called CoreFX. It includes classes for collections, file systems, console, XML, async and many others.","fork":false,"url":"https://api.github.com/repos/dotnet/corefx","forks_url":"https://api.github.com/repos/dotnet/corefx/forks","keys_url":"https://api.github.com/repos/dotnet/corefx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/corefx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/corefx/teams","hooks_url":"https://api.github.com/repos/dotnet/corefx/hooks","issue_events_url":"https://api.github.com/repos/dotnet/corefx/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/corefx/events","assignees_url":"https://api.github.com/repos/dotnet/corefx/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/corefx/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/corefx/tags","blobs_url":"https://api.github.com/repos/dotnet/corefx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/corefx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/corefx/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/corefx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/corefx/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/corefx/languages","stargazers_url":"https://api.github.com/repos/dotnet/corefx/stargazers","contributors_url":"https://api.github.com/repos/dotnet/corefx/contributors","subscribers_url":"https://api.github.com/repos/dotnet/corefx/subscribers","subscription_url":"https://api.github.com/repos/dotnet/corefx/subscription","commits_url":"https://api.github.com/repos/dotnet/corefx/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/corefx/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/corefx/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/corefx/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/corefx/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/corefx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/corefx/merges","archive_url":"https://api.github.com/repos/dotnet/corefx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/corefx/downloads","issues_url":"https://api.github.com/repos/dotnet/corefx/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/corefx/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/corefx/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/corefx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/corefx/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/corefx/releases{/id}","created_at":"2014-11-06T23:42:48Z","updated_at":"2015-06-02T07:54:12Z","pushed_at":"2015-06-02T11:41:44Z","git_url":"git://github.com/dotnet/corefx.git","ssh_url":"git@github.com:dotnet/corefx.git","clone_url":"https://github.com/dotnet/corefx.git","svn_url":"https://github.com/dotnet/corefx","homepage":"","size":48739,"stargazers_count":7859,"watchers_count":7859,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1588,"mirror_url":null,"open_issues_count":409,"forks":1588,"open_issues":409,"watchers":7859,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/1599"},"html":{"href":"https://github.com/dotnet/corefx/pull/1599"},"issue":{"href":"https://api.github.com/repos/dotnet/corefx/issues/1599"},"comments":{"href":"https://api.github.com/repos/dotnet/corefx/issues/1599/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/1599/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/1599/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/corefx/statuses/264ed5cbfff5f021379ef63d6aa8a5262d3d2f94"}}}}