.NET Decompiler with support for PDB generation, ReadyToRun, Metadata (&more) - cross-platform!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Siegfried Pammer 202c5e22e3 Fix #3383: more aggressively transform object initializers on structs 4 months ago
..
Async.cs Fix #1749, fix #2339, fix #2353: Add support for rethrow in async exception handlers, fix await catch/finally patterns for complex methods. 4 years ago
BitNot.il
Capturing.cs
ComInterop.cs Run ComInterop test case only on .NET 4.0. 3 years ago
Comparisons.cs Fix #2398: TranslateCondition: truncate condition value if necessary 4 years ago
CompoundAssignment.cs
ConditionalAttr.cs
ControlFlow.cs
Conversions.cs
DecimalFields.cs Fix code style 2 years ago
DeconstructionTests.cs
DynamicTests.cs Fix #2349: Use proper ExpressionType with DynamicCompoundAssign. 4 years ago
ExpressionTrees.cs
FloatingPointArithmetic.cs
Generics.cs
HelloWorld.cs
InitializerTests.cs Fix #3383: more aggressively transform object initializers on structs 4 months ago
Jmp.il
LINQRaytracer.cs
Loops.cs
MemberLookup.cs
MiniJSON.cs
NullPropagation.cs
NullableTests.cs
OverloadResolution.cs Add more tests for C# 12 ref readonly parameters 11 months ago
PropertiesAndEvents.cs
Readme.txt
StackTests.il
StackTypes.il Fix #901: Refactor ILReader: only read reachable code + support reimports 2 years ago
StringConcat.cs Add support for DefaultInterpolatedStringHandler 3 years ago
Switch.cs
TrickyTypes.cs
UndocumentedExpressions.cs
Uninit.vb
UnsafeCode.cs
Using.cs
ValueTypeCall.cs Fix test case to actually check the ToString() results. 2 years ago
YieldReturn.cs

Readme.txt

The files in this folder are correctness tests for the decompiler.

The NUnit class running these tests is ../../CorrectnessTestRunner.cs.

We:
* compile/assemble a test case (call the result "executable 1")
* decompile "executable 1" to C# ("decompiled.cs")
* compile decompiled.cs, resulting in "executable 2"
* run both executable and compare their output (exit code, stdout, stderr)

We repeat the steps above with a few different compiler options (/o+ or not; /debug or not).

The tests pass if the code compiles without error and produces the same output.
The tests do not care at all if the resulting code is pretty, or if any high-level constructs like closures were detected.