Skip to content

Commit

Permalink
Make test failures easier to parse.
Browse files Browse the repository at this point in the history
  • Loading branch information
AArnott committed Nov 16, 2014
1 parent fe6ec0a commit e04a791
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/System.Collections.Immutable/tests/ImmutableListTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -197,23 +197,24 @@ public void InsertRangeRandomBalanceTest()
var list = new List<int>();

const int maxBatchSize = 32;
int valueCounter = 0;
for (int i = 0; i < 24; i++)
{
int startPosition = random.Next(list.Count + 1);
int length = random.Next(maxBatchSize + 1);
int[] values = new int[length];
for (int j = 0; j < length; j++)
{
values[j] = random.Next();
values[j] = ++valueCounter;
}

immutableList.InsertRange(startPosition, values);
list.InsertRange(startPosition, values);

Assert.Equal(list, immutableList);
VerifyBalanced(immutableList.Root);
}

Assert.Equal(list, immutableList);

// Ensure that tree height is no more than 1 from optimal
var root = immutableList.Root as IBinaryTree<int>;

Expand Down

0 comments on commit e04a791

Please sign in to comment.