Skip to content

Commit b8a2bc8

Browse files
committed
Remove stack tracing from unit tests.
1 parent 76fc448 commit b8a2bc8

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

TessBed/UnitTests.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ public class TestPool : IPool
3636
{
3737
private IDictionary<Type, int> _newCount = new Dictionary<Type, int>();
3838
private IDictionary<Type, int> _freeCount = new Dictionary<Type, int>();
39-
private IDictionary<object, string> _stacks = new Dictionary<object, string>();
4039

4140
public override T Get<T>()
4241
{
@@ -47,7 +46,6 @@ public override T Get<T>()
4746
_newCount[typeof(T)]++;
4847
var obj = new T();
4948
obj.Init(this);
50-
_stacks[obj] = System.Environment.StackTrace;
5149
return obj;
5250
}
5351

@@ -62,7 +60,6 @@ public override void Return<T>(T obj)
6260
return;
6361
}
6462
obj.Reset(this);
65-
_stacks.Remove(obj);
6663
if (!_freeCount.ContainsKey(typeof(T)))
6764
{
6865
_freeCount.Add(typeof(T), 0);
@@ -76,10 +73,6 @@ public override void Return<T>(T obj)
7673

7774
public void AssertCounts()
7875
{
79-
foreach (var stack in _stacks)
80-
{
81-
System.Diagnostics.Debug.WriteLine("Not freed: {0}, allocated from\n{1}", stack.Key.GetType().Name, stack.Value);
82-
}
8376
foreach (var type in _newCount)
8477
{
8578
Assert.AreEqual(type.Value, _freeCount[type.Key], type.Key.ToString());

0 commit comments

Comments
 (0)