X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Ftests%2Flibtest.c;h=dbd2e9ad1cc108d8ee2ebbb383738f9b84999af4;hb=1c385f99e1c5e5c76e03c49e838ac29739a2e9e2;hp=de80d9f693f06a8e96a032c2da3cbb9423792e19;hpb=9900f812e2fc72b1e9389c4e7a0602007f256718;p=mono.git diff --git a/mono/tests/libtest.c b/mono/tests/libtest.c index de80d9f693f..dbd2e9ad1cc 100644 --- a/mono/tests/libtest.c +++ b/mono/tests/libtest.c @@ -1109,6 +1109,22 @@ mono_test_marshal_return_delegate_delegate (ReturnDelegateDelegate d) return (d ()) (55); } +typedef int (STDCALL *VirtualDelegate) (int); + +LIBTEST_API int STDCALL +mono_test_marshal_virtual_delegate (VirtualDelegate del) +{ + return del (42); +} + +typedef char* (STDCALL *IcallDelegate) (const char *); +LIBTEST_API int STDCALL +mono_test_marshal_icall_delegate (IcallDelegate del) +{ + char *res = del ("ABC"); + return strcmp (res, "ABC") == 0 ? 0 : 1; +} + LIBTEST_API int STDCALL mono_test_marshal_stringbuilder (char *s, int n) {