diff --git a/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs b/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs index b8a9de2b3c59a7908974d880877fdf8d4bcd2fb3..57e2fa6364e557041f8fd5e816e6fb80957620cc 100644 --- a/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs +++ b/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs @@ -52,7 +52,12 @@ namespace MonoTests.System.Reflection [TestFixture] public class MethodInfoTest { +#if MONOTOUCH + // use an existing symbol - so we can build without dlsym. It does not matter that the signature does not match for the test + [DllImport ("libc", EntryPoint="readlink", CharSet=CharSet.Unicode, ExactSpelling=false, PreserveSig=true, SetLastError=true, BestFitMapping=true, ThrowOnUnmappableChar=true)] +#else [DllImport ("libfoo", EntryPoint="foo", CharSet=CharSet.Unicode, ExactSpelling=false, PreserveSig=true, SetLastError=true, BestFitMapping=true, ThrowOnUnmappableChar=true)] +#endif public static extern void dllImportMethod (); [MethodImplAttribute(MethodImplOptions.PreserveSig)] public void preserveSigMethod () @@ -108,8 +113,13 @@ namespace MonoTests.System.Reflection DllImportAttribute attr = (DllImportAttribute)((t.GetMethod ("dllImportMethod").GetCustomAttributes (typeof (DllImportAttribute), true)) [0]); Assert.AreEqual (CallingConvention.Winapi, attr.CallingConvention, "#1"); +#if MONOTOUCH + Assert.AreEqual ("readlink", attr.EntryPoint, "#2"); + Assert.AreEqual ("libc", attr.Value, "#3"); +#else Assert.AreEqual ("foo", attr.EntryPoint, "#2"); Assert.AreEqual ("libfoo", attr.Value, "#3"); +#endif Assert.AreEqual (CharSet.Unicode, attr.CharSet, "#4"); Assert.AreEqual (false, attr.ExactSpelling, "#5"); Assert.AreEqual (true, attr.PreserveSig, "#6"); diff --git a/mcs/class/corlib/Test/System.Runtime.InteropServices/MarshalTest.cs b/mcs/class/corlib/Test/System.Runtime.InteropServices/MarshalTest.cs index 92675b00f7c5750c04f019b47b6484ff6c3b4219..4c38e08ed56fe67b422dce6c7714467301f738c9 100644 --- a/mcs/class/corlib/Test/System.Runtime.InteropServices/MarshalTest.cs +++ b/mcs/class/corlib/Test/System.Runtime.InteropServices/MarshalTest.cs @@ -805,6 +805,7 @@ namespace MonoTests.System.Runtime.InteropServices } } +#if !MOBILE [DllImport ("kernel32.dll", SetLastError = true)] [PreserveSig] static extern uint GetModuleFileName ( @@ -816,6 +817,7 @@ namespace MonoTests.System.Runtime.InteropServices [MarshalAs (UnmanagedType.U4)] int nSize ); +#endif } #if !NET_2_1 [ComImport()] diff --git a/mcs/class/corlib/Test/System.Security.Cryptography.X509Certificates/X509CapiTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography.X509Certificates/X509CapiTest.cs index 50dfe0e157df65b0feb65022d4502a02f092a5f1..328bbb54a50487b7c5d48879374476d27d145da3 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography.X509Certificates/X509CapiTest.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography.X509Certificates/X509CapiTest.cs @@ -72,6 +72,7 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates { File.Delete("temp.b64"); } +#if !MOBILE public IntPtr GetHandleEx (byte[] certificate) { CertificateContext cc = new CertificateContext (); @@ -151,6 +152,7 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates { Assert.AreEqual (serial, x509.GetSerialNumber (), "GetSerialNumber"); Assert.AreEqual ("02720006E8", x509.GetSerialNumberString (), "GetSerialNumberString"); } +#endif [Test] [ExpectedException (typeof (ArgumentException))]