Exemple #1
0
 public void range_empty_boxed()
 {
     Assert.Equal(0, SpanEnumerable.Range(1, 0).Box().LastOrDefault());
 }
Exemple #2
0
 public void range_true()
 {
     Assert.True(SpanEnumerable.Range(1, 30)
                 .Select(v => v % 3 == 0)
                 .AnyTrue());
 }
Exemple #3
0
 public void range()
 {
     Assert.True(SpanEnumerable.Range(1, 30).Any());
 }
Exemple #4
0
 public void range_where()
 {
     Assert.True(SpanEnumerable.Range(1, 30)
                 .Where(p => p <= 15)
                 .Any());
 }
Exemple #5
0
 public void range_odd()
 {
     Assert.True(SpanEnumerable.Range(1, 29).Any(v => v % 2 != 0));
 }
Exemple #6
0
 public void range_empty_boxed()
 {
     Assert.Equal(0, SpanEnumerable.Range(5, 0).SingleOrDefault());
 }
Exemple #7
0
 public void range_odd_empty_boxed()
 {
     Assert.Equal(0, SpanEnumerable.Range(4, 1).Box()
                  .SingleOrDefault(v => v % 2 != 0));
 }
Exemple #8
0
 public void range_boxed()
 {
     Assert.Equal(30, SpanEnumerable.Range(1, 30).Box().Last());
 }
Exemple #9
0
 public void range_even()
 {
     Assert.Equal(2, SpanEnumerable.Range(1, 30).FirstOrDefault(v => v % 2 == 0));
 }
Exemple #10
0
 public void range_true()
 {
     Assert.Equal(10, SpanEnumerable.Range(1, 30)
                  .Select(v => v % 3 == 0)
                  .CountTrue());
 }
Exemple #11
0
 public void range_odd_boxed()
 {
     Assert.Equal(29, SpanEnumerable.Range(1, 30).Box().Last(v => v % 2 != 0));
 }
Exemple #12
0
 public void range_odd_boxed()
 {
     Assert.Equal(15, SpanEnumerable.Range(1, 29).Box().Count(v => v % 2 != 0));
 }
Exemple #13
0
 public void range_where()
 {
     Assert.Equal(15, SpanEnumerable.Range(1, 30)
                  .Where(p => p <= 15)
                  .Count());
 }
Exemple #14
0
 public void range()
 {
     Assert.Equal(30, SpanEnumerable.Range(1, 30).Count());
 }
Exemple #15
0
        public void range_doubles()
        {
            var sum = SpanEnumerable.Range(1, 30).Select(i => (double)i).Sum();

            Assert.Equal(465.0, sum);
        }
Exemple #16
0
 public void range()
 {
     Assert.Equal(1, SpanEnumerable.Range(1, 30).FirstOrDefault());
 }
Exemple #17
0
 public void range_boxed()
 {
     Assert.Equal(5, SpanEnumerable.Range(5, 1).Box().SingleOrDefault());
 }
Exemple #18
0
 public void range_empty()
 {
     Assert.Equal(0, SpanEnumerable.Range(1, 0).FirstOrDefault());
 }
Exemple #19
0
 public void range_odd()
 {
     Assert.Equal(5, SpanEnumerable.Range(4, 3).SingleOrDefault(v => v % 2 != 0));
 }
Exemple #20
0
 public void range_all_boxed()
 {
     Assert.True(SpanEnumerable.Range(1, 29).Box().All(v => v <= 30));
 }
Exemple #21
0
 public void range_boxed()
 {
     Assert.True(SpanEnumerable.Range(1, 30).Box().Any());
 }
Exemple #22
0
 public void range_all_true()
 {
     Assert.True(SpanEnumerable.Range(1, 30)
                 .Select(v => v >= 0)
                 .AllTrue());
 }
Exemple #23
0
 public void range_where_empty()
 {
     Assert.False(SpanEnumerable.Range(1, 30)
                  .Where(p => p <= 0)
                  .Any());
 }
Exemple #24
0
 public void range_odd()
 {
     Assert.False(SpanEnumerable.Range(1, 29).All(v => v % 2 != 0));
 }
Exemple #25
0
 public void range_none()
 {
     Assert.False(SpanEnumerable.Range(1, 29).Any(v => v > 30));
 }
Exemple #26
0
        public void range_ints()
        {
            var sum = SpanEnumerable.Range(1, 30).Sum();

            Assert.Equal(465, sum);
        }
Exemple #27
0
 public void range_none_true()
 {
     Assert.False(SpanEnumerable.Range(1, 30)
                  .Select(v => v < 0)
                  .AnyTrue());
 }
Exemple #28
0
        public void range_floats()
        {
            var sum = SpanEnumerable.Range(1, 30).Select(i => (float)i).Sum();

            Assert.Equal(465.0f, sum);
        }
Exemple #29
0
 public void range_empty()
 {
     Assert.False(SpanEnumerable.Range(1, 0).Any());
 }
Exemple #30
0
 public void range_odd()
 {
     Assert.Equal(29, SpanEnumerable.Range(1, 30).LastOrDefault(v => v % 2 != 0));
 }