diff options
author | Jb Evain <jbevain@gmail.com> | 2012-01-10 13:45:44 +0400 |
---|---|---|
committer | Jb Evain <jbevain@gmail.com> | 2012-01-10 13:45:44 +0400 |
commit | 5e1d16e8d15973d10ade78b9f784b6bec7ee1bad (patch) | |
tree | e19e67530458100e6b7d9055c938b50050605fd1 /Test | |
parent | 5c32193186da4a398789e4df0a734e34f1bea2a0 (diff) |
Properly write pe32+ binaries. Fixes bug #86.
Diffstat (limited to 'Test')
-rw-r--r-- | Test/Mono.Cecil.Tests/ImageReadTests.cs | 40 |
1 files changed, 16 insertions, 24 deletions
diff --git a/Test/Mono.Cecil.Tests/ImageReadTests.cs b/Test/Mono.Cecil.Tests/ImageReadTests.cs index c601fc9..e77bfe0 100644 --- a/Test/Mono.Cecil.Tests/ImageReadTests.cs +++ b/Test/Mono.Cecil.Tests/ImageReadTests.cs @@ -88,40 +88,32 @@ namespace Mono.Cecil.Tests { Assert.AreEqual (1, heap [Table.AssemblyRef].Length); } - [Test] - public void ReadX64Image () + [TestModule ("hello.x64.exe")] + public void X64Module (ModuleDefinition module) { - var image = GetResourceImage ("hello.x64.exe"); - - Assert.AreEqual (TargetArchitecture.AMD64, image.Architecture); - Assert.AreEqual (ModuleAttributes.ILOnly, image.Attributes); + Assert.AreEqual (TargetArchitecture.AMD64, module.Image.Architecture); + Assert.AreEqual (ModuleAttributes.ILOnly, module.Image.Attributes); } - [Test] - public void ReadIA64Image () + [TestModule ("hello.ia64.exe")] + public void IA64Module (ModuleDefinition module) { - var image = GetResourceImage ("hello.ia64.exe"); - - Assert.AreEqual (TargetArchitecture.IA64, image.Architecture); - Assert.AreEqual (ModuleAttributes.ILOnly, image.Attributes); + Assert.AreEqual (TargetArchitecture.IA64, module.Image.Architecture); + Assert.AreEqual (ModuleAttributes.ILOnly, module.Image.Attributes); } - [Test] - public void ReadX86Image () + [TestModule ("hello.x86.exe")] + public void X86Module (ModuleDefinition module) { - var image = GetResourceImage ("hello.x86.exe"); - - Assert.AreEqual (TargetArchitecture.I386, image.Architecture); - Assert.AreEqual (ModuleAttributes.ILOnly | ModuleAttributes.Required32Bit, image.Attributes); + Assert.AreEqual (TargetArchitecture.I386, module.Image.Architecture); + Assert.AreEqual (ModuleAttributes.ILOnly | ModuleAttributes.Required32Bit, module.Image.Attributes); } - [Test] - public void ReadAnyCpuImage () + [TestModule ("hello.anycpu.exe")] + public void AnyCpuModule (ModuleDefinition module) { - var image = GetResourceImage ("hello.anycpu.exe"); - - Assert.AreEqual (TargetArchitecture.I386, image.Architecture); - Assert.AreEqual (ModuleAttributes.ILOnly, image.Attributes); + Assert.AreEqual (TargetArchitecture.I386, module.Image.Architecture); + Assert.AreEqual (ModuleAttributes.ILOnly, module.Image.Attributes); } } } |