Beispiel #1
0
    public void BlinqShouldEqualLinqNativeArraySumSelector_float(
        [ValueSource(typeof(Values_float), nameof(Values_float.Values))] float[] sourceArr
        )
    {
        var srcNativeArray = new NativeArray <float>(sourceArr, Allocator.Persistent);
        var expected       = ExceptionAndValue(() => Linq.Sum(srcNativeArray, SelectSelf <float>().Invoke));
        var actual         = ExceptionAndValue(() => Blinq.Sum(srcNativeArray, SelectSelf <float>()));

        srcNativeArray.Dispose();
    }
Beispiel #2
0
    public void BlinqShouldEqualLinqNativeArraySum_int(
        [ValueSource(typeof(Values_int), nameof(Values_int.Values))] int[] sourceArr
        )
    {
        var srcNativeArray = new NativeArray <int>(sourceArr, Allocator.Persistent);
        var expected       = ExceptionAndValue(() => Linq.Sum(srcNativeArray));
        var actual         = ExceptionAndValue(() => Blinq.Sum(srcNativeArray));

        srcNativeArray.Dispose();
    }