mirror of https://github.com/icsharpcode/ILSpy.git
21 changed files with 39 additions and 110 deletions
@ -1,44 +0,0 @@
@@ -1,44 +0,0 @@
|
||||
.assembly extern mscorlib |
||||
{ |
||||
.publickeytoken = ( |
||||
b7 7a 5c 56 19 34 e0 89 |
||||
) |
||||
.ver 4:0:0:0 |
||||
} |
||||
|
||||
.assembly 'ConvTest' |
||||
{ |
||||
.ver 0:0:0:0 |
||||
} |
||||
|
||||
.module ConvTest.exe |
||||
// MVID: {987E1A15-519A-400C-B879-759CFB7F990B} |
||||
.corflags 0x00000001 // ILOnly |
||||
|
||||
.class private auto ansi abstract sealed beforefieldinit Program |
||||
extends [mscorlib]System.Object |
||||
{ |
||||
.method public hidebysig static void Print (native int) cil managed { |
||||
ldarg.0 |
||||
box [mscorlib]System.IntPtr |
||||
call void [mscorlib]System.Console::WriteLine(object) |
||||
ret |
||||
} |
||||
|
||||
.method public hidebysig static void Main (string[] args) cil managed { |
||||
.entrypoint |
||||
.try { |
||||
ldc.i4.0 |
||||
call void Program::Print(native int) |
||||
ldc.i8 7595444518666557374 |
||||
conv.i |
||||
call void Program::Print(native int) |
||||
leave.s eof |
||||
} catch [mscorlib]System.Exception { |
||||
callvirt instance string [mscorlib]System.Object::ToString() |
||||
call void [mscorlib]System.Console::WriteLine(object) |
||||
leave.s eof |
||||
} |
||||
eof: ret |
||||
} |
||||
} |
@ -1,6 +1,6 @@
@@ -1,6 +1,6 @@
|
||||
The files in this folder are correctness tests for the decompiler. |
||||
|
||||
The NUnit class running these tests is ../TestRunner.cs. |
||||
The NUnit class running these tests is ../../CorrectnessTestRunner.cs. |
||||
|
||||
We: |
||||
* compile/assemble a test case (call the result "executable 1") |
@ -1,29 +0,0 @@
@@ -1,29 +0,0 @@
|
||||
// C:\Users\Siegfried\Documents\SharpDevelop Projects\HelloWorld\HelloWorld\bin\Debug\HelloWorld.exe |
||||
|
||||
.assembly extern mscorlib |
||||
{ |
||||
.publickeytoken = ( b7 7a 5c 56 19 34 e0 89 ) |
||||
.ver 4:0:0:0 |
||||
} |
||||
.assembly HelloWorld |
||||
{ |
||||
.ver 0:0:0:0 |
||||
} |
||||
|
||||
.module HelloWorld.exe |
||||
.corflags 0x00000001 // ILOnly |
||||
|
||||
|
||||
.class private auto ansi abstract sealed beforefieldinit Program |
||||
extends [mscorlib]System.Object |
||||
{ |
||||
.method public hidebysig static void Main (string[] args) cil managed |
||||
{ |
||||
.maxstack 8 |
||||
.entrypoint |
||||
|
||||
ldstr "Hello World!" |
||||
call void [mscorlib]System.Console::WriteLine(string) |
||||
ret |
||||
} // end of method Main |
||||
} // end of class <Module> |
@ -0,0 +1,14 @@
@@ -0,0 +1,14 @@
|
||||
The files in this folder are prettiness tests for the decompiler. |
||||
|
||||
The NUnit class running these tests is ../PrettyTestRunner.cs. |
||||
It uses pre-defined IL files in order to avoid test failures in cause of compiler changes. |
||||
We test different C# compiler versions as well (in future). |
||||
|
||||
Each test consists of a C# file for comparing the resulting code and a source IL file used for assembling/decompiling. |
||||
|
||||
We: |
||||
* assemble a test case (call the result "executable 1") |
||||
* decompile "executable 1" to C# ("decompiled.cs") |
||||
* compare "decompiled.cs" to "source.cs" |
||||
|
||||
The tests pass if the code looks exactly the same as the input code, ignoring comments, empty lines and preprocessor directives. |
Loading…
Reference in new issue