Merge pull request #2816 from xmcclure/profile-clean-0
[mono.git] / mono / tests / libtest.c
index de80d9f693f06a8e96a032c2da3cbb9423792e19..dbd2e9ad1cc108d8ee2ebbb383738f9b84999af4 100644 (file)
@@ -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)
 {