public void Repeat_ToList_With_ValidData_Must_Succeed(int value, int count) { // Arrange var expected = System.Linq.Enumerable.ToList(System.Linq.Enumerable.Repeat(value, count)); // Act var result = ValueEnumerable.Repeat(value, count).ToList(); // Assert _ = result.Must() .BeOfType <List <int> >() .BeEnumerableOf <int>() .BeEqualTo(expected, testIndexOf: false); }
public void Repeat_ToArray_With_ValidData_Must_Succeed(int value, int count) { // Arrange var expected = System.Linq.Enumerable.ToArray(System.Linq.Enumerable.Repeat(value, count)); // Act var result = ValueEnumerable.Repeat(value, count).ToArray(); // Assert _ = result.Must() .BeOfType <int[]>() .BeEnumerableOf <int>() .BeEqualTo(expected); }
public void Repeat_All_With_ValidData_Must_Succeed(int value, int count) { // Arrange var expected = Enumerable .Repeat(value, count) .All(item => false); // Act var result = ValueEnumerable .Repeat(value, count) .All(item => false); // Assert _ = result.Must() .BeEqualTo(expected); }
public void Repeat_Take_With_ValidData_Must_Succeed(int value, int count, int take) { // Arrange var expected = Enumerable .Repeat(value, count) .Take(take); // Act var result = ValueEnumerable .Repeat(value, count) .Take(take); // Assert _ = result.Must() .BeEnumerableOf <int>() .BeEqualTo(expected, testIndexOf: false); }
public int[] Hyperlinq_SIMD() => ValueEnumerable.Repeat(0, Count).ToArrayVector();
public int[] Hyperlinq() => ValueEnumerable.Repeat(0, Count).ToArray();