.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 9f77f8a919 Prevent inlining of call arguments when doing so would change order of evaluation with regards to the implicit ldobj performed by a constrained.callvirt. 1 month 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 Move test projects to their own directory in \ 8 years ago
Capturing.cs #2128: Reformat the whole code base. 5 years ago
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 #2128: Reformat the whole code base. 5 years ago
ConditionalAttr.cs Move test projects to their own directory in \ 8 years ago
ControlFlow.cs #2128: Reformat the whole code base. 5 years ago
Conversions.cs #2128: Reformat the whole code base. 5 years ago
DecimalFields.cs Fix code style 2 years ago
DeconstructionTests.cs Run tests with different versions of Roslyn 5 years ago
DynamicTests.cs Fix #2349: Use proper ExpressionType with DynamicCompoundAssign. 4 years ago
ExpressionTrees.cs Use mcs for correctness tests. 7 years ago
FloatingPointArithmetic.cs #2128: Reformat the whole code base. 5 years ago
Generics.cs #2128: Reformat the whole code base. 5 years ago
HelloWorld.cs Move test projects to their own directory in \ 8 years ago
InitializerTests.cs Fix #3383: more aggressively transform object initializers on structs 3 months ago
Jmp.il #899: decode jmp instruction into tail call 8 years ago
LINQRaytracer.cs #2128: Reformat the whole code base. 5 years ago
Loops.cs #2128: Reformat the whole code base. 5 years ago
MemberLookup.cs #2128: Reformat the whole code base. 5 years ago
MiniJSON.cs #2128: Reformat the whole code base. 5 years ago
NonGenericConstrainedCallVirt.il Prevent inlining of call arguments when doing so would change order of evaluation with regards to the implicit ldobj performed by a constrained.callvirt. 1 month ago
NullPropagation.cs #2128: Reformat the whole code base. 5 years ago
NullableTests.cs Run tests with different versions of Roslyn 5 years ago
OverloadResolution.cs Add more tests for C# 12 ref readonly parameters 10 months ago
PropertiesAndEvents.cs #2128: Reformat the whole code base. 5 years ago
Readme.txt Move test projects to their own directory in \ 8 years ago
StackTests.il Add StackTests.il test case. 6 years ago
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 #2128: Reformat the whole code base. 5 years ago
TrickyTypes.cs #2128: Reformat the whole code base. 5 years ago
UndocumentedExpressions.cs #2128: Reformat the whole code base. 5 years ago
Uninit.vb Fix #1404: local variables with init flag are not declared in the correct scope 6 years ago
UnsafeCode.cs #2128: Reformat the whole code base. 5 years ago
Using.cs #2128: Reformat the whole code base. 5 years ago
ValueTypeCall.cs Fix test case to actually check the ToString() results. 2 years ago
YieldReturn.cs #2128: Reformat the whole code base. 5 years ago

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.