.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.
 
 
 
 
Daniel Grunwald c1265ad830 Fix #1946: Don't move `return` into `try` block when doing so changes the semantics of a `finally` block. 5 years ago
..
Async.cs Fix await in finally pattern with using statement. 7 years ago
BitNot.il Move test projects to their own directory in \ 8 years ago
Capturing.cs Fix #1936: TransformDisplayClassUsage should remove copies of display-class references. 5 years ago
Comparisons.cs Only use mcs for the first compilation pass. Consistently run test cases using .NET 4.x runtime. 7 years ago
CompoundAssignment.cs Don't use compound assignment when the RHS value does not fit into the LHS type. 7 years ago
ConditionalAttr.cs Move test projects to their own directory in \ 8 years ago
ControlFlow.cs Fix #1946: Don't move `return` into `try` block when doing so changes the semantics of a `finally` block. 5 years ago
Conversions.cs Fix #926: missing explicit casts for implicit operators 8 years ago
DecimalFields.cs Move test projects to their own directory in \ 8 years ago
ExpressionTrees.cs Use mcs for correctness tests. 7 years ago
FloatingPointArithmetic.cs Fix #1794: Avoid extra cast to double for ulong -> float conversion 6 years ago
Generics.cs Fix #958: Invalid cast in generic class for abstract base call 8 years ago
HelloWorld.cs Move test projects to their own directory in \ 8 years ago
InitializerTests.cs Fix #1336: multi-dimensional array initializers with custom objects not detected. 7 years ago
Jmp.il #899: decode jmp instruction into tail call 8 years ago
LINQRaytracer.cs Reduce size of LINQRaytracer test case 8 years ago
Loops.cs #1869: Add correctness test case 6 years ago
MemberLookup.cs Fix missing 'base.' qualifier on non-virtual call to virtual base method. 7 years ago
MiniJSON.cs Add license and source information to MiniJSON.cs 8 years ago
NullPropagation.cs Fix indentation 7 years ago
NullableTests.cs Fix #1680: Invalid cast `(uint?)-1` 6 years ago
OverloadResolution.cs Fix #1747: Stack overflow when decompiling a `bool` -> `bool?` conversion. 6 years ago
PropertiesAndEvents.cs Move test projects to their own directory in \ 8 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 Revert the 'unwrapBoxingConversion' addition to TranslateTarget(), I ended up solving the boxing issue directly in HandleDelegateConstruction() 7 years ago
StringConcat.cs Fix #1865: At least one of the first two operands in string concatenation needs to be of type `string`, so we can't always drop `ToString()` calls. 6 years ago
Switch.cs Fix #1076; improve detection of mcs switch-on-string pattern 7 years ago
TrickyTypes.cs Fix LambdaResolveResult.IsValid() being too restrictive. 6 years ago
UndocumentedExpressions.cs Update tests (remove unnecessary casts) 8 years ago
Uninit.vb Fix #1404: local variables with init flag are not declared in the correct scope 6 years ago
UnsafeCode.cs Move stackalloc tests to pretty-tests. 8 years ago
Using.cs Use mcs for correctness tests. 7 years ago
ValueTypeCall.cs Avoid unnecessary (object) cast when calling myEnum.ToString() 8 years ago
YieldReturn.cs Add pretty tests for "yield return" and fix some minor bugs: 7 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.