예제 #1
0
 public void BlinqShouldEqualLinqNativeArrayScheduleAverage_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));
         if (expected.Item1 != null)
         {
             return; // Exceptions are not supported in Burst
         }
         var actual = ExceptionAndValue(() => Blinq.ScheduleAverage(srcNativeArray).Complete());
         AssertAreEqual(expected, actual);
     }
 }