public void RunIteratorTests(IReadOnlyList <int> source) { var a = source.Append(1000); var b = a.Prepend(1001); var c = b.Append(1002); var d = c.Append(1003); var e = d.Prepend(1004); var f = e.Prepend(1005); Assert.Equal(a.Count, source.Count + 1); Assert.Equal(b.Count, source.Count + 2); Assert.Equal(c.Count, source.Count + 3); Assert.Equal(d.Count, source.Count + 4); Assert.Equal(e.Count, source.Count + 5); Assert.Equal(f.Count, source.Count + 6); var runner = new IteratorTests(); runner.RunTests(a); runner.RunTests(b); runner.RunTests(c); runner.RunTests(d); runner.RunTests(e); runner.RunTests(f); }
public void RunIteratorTests() { var runner = new IteratorTests(); runner.RunTests(ReadOnlyList.Range(0, 0)); runner.RunTests(ReadOnlyList.Range(1, 0)); runner.RunTests(ReadOnlyList.Range(-1, 0)); runner.RunTests(ReadOnlyList.Range(0, 30)); runner.RunTests(ReadOnlyList.Range(1, 30)); runner.RunTests(ReadOnlyList.Range(-1, 30)); }
public void RunIteratorTests() { var runner = new IteratorTests(); runner.RunTests(ReadOnlyList.Repeat <string>(null, 0)); runner.RunTests(ReadOnlyList.Repeat <string>(null, 30)); runner.RunTests(ReadOnlyList.Repeat("Hi", 0)); runner.RunTests(ReadOnlyList.Repeat("Hi", 30)); runner.RunTests(ReadOnlyList.Repeat(42, 0)); runner.RunTests(ReadOnlyList.Repeat(42, 30)); }