I tried to use the bug report feature, but it would not work.
The following code will cause ncrunch to crash when automatic test running is enabled. Visual studio 2010, NUnit 2.5.1 that comes with ReSharper 6:
Code:
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using CustomExtensions.ForIEnumerable;
using NUnit.Framework;
namespace UnitTests.ForIEnumerablesTests
{
[TestFixture]
public class IsEmptyTest
{
// Class to test non-Generic ICollection
private class TestObj <T> : ArrayList, IEnumerable<T>
{
public IEnumerator<T> GetEnumerator()
{
return GetEnumerator();
}
}
[Test]
public void TestTestObj()
{
var testObj = new TestObj<int>();
testObj.Add(1);
Assert.That(() => testObj.ToList(), Throws.Nothing); // <== Uncommenting this line will cause instant crash
}
}
Let me know if any additional info required.