[Mono-dev] encountered a vm assertion failure trying to run Moq Tests

Bas Smit basjsmit at gmail.com
Wed Feb 4 19:14:52 EST 2009


Hi guys,

Im working on getting Moq to work with Mono, and when running the moq tests
I encountered an assertion failure from the vm. I reduced the code below.
Ive submitted a bug here: https://bugzilla.novell.com/show_bug.cgi?id=472692.
Im running the windows 2.4 preview 2.

public class Program
{
    static void Main()
    {
        var t = new Foo<object>();
        var asMethod = t.GetType().GetMethod("Bar");
        var asInterface = asMethod.MakeGenericMethod(typeof(object));
        var asMock = asInterface.Invoke(t, null);
    }
}

public class Foo<T>
{
    public virtual Helper<TInt> Bar<TInt>()
    {
        return new Helper<TInt>();
    }
}

public class Helper<T> { }

Cheers, Bas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20090205/cf0ac435/attachment.html 


More information about the Mono-devel-list mailing list