Imported Upstream version 4.6.0.125

Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2016-08-03 10:59:49 +00:00
parent a569aebcfd
commit e79aa3c0ed
17047 changed files with 3137615 additions and 392334 deletions

View File

@ -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;
@ -182,7 +182,10 @@ namespace MonoTests.System.Reflection
// note: only available in default appdomain
// http://weblogs.asp.net/asanto/archive/2003/09/08/26710.aspx
// Not sure we should emulate this behavior.
#if !MONODROID
#if __WATCHOS__
Assert.IsNull (Assembly.GetEntryAssembly (), "GetEntryAssembly");
Assert.IsTrue (AppDomain.CurrentDomain.IsDefaultAppDomain (), "!default appdomain");
#elif !MONODROID
string fname = AppDomain.CurrentDomain.FriendlyName;
if (fname.EndsWith (".dll")) { // nunit-console
Assert.IsNull (Assembly.GetEntryAssembly (), "GetEntryAssembly");
@ -197,7 +200,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 +252,7 @@ namespace MonoTests.System.Reflection
public void Corlib_test ()
{
Assembly corlib_test = Assembly.GetExecutingAssembly ();
#if MONODROID
#if MONODROID || MOBILE_STATIC || __WATCHOS__
Assert.IsNull (corlib_test.EntryPoint, "EntryPoint");
Assert.IsNull (corlib_test.Evidence, "Evidence");
#elif MOBILE
@ -457,7 +460,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 +516,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 +1189,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");