Skip to content

Commit fc07b2a

Browse files
committed
Update tests to new PE format and output
1 parent 7a5a47c commit fc07b2a

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

MetadataProcessor.Tests/Core/ClrIntegrationTests.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ public void RunBCLTest()
4444

4545
// read standard output
4646
var output = nanoClr.StandardOutput.ReadToEnd();
47+
48+
// look for any error message
49+
Assert.IsFalse(output.Contains("Error:"), "Unexpected error message in output of nanoClr");
4750

4851
// look for the error message reporting that there is no entry point
4952
Assert.IsTrue(output.Contains("Cannot find any entrypoint!"));

MetadataProcessor.Tests/Core/Mono.Cecil/CodeWriterTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,9 +430,9 @@ public void WriteMethodBodyIntegrationTest()
430430

431431

432432
#if DEBUG
433-
var expectedBytesWritten = new byte[] { 0x00, 0x16, 0x0A, 0x00, 0x03, 0x04, 0x58, 0x0A, 0x00, 0xDE, 0x18, 0x0B, 0x00, 0x72, 0x84, 0x01, 0x07, 0x73, 0x0D, 0x80, 0x0C, 0x08, 0x6F, 0x0E, 0x80, 0x0A, 0x00, 0xDE, 0x00, 0x06, 0x0D, 0x2B, 0x00, 0x09, 0x2A, 0x00, 0x00, 0x11, 0x80, 0x03, 0x00, 0x0B, 0x00, 0x0B, 0x00, 0x23, 0x00, 0x01 };
433+
var expectedBytesWritten = new byte[] { 0x00, 0x16, 0x0A, 0x00, 0x03, 0x04, 0x58, 0x0A, 0x00, 0xDE, 0x18, 0x0B, 0x00, 0x72, 0xAE, 0x01, 0x07, 0x73, 0x15, 0x80, 0x0C, 0x08, 0x6F, 0x16, 0x80, 0x0A, 0x00, 0xDE, 0x00, 0x06, 0x0D, 0x2B, 0x00, 0x09, 0x2A, 0x00, 0x00, 0x11, 0x80, 0x03, 0x00, 0x0B, 0x00, 0x0B, 0x00, 0x23, 0x00, 0x01 };
434434
#else
435-
var expectedBytesWritten = new byte[] { 0x16, 0x0A, 0x03, 0x04, 0x58, 0x0A, 0xDE, 0x16, 0x0B, 0x72, 0x48, 0x01, 0x07, 0x73, 0x0C, 0x80, 0x0C, 0x08, 0x6F, 0x0D, 0x80, 0x0A, 0xDE, 0x00, 0x06, 0x2A, 0x00, 0x00, 0x0F, 0x80, 0x02, 0x00, 0x08, 0x00, 0x08, 0x00, 0x1E, 0x00, 0x01 };
435+
var expectedBytesWritten = new byte[] { 0x16, 0x0A, 0x03, 0x04, 0x58, 0x0A, 0xDE, 0x16, 0x0B, 0x72, 0x72, 0x01, 0x07, 0x73, 0x13, 0x80, 0x0C, 0x08, 0x6F, 0x14, 0x80, 0x0A, 0xDE, 0x00, 0x06, 0x2A, 0x00, 0x00, 0x0F, 0x80, 0x02, 0x00, 0x08, 0x00, 0x08, 0x00, 0x1E, 0x00, 0x01 };
436436
#endif
437437

438438
CollectionAssert.AreEqual(expectedBytesWritten, bytesWritten, BitConverter.ToString(bytesWritten));

MetadataProcessor.Tests/Core/Tables/nanoAssemblyReferenceTableTests.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,6 @@ public void WriteTest()
9090
{
9191
writerTestOutput.Write(context.StringTable.GetOrCreateStringId(a.Name));
9292

93-
// padding
94-
writerTestOutput.Write((ushort)0x0);
95-
9693
// version
9794
writerTestOutput.Write((ushort)a.Version.Major);
9895
writerTestOutput.Write((ushort)a.Version.Minor);

0 commit comments

Comments
 (0)