コード例 #1
0
 public void FastParallelBatchBoundariesErrors(int count, int currentBatch, int totalBatches)
 {
     Assert.Throws <ArgumentException>(() => FastParallel.BatchBoundaries(count, currentBatch, totalBatches));
 }
コード例 #2
0
 public void FastParallelBatchBoundaries(int count, int currentBatch, int totalBatches, int expectedStart, int expectedEnd)
 {
     var(firstIndex, lastIndex) = FastParallel.BatchBoundaries(count, currentBatch, totalBatches);
     Assert.AreEqual(expectedStart, firstIndex, "firstIndex");
     Assert.AreEqual(expectedEnd, lastIndex, "lastIndex");
 }