X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2Fcorlib%2FTest%2FSystem%2FDelegateTest.cs;h=ba664353ab9e0056492a1ae525057969609af25e;hb=3fd54893bc792eee42164bfb605b418105a92f92;hp=ae5a82908c861894674a758b8ba8496d5027da2a;hpb=50f2a1035897acdda56cc97cdeee18680442fad6;p=mono.git diff --git a/mcs/class/corlib/Test/System/DelegateTest.cs b/mcs/class/corlib/Test/System/DelegateTest.cs index ae5a82908c8..ba664353ab9 100644 --- a/mcs/class/corlib/Test/System/DelegateTest.cs +++ b/mcs/class/corlib/Test/System/DelegateTest.cs @@ -1251,7 +1251,7 @@ namespace MonoTests.System } } - delegate int IntNoArgs (); + public delegate int IntNoArgs (); [Test] public void CreateDelegateWithAbstractMethods () @@ -1445,6 +1445,18 @@ namespace MonoTests.System var del = Delegate.Remove (del1, del2); } + [Test] + [ExpectedException (typeof (ArgumentException))] + public void CreateDelegateThrowsAnArgumentExceptionWhenCalledWithAnOpenGeneric() + { + var m = GetType().GetMethod("AnyGenericMethod"); + Delegate.CreateDelegate(typeof(Action), this, m); + } + + public void AnyGenericMethod() + { + } + static bool Int32D2 (int x, int y) { return (x & y) == y;