You've already forked linux-packaging-mono
Imported Upstream version 5.0.0.42
Former-commit-id: fd56571888259555122d8a0f58c68838229cea2b
This commit is contained in:
parent
1190d13a04
commit
6bdd276d05
@@ -38,7 +38,7 @@ namespace MonoTests.System.Runtime.CompilerServices
|
||||
[TestFixture]
|
||||
public class AsyncTaskMethodBuilderTest
|
||||
{
|
||||
#if !MONOTOUCH && !MOBILE_STATIC
|
||||
#if !MONOTOUCH && !FULL_AOT_RUNTIME
|
||||
// For some reason MT excludes CallContext handling
|
||||
|
||||
[Test]
|
||||
|
@@ -7,6 +7,7 @@
|
||||
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Threading;
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
@@ -45,6 +46,7 @@ namespace MonoTests.System.Runtime.CompilerServices {
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestOffsetToStringData ()
|
||||
{
|
||||
Assert.AreEqual (
|
||||
@@ -52,6 +54,7 @@ namespace MonoTests.System.Runtime.CompilerServices {
|
||||
RuntimeHelpers.OffsetToStringData, "OffsetToStringData is not constant");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestGetObjectValue ()
|
||||
{
|
||||
FooStruct s1;
|
||||
@@ -75,6 +78,7 @@ namespace MonoTests.System.Runtime.CompilerServices {
|
||||
Assert.AreEqual (s2.j, "FOO");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestRunClassConstructor ()
|
||||
{
|
||||
RuntimeHelpers.RunClassConstructor (typeof(FooClass).TypeHandle);
|
||||
@@ -169,6 +173,7 @@ namespace MonoTests.System.Runtime.CompilerServices {
|
||||
RuntimeHelpers.InitializeArray (new Fielder ().array, rfh);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestGetHashCode ()
|
||||
{
|
||||
Assert.AreEqual (0, RuntimeHelpers.GetHashCode (null));
|
||||
@@ -177,6 +182,7 @@ namespace MonoTests.System.Runtime.CompilerServices {
|
||||
Assert.IsTrue (5 != RuntimeHelpers.GetHashCode (new FooClass ()));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestEquals ()
|
||||
{
|
||||
Assert.IsTrue (RuntimeHelpers.Equals (null, null));
|
||||
@@ -197,5 +203,21 @@ namespace MonoTests.System.Runtime.CompilerServices {
|
||||
Assert.IsTrue (RuntimeHelpers.Equals (o1, o3));
|
||||
Assert.IsTrue (!RuntimeHelpers.Equals (o1, o4));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestEnsureSufficientExecutionStack ()
|
||||
{
|
||||
var t = new Thread (() => {
|
||||
unsafe {
|
||||
var s = stackalloc byte [1024];
|
||||
}
|
||||
|
||||
RuntimeHelpers.EnsureSufficientExecutionStack ();
|
||||
});
|
||||
|
||||
|
||||
t.Start ();
|
||||
t.Join ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -247,8 +247,8 @@ namespace MonoTests.System.Runtime.CompilerServices
|
||||
return res.Result;
|
||||
}
|
||||
|
||||
#if !MOBILE_STATIC
|
||||
[Test]
|
||||
[Ignore ("Incompatible with nunitlite")]
|
||||
public void FinishedTaskOnCompleted ()
|
||||
{
|
||||
var mres = new ManualResetEvent (false);
|
||||
@@ -268,12 +268,10 @@ namespace MonoTests.System.Runtime.CompilerServices
|
||||
|
||||
mres.Set ();
|
||||
// this will only terminate correctly if the test was not executed from the main thread
|
||||
// e.g. Touch.Unit defaults to run tests on the main thread and this will return false
|
||||
// e.g. nunitlite/Touch.Unit defaults to run tests on the main thread and this will return false
|
||||
Assert.AreEqual (Thread.CurrentThread.IsBackground, mres2.WaitOne (2000), "#2");;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
[Test]
|
||||
public void CompletionOnSameCustomSynchronizationContext ()
|
||||
{
|
||||
|
Reference in New Issue
Block a user