Example #1
0
    public void BlinqShouldEqualLinqNativeSequenceRunElementAt([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.ElementAt(seq, index));
            if (expected.exception != null)
            {
                return;
            }
            var actual = ExceptionAndValue(() => Blinq.RunElementAt(seq, index));
            AssertAreEqual(expected, actual);
        }
    }