Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mcs/class/corlib/Test/System.Reflection')
-rw-r--r--mcs/class/corlib/Test/System.Reflection/AssemblyAlgorithmIdAttributeTest.cs2
-rw-r--r--mcs/class/corlib/Test/System.Reflection/AssemblyTest.cs23
-rw-r--r--mcs/class/corlib/Test/System.Reflection/FieldInfoTest.cs2
-rw-r--r--mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs12
-rw-r--r--mcs/class/corlib/Test/System.Reflection/ModuleTest.cs6
-rw-r--r--mcs/class/corlib/Test/System.Reflection/MonoGenericClassTest.cs2
-rw-r--r--mcs/class/corlib/Test/System.Reflection/PropertyInfoTest.cs4
-rw-r--r--mcs/class/corlib/Test/System.Reflection/TypeDelegatorTest.cs2
-rw-r--r--mcs/class/corlib/Test/System.Reflection/VisibilityTest.cs2
9 files changed, 33 insertions, 22 deletions
diff --git a/mcs/class/corlib/Test/System.Reflection/AssemblyAlgorithmIdAttributeTest.cs b/mcs/class/corlib/Test/System.Reflection/AssemblyAlgorithmIdAttributeTest.cs
index b88423a68f3..77e8e6df1af 100644
--- a/mcs/class/corlib/Test/System.Reflection/AssemblyAlgorithmIdAttributeTest.cs
+++ b/mcs/class/corlib/Test/System.Reflection/AssemblyAlgorithmIdAttributeTest.cs
@@ -5,7 +5,7 @@
// (C) 2004 Ximian, Inc. http://www.ximian.com
//
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
using System;
using System.Threading;
diff --git a/mcs/class/corlib/Test/System.Reflection/AssemblyTest.cs b/mcs/class/corlib/Test/System.Reflection/AssemblyTest.cs
index 7d561f4f9e5..de8f4bdbca5 100644
--- a/mcs/class/corlib/Test/System.Reflection/AssemblyTest.cs
+++ b/mcs/class/corlib/Test/System.Reflection/AssemblyTest.cs
@@ -37,7 +37,7 @@ using System.Configuration.Assemblies;
using System.Globalization;
using System.IO;
using System.Reflection;
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
using System.Reflection.Emit;
#endif
using System.Threading;
@@ -197,7 +197,7 @@ namespace MonoTests.System.Reflection
#endif
}
-#if !MONOTOUCH // Reflection.Emit is not supported.
+#if !MONOTOUCH && !MOBILE_STATIC // Reflection.Emit is not supported.
[Test]
[Category("AndroidNotWorking")] // Missing Mono.CompilerServices.SymbolWriter
public void GetModules_MissingFile ()
@@ -249,7 +249,7 @@ namespace MonoTests.System.Reflection
public void Corlib_test ()
{
Assembly corlib_test = Assembly.GetExecutingAssembly ();
-#if MONODROID
+#if MONODROID || MOBILE_STATIC
Assert.IsNull (corlib_test.EntryPoint, "EntryPoint");
Assert.IsNull (corlib_test.Evidence, "Evidence");
#elif MOBILE
@@ -457,7 +457,18 @@ namespace MonoTests.System.Reflection
[Test]
public void LoadWithPartialName ()
{
- string [] names = { "corlib_test_net_1_1", "corlib_test_net_2_0", "corlib_test_net_4_0", "corlib_test_net_4_5", "corlib_test_net_4_x", "corlib_plattest", "mscorlibtests", "BclTests" };
+// FIXME?
+// So the problem here is that if we load an assembly
+// in a fully aot mode and then cannot load the
+// dylib, we will assert. This test is incompatible
+// with the semantics of aot'ed assembly loading, as
+// aot may assert when loading. This assumes that it's
+// safe to greedly load everything.
+#if MOBILE_STATIC
+ string [] names = { "mobile_static_corlib_test" };
+#else
+ string [] names = { "corlib_test_net_1_1", "corlib_test_net_2_0", "corlib_test_net_4_0", "corlib_test_net_4_5", "net_4_x_corlib_test", "corlib_plattest", "mscorlibtests", "BclTests" };
+#endif
foreach (string s in names)
if (Assembly.LoadWithPartialName (s) != null)
@@ -502,7 +513,7 @@ namespace MonoTests.System.Reflection
}
}
-#if !MONOTOUCH // Reflection.Emit is not supported.
+#if !MONOTOUCH && !MOBILE_STATIC // Reflection.Emit is not supported.
[Test]
public void Location_Empty() {
string assemblyFileName = Path.Combine (
@@ -1175,7 +1186,7 @@ namespace MonoTests.System.Reflection
Assert.AreEqual ("MonoModule", module.GetType ().Name, "#2");
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
Assert.AreEqual ("mscorlib.dll", module.Name, "#3");
#endif
Assert.IsFalse (module.IsResource (), "#4");
diff --git a/mcs/class/corlib/Test/System.Reflection/FieldInfoTest.cs b/mcs/class/corlib/Test/System.Reflection/FieldInfoTest.cs
index 410c4c239a0..f06debd8ebb 100644
--- a/mcs/class/corlib/Test/System.Reflection/FieldInfoTest.cs
+++ b/mcs/class/corlib/Test/System.Reflection/FieldInfoTest.cs
@@ -31,7 +31,7 @@
using System;
using System.Threading;
using System.Reflection;
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
using System.Reflection.Emit;
#endif
using System.Runtime.InteropServices;
diff --git a/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs b/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs
index 17ddddd3e04..53617c4e70f 100644
--- a/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs
+++ b/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs
@@ -33,7 +33,7 @@ using NUnit.Framework;
using System;
using System.Threading;
using System.Reflection;
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
using System.Reflection.Emit;
#endif
using System.Runtime.InteropServices;
@@ -54,7 +54,7 @@ namespace MonoTests.System.Reflection
[TestFixture]
public class MethodInfoTest
{
-#if MONOTOUCH
+#if MONOTOUCH || MOBILE_STATIC
// 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
@@ -115,7 +115,7 @@ namespace MonoTests.System.Reflection
DllImportAttribute attr = (DllImportAttribute)((t.GetMethod ("dllImportMethod").GetCustomAttributes (typeof (DllImportAttribute), true)) [0]);
Assert.AreEqual (CallingConvention.Winapi, attr.CallingConvention, "#1");
-#if MONOTOUCH
+#if MONOTOUCH || MOBILE_STATIC
Assert.AreEqual ("readlink", attr.EntryPoint, "#2");
Assert.AreEqual ("libc", attr.Value, "#3");
#else
@@ -397,7 +397,7 @@ namespace MonoTests.System.Reflection
[Test]
public void GetMethodBody ()
{
-#if MONOTOUCH && !DEBUG
+#if (MONOTOUCH || MOBILE_STATIC) && !DEBUG
Assert.Ignore ("Release app (on devices) are stripped of (managed) IL so this test would fail");
#endif
MethodBody mb = typeof (MethodInfoTest).GetMethod ("locals_method").GetMethodBody ();
@@ -600,7 +600,7 @@ namespace MonoTests.System.Reflection
} catch (InvalidOperationException ex) {
}
}
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
public TFoo SimpleGenericMethod2<TFoo, TBar> () { return default (TFoo); }
/*Test for the uggly broken behavior of SRE.*/
[Test]
@@ -854,7 +854,7 @@ namespace MonoTests.System.Reflection
}
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
class GenericClass<T>
{
public void Method ()
diff --git a/mcs/class/corlib/Test/System.Reflection/ModuleTest.cs b/mcs/class/corlib/Test/System.Reflection/ModuleTest.cs
index 04c941a9526..c93fecfa422 100644
--- a/mcs/class/corlib/Test/System.Reflection/ModuleTest.cs
+++ b/mcs/class/corlib/Test/System.Reflection/ModuleTest.cs
@@ -10,7 +10,7 @@
using System;
using System.Threading;
using System.Reflection;
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
using System.Reflection.Emit;
#endif
using System.Runtime.Serialization;
@@ -93,7 +93,7 @@ public class ModuleTest
}
// Some of these tests overlap with the tests for ModuleBuilder
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
[Test]
[Category("NotDotNet")] // path length can cause suprious failures
public void TestGlobalData () {
@@ -328,7 +328,7 @@ public class ModuleTest
Module m = typeof (ModuleTest).Module;
m.GetObjectData (null, new StreamingContext (StreamingContextStates.All));
}
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
[Test]
[Category ("AndroidNotWorking")] // Mono.CompilerServices.SymbolWriter not available for Xamarin.Android
public void GetTypes ()
diff --git a/mcs/class/corlib/Test/System.Reflection/MonoGenericClassTest.cs b/mcs/class/corlib/Test/System.Reflection/MonoGenericClassTest.cs
index 9db8bda20fd..d31b99fa495 100644
--- a/mcs/class/corlib/Test/System.Reflection/MonoGenericClassTest.cs
+++ b/mcs/class/corlib/Test/System.Reflection/MonoGenericClassTest.cs
@@ -7,7 +7,7 @@
// Copyright 2011 Xamarin Inc (http://www.xamarin.com).
//
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
using System;
using System.Collections;
diff --git a/mcs/class/corlib/Test/System.Reflection/PropertyInfoTest.cs b/mcs/class/corlib/Test/System.Reflection/PropertyInfoTest.cs
index dd38e16b7e5..2fe870111ca 100644
--- a/mcs/class/corlib/Test/System.Reflection/PropertyInfoTest.cs
+++ b/mcs/class/corlib/Test/System.Reflection/PropertyInfoTest.cs
@@ -31,7 +31,7 @@ using System;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Threading;
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
using System.Reflection.Emit;
#endif
using System.IO;
@@ -355,7 +355,7 @@ namespace MonoTests.System.Reflection
get { return 99; }
}
}
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
[Test]
public void ConstantValue () {
/*This test looks scary because we can't generate a default value with C# */
diff --git a/mcs/class/corlib/Test/System.Reflection/TypeDelegatorTest.cs b/mcs/class/corlib/Test/System.Reflection/TypeDelegatorTest.cs
index c1fc39a59c3..6c6cb45a406 100644
--- a/mcs/class/corlib/Test/System.Reflection/TypeDelegatorTest.cs
+++ b/mcs/class/corlib/Test/System.Reflection/TypeDelegatorTest.cs
@@ -28,7 +28,7 @@
using System;
using System.Threading;
using System.Reflection;
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
using System.Reflection.Emit;
#endif
diff --git a/mcs/class/corlib/Test/System.Reflection/VisibilityTest.cs b/mcs/class/corlib/Test/System.Reflection/VisibilityTest.cs
index 3dcb3ae2480..fcf64a19300 100644
--- a/mcs/class/corlib/Test/System.Reflection/VisibilityTest.cs
+++ b/mcs/class/corlib/Test/System.Reflection/VisibilityTest.cs
@@ -24,7 +24,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
using System;
using System.Linq;