Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e093acd

Browse files
committed
add print to crashing test
1 parent 2d1a007 commit e093acd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/embed_tests/TestTypeManager.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,18 @@ public static void TestNativeCode()
2929
[Test]
3030
public static void TestMemoryMapping()
3131
{
32+
System.Console.WriteLine("TestMemoryMapping");
3233
Assert.That(() => { var _ = TypeManager.CreateMemoryMapper(); }, Throws.Nothing);
3334
var mapper = TypeManager.CreateMemoryMapper();
3435

36+
System.Console.WriteLine("TestMemoryMapping 1");
3537
// Allocate a read-write page.
3638
int len = 12;
3739
var page = mapper.MapWriteable(len);
3840
Assert.That(() => { Marshal.WriteInt64(page, 17); }, Throws.Nothing);
3941
Assert.That(Marshal.ReadInt64(page), Is.EqualTo(17));
4042

43+
System.Console.WriteLine("TestMemoryMapping 2");
4144
// Mark it read-execute. We can still read, haven't changed any values.
4245
mapper.SetReadExec(page, len);
4346
Assert.That(Marshal.ReadInt64(page), Is.EqualTo(17));
@@ -54,10 +57,13 @@ public static void TestMemoryMapping()
5457
// We can't use compiler flags because we compile with MONO_LINUX
5558
// while running on the Microsoft .NET Core during continuous
5659
// integration tests.
60+
System.Console.WriteLine("TestMemoryMapping 3");
5761
if (System.Type.GetType ("Mono.Runtime") != null)
5862
{
5963
// Mono throws NRE instead of AccessViolationException for some reason.
6064
Assert.That(() => { Marshal.WriteInt64(page, 73); }, Throws.TypeOf<System.NullReferenceException>());
65+
66+
System.Console.WriteLine("TestMemoryMapping 4");
6167
Assert.That(Marshal.ReadInt64(page), Is.EqualTo(17));
6268
}
6369
}

0 commit comments

Comments
 (0)