Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite093acd

Browse files
committed
add print to crashing test
1 parent2d1a007 commite093acd

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
publicstaticvoidTestMemoryMapping()
3131
{
32+
System.Console.WriteLine("TestMemoryMapping");
3233
Assert.That(()=>{var_=TypeManager.CreateMemoryMapper();},Throws.Nothing);
3334
varmapper=TypeManager.CreateMemoryMapper();
3435

36+
System.Console.WriteLine("TestMemoryMapping 1");
3537
// Allocate a read-write page.
3638
intlen=12;
3739
varpage=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)

[8]ページ先頭

©2009-2025 Movatter.jp