예제 #1
0
    public void BlinqShouldEqualLinqNativeArrayDefaultIfEmpty([ArrayValues] int[] sourceArr)
    {
        var source   = new NativeArray <int>(sourceArr, Allocator.Persistent);
        var expected = ExceptionAndValue(() => Linq.ToArray(Linq.DefaultIfEmpty(source, 1)));
        var actual   = ExceptionAndValue(() => Linq.ToArray(source.DefaultIfEmpty(1)));

        AssertAreEqual(expected, actual);
        source.Dispose();
    }