Strange NCover results

Strange NCover results

Here is a strange one.

I'm using Visual Studio .NET 2005 with NCover 1.5.4.0 and NUnit 2.2.5 for .NET 2.0. I have created the following classes in a C# library:

     public class Collection<T>
    {
        public Collection()
        {
        }

        public Collection(IEnumerable<T> items)
        {
        }

        public Collection(bool allowNull)
        {
        }

        public Collection(bool allowNull, IEnumerable<T> items)
        {
        }
    }

   [TestFixture]
    public class Collection_Test
    {
        [Test]
        public void Contructors()
        {
            Collection<int> col = new Collection<int>();
            col = new Collection<int>(true, new int[] { 1, 2, 3 });
            col = new Collection<int>(new int[] { 1, 2 });
            col = new Collection<int>(true);
        }

        [Test]
        public void V()
        {
            Collection<object> col = new Collection<object>(true);
        }
    }

The Collection_Test class covers 100% of the Collection class. However, the results from NCover indicate that only one of the constructors is being visited.

The strangest part is that if I change the Collection_Test.V() method to Collection_Test.A(), for example, I then get the results I expect from NCover.


Re: Source code

Good question. I can't find it either.

I've been to ncover.sourceforge.net, which seems to have been abandoned, and I saw somebody mentioned a "source.zip" but I don't see it anyway. Sorry if I'm being stupid.


Re: Source code

Ok, I've also found this svn repository:

 http://www.svn-hosting.com/trac/NCover/browser/

But that's not the latest source either.