示例#1
0
        public static void Min_Other_SomeNull(Labeled <ParallelQuery <int> > labeled, int count, int min)
        {
            ParallelQuery <int> query = labeled.Item;

            Assert.Equal(count / 2, query.Min(x => x >= count / 2 ? DelgatedComparable.Delegate(x, Comparer <int> .Default) : null).Value);
            Assert.Equal(count - 1, query.Min(x => x >= count / 2 ? DelgatedComparable.Delegate(x, ReverseComparer.Instance) : null).Value);
        }
示例#2
0
        public static void Min_Other(Labeled <ParallelQuery <int> > labeled, int count, int min)
        {
            ParallelQuery <int> query = labeled.Item;

            Assert.Equal(0, query.Select(x => DelgatedComparable.Delegate(x, Comparer <int> .Default)).Min().Value);
            Assert.Equal(count - 1, query.Select(x => DelgatedComparable.Delegate(x, ReverseComparer.Instance)).Min().Value);
        }