public void BlinqShouldEqualLinqNativeArrayAverageSelector_int( [ValueSource(typeof(Values_int), nameof(Values_int.Values))] int[] sourceArr ) { using (var srcNativeArray = new NativeArray <int>(sourceArr, Allocator.Persistent)) { var expected = ExceptionAndValue(() => Linq.Average(srcNativeArray, SelectSelf <int>().Invoke)); var actual = ExceptionAndValue(() => Blinq.Average(srcNativeArray, SelectSelf <int>())); AssertAreEqual(expected, actual); } }
public void BlinqShouldEqualLinqNativeArrayAverage_double( [ValueSource(typeof(Values_double), nameof(Values_double.Values))] double[] sourceArr ) { using (var srcNativeArray = new NativeArray <double>(sourceArr, Allocator.Persistent)) { var expected = ExceptionAndValue(() => Linq.Average(srcNativeArray)); var actual = ExceptionAndValue(() => Blinq.Average(srcNativeArray)); AssertAreEqual(expected, actual); } }