public void Descending_Comparable_OutOfRange() { Assert.ThrowsException <ArgumentOutOfRangeException>(() => { GenerateArraysDescending(SNBoseNelson.MinLength - 1, out int[] expected, out int[] actual); SNBoseNelson.SortDescending(ref actual[0], actual.Length); }); }
public void Descending_Comparison_ComparisonNull() { Assert.ThrowsException <ArgumentNullException>(() => { GenerateArraysDescending(SNBoseNelson.MinLength - 1, out int[] expected, out int[] actual); SNBoseNelson.SortDescending(ref actual[0], actual.Length, comparison: null); }); }
public unsafe void Descending_ComparisonPointer() { for (int length = SNBoseNelson.MinLength; length <= SNBoseNelson.MaxLength; length++) { GenerateArraysDescending(length, out int[] expected, out int[] actual); SNBoseNelson.SortDescending(ref actual[0], length, &InternalComparison); CollectionAssert.AreEqual(expected, actual, $"Collections differs for length `{length}`."); } }