public void ForDecimalWithStep() { var actual = Itertools.Count(1.1m, -0.4m).Take(3).ToList(); Assert.Equal(new List <decimal> { 1.1m, 0.7m, 0.3m }, actual); }
public void ForFloatWithNegativeStep() { var actual = Itertools.Count(6f, -7f).Take(3).ToList(); Assert.Equal(new List <float> { 6f, -1f, -8 }, actual); }
public void ForNegativeDoubleWithoutStep() { var actual = Itertools.Count(-2d).Take(3).ToList(); Assert.Equal(new List <double> { -2d, -1d, 0d }, actual); }
public void ForIntegerWithStep() { var actual = Itertools.Count(0, 3).Take(10).ToList(); Assert.StrictEqual(10, actual.Count); Assert.Equal(0, actual[0]); Assert.Equal(9, actual[3]); }