Ejemplo n.º 1
0
        public void RepeatList()
        {
            List <float> a = LinqFaster.RepeatListF(2.0f, 10);
            List <float> b = Enumerable.Repeat(2.0f, 10).ToList();

            Assert.That(a, Is.EqualTo(b));
        }
Ejemplo n.º 2
0
        public void RepeatList()
        {
            var a = LinqFaster.RepeatListF(2.0f, 10);
            var b = Enumerable.Repeat(2.0f, 10).ToList();

            Assert.That(a, Is.EqualTo(b));
        }
Ejemplo n.º 3
0
        public void SelectManyList()
        {
            List <float> a = floatList.SelectManyF(x => LinqFaster.RepeatListF(x, 2));
            List <float> b = floatList.SelectMany(x => Enumerable.Repeat(x, 2).ToList()).ToList();

            Assert.That(a, Is.EqualTo(b));

            a = floatList.SelectManyF((x, i) => LinqFaster.RepeatListF(x + i, 2));
            b = floatList.SelectMany((x, i) => Enumerable.Repeat(x + i, 2).ToList()).ToList();

            Assert.That(a, Is.EqualTo(b));
        }