Пример #1
0
    public void BlinqShouldEqualLinqNativeSequenceRunElementAtOrDefault([ArrayValues] int[] sourceArr)
    {
        var index = 10;

        using (var source = new NativeArray <int>(sourceArr, Allocator.Persistent))
        {
            var seq      = Blinq.ToValueSequence(in source);
            var expected = ExceptionAndValue(() => Linq.ElementAtOrDefault(seq, index));
            if (expected.exception != null)
            {
                return;
            }
            var actual = ExceptionAndValue(() => Blinq.RunElementAtOrDefault(seq, index));
            AssertAreEqual(expected, actual);
        }
    }