Beispiel #1
0
 public void RepeatNone()
 {
     ListCompareTestUtil.ValidateEqual(
         Enumerable.Repeat(5, 0),
         FastLinq.Repeat(5, 0),
         1);
 }
Beispiel #2
0
 public void CountNegative()
 {
     new Action(
         () => FastLinq.Repeat(0, -100))
     .Should()
     .Throw <ArgumentOutOfRangeException>();
 }
Beispiel #3
0
 public void RepeatNull()
 {
     ListCompareTestUtil.ValidateEqual(
         Enumerable.Repeat <object>(null, 3),
         FastLinq.Repeat <object>(null, 3),
         1);
 }
Beispiel #4
0
 public void NominalTest()
 {
     ListCompareTestUtil.ValidateEqual(
         Enumerable.Repeat(5, 10),
         FastLinq.Repeat(5, 10),
         4);
 }
Beispiel #5
0
 public void CountIntMax()
 {
     // Cannot use ListCompare due to memory constraints (in x86 at least)
     new Action(
         () => FastLinq.Repeat(2, int.MaxValue))
     .Should()
     .NotThrow();
 }
Beispiel #6
0
        public void RepeatObject()
        {
            var o = new object();

            ListCompareTestUtil.ValidateEqual(
                Enumerable.Repeat(o, 3),
                FastLinq.Repeat(o, 3),
                1);
        }
 public void Setup()
 {
     this.RepeatList = FastLinq.Repeat(
         1,
         this.SizeOfInput);
 }