.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 80d3deb1ae Regenerate test cases with Roslyn 2.7. 7 years ago
..
.gitignore Move UnsafeCode tests to pretty-tests (except for those that are not yet successful). 8 years ago
AnonymousTypes.cs Fix #1093: Remove usage of type or this qualifiers, when possible. 7 years ago
AnonymousTypes.il Use out variable declarations where possible. 7 years ago
AnonymousTypes.opt.il Use out variable declarations where possible. 7 years ago
AnonymousTypes.opt.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
AnonymousTypes.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
Async.cs Fix #1093: Remove usage of type or this qualifiers, when possible. 7 years ago
Async.il Split Async tests 8 years ago
Async.opt.il Split Async tests 8 years ago
Async.opt.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
Async.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
AsyncMain.cs Fix lines starting with spaces 8 years ago
AsyncMain.opt.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
AsyncMain.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
AutoProperties.cs Move test projects to their own directory in \ 8 years ago
AutoProperties.opt.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
AutoProperties.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
CS6_StringInterpolation.cs Fix tests 8 years ago
CS6_StringInterpolation.opt.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
CS6_StringInterpolation.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
CS72_PrivateProtected.cs Add C# 7.2 private protected unit tests 8 years ago
CS72_PrivateProtected.opt.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
CS72_PrivateProtected.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
CheckedUnchecked.cs Fix #1093: Remove usage of type or this qualifiers, when possible. 7 years ago
CheckedUnchecked.il Add back CheckedUnchecked test case. 8 years ago
CheckedUnchecked.opt.il Add back CheckedUnchecked test case. 8 years ago
CheckedUnchecked.opt.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
CheckedUnchecked.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
CompoundAssignmentTest.cs Fix #1093: Remove usage of type or this qualifiers, when possible. 7 years ago
CompoundAssignmentTest.il Fix #1007: post-increment transform incorrect due to variable splitting. 8 years ago
CompoundAssignmentTest.opt.il Fix #1007: post-increment transform incorrect due to variable splitting. 8 years ago
CompoundAssignmentTest.opt.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
CompoundAssignmentTest.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
DelegateConstruction.cs Fix #1093: Remove usage of type or this qualifiers, when possible. 7 years ago
DelegateConstruction.il Fix #971: Anonymous method with missing parameter name 8 years ago
DelegateConstruction.opt.il Fix #971: Anonymous method with missing parameter name 8 years ago
DelegateConstruction.opt.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
DelegateConstruction.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
ExceptionHandling.cs Fix #1093: Remove usage of type or this qualifiers, when possible. 7 years ago
ExceptionHandling.il Add testcase. 8 years ago
ExceptionHandling.opt.il Add testcase. 8 years ago
ExceptionHandling.opt.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
ExceptionHandling.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
ExpressionTrees.cs Fix #1093: Remove usage of type or this qualifiers, when possible. 7 years ago
ExpressionTrees.il Extend expression tree tests 8 years ago
ExpressionTrees.opt.il Extend expression tree tests 8 years ago
ExpressionTrees.opt.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
ExpressionTrees.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
FixProxyCalls.cs Remove redundant lambda casts. 8 years ago
FixProxyCalls.il Add more tests. 8 years ago
FixProxyCalls.opt.il Add more tests. 8 years ago
FixProxyCalls.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
Generics.cs Avoid redundant casts around 'as' conversions of type parameters. 7 years ago
Generics.il Avoid redundant casts around 'as' conversions of type parameters. 7 years ago
Generics.opt.il Avoid redundant casts around 'as' conversions of type parameters. 7 years ago
Generics.opt.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
Generics.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
HelloWorld.cs Move test projects to their own directory in \ 8 years ago
HelloWorld.il Move test projects to their own directory in \ 8 years ago
InitializerTests.cs Fix #1093: Remove usage of type or this qualifiers, when possible. 7 years ago
InitializerTests.il Fix #1042: Wrong decompile result for collection initializers 8 years ago
InitializerTests.opt.il Fix #1042: Wrong decompile result for collection initializers 8 years ago
InitializerTests.opt.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
InitializerTests.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
InlineAssignmentTest.cs Fix #1093: Remove usage of type or this qualifiers, when possible. 7 years ago
InlineAssignmentTest.il Fix compound assignment and post-increment. 8 years ago
InlineAssignmentTest.opt.il Fix compound assignment and post-increment. 8 years ago
InlineAssignmentTest.opt.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
InlineAssignmentTest.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
Issue1080.cs #1080: Add test case 7 years ago
Issue1080.opt.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
Issue1080.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
LiftedOperators.cs Fix #1093: Remove usage of type or this qualifiers, when possible. 7 years ago
LiftedOperators.il Add IL files for LiftedOperators test. 8 years ago
LiftedOperators.opt.il Add IL files for LiftedOperators test. 8 years ago
LiftedOperators.opt.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
LiftedOperators.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
Lock.cs Implement C# 2, C# 4 legacy and Roslyn lock patterns. 8 years ago
Lock.il Implement C# 2, C# 4 legacy and Roslyn lock patterns. 8 years ago
Lock.mcs.il Add missing il files to Lock pretty tests 7 years ago
Lock.opt.il Implement C# 2, C# 4 legacy and Roslyn lock patterns. 8 years ago
Lock.opt.mcs.il Add missing il files to Lock pretty tests 7 years ago
Lock.opt.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
Lock.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
Loops.cs Fix #1093: Remove usage of type or this qualifiers, when possible. 7 years ago
Loops.il Fix #979: Unrecognized foreach loop in unsafe code 8 years ago
Loops.mcs.il Fix #1071: Sometimes uses Enumarator instead of Foreach 7 years ago
Loops.opt.il Fix #979: Unrecognized foreach loop in unsafe code 8 years ago
Loops.opt.mcs.il Fix #1071: Sometimes uses Enumarator instead of Foreach 7 years ago
Loops.opt.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
Loops.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
NullPropagation.cs Fix #1093: Remove usage of type or this qualifiers, when possible. 7 years ago
NullPropagation.opt.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
NullPropagation.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
PInvoke.cs Fix #1093: Remove usage of type or this qualifiers, when possible. 7 years ago
PInvoke.il Restore P/Invoke test. 8 years ago
PInvoke.opt.il Restore P/Invoke test. 8 years ago
PInvoke.opt.roslyn.il Restore P/Invoke test. 8 years ago
PInvoke.roslyn.il Restore P/Invoke test. 8 years ago
PropertiesAndEvents.cs Fix #1093: Remove usage of type or this qualifiers, when possible. 7 years ago
PropertiesAndEvents.il Fix #883: Incorrect decompilation of explicitly implemented events 8 years ago
PropertiesAndEvents.opt.il Fix #883: Incorrect decompilation of explicitly implemented events 8 years ago
PropertiesAndEvents.opt.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
PropertiesAndEvents.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
QualifierTests.cs Fix redundant qualifiers in method group expressions. 7 years ago
QualifierTests.il Fix redundant qualifiers in method group expressions. 7 years ago
QualifierTests.opt.il Fix redundant qualifiers in method group expressions. 7 years ago
QualifierTests.opt.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
QualifierTests.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
QueryExpressions.cs Fix #1093: Remove usage of type or this qualifiers, when possible. 7 years ago
QueryExpressions.il #980: Fix type substitution for lambdas. 7 years ago
QueryExpressions.opt.il #980: Fix type substitution for lambdas. 7 years ago
QueryExpressions.opt.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
QueryExpressions.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
Readme.txt Move test projects to their own directory in \ 8 years ago
RefLocalsAndReturns.cs Add minimal pretty tests for ref structs. 7 years ago
RefLocalsAndReturns.opt.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
RefLocalsAndReturns.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
ShortCircuit.cs Fix #1093: Remove usage of type or this qualifiers, when possible. 7 years ago
ShortCircuit.il Fix short-circuiting operators when the rhs is a comparison with 0. 8 years ago
ShortCircuit.opt.il Fix short-circuiting operators when the rhs is a comparison with 0. 8 years ago
ShortCircuit.opt.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
ShortCircuit.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
Switch.cs Fix #1093: Remove usage of type or this qualifiers, when possible. 7 years ago
Switch.il Fix #1084: Decompiling constants of the target type 7 years ago
Switch.opt.il Fix #1084: Decompiling constants of the target type 7 years ago
Switch.opt.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
Switch.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
TypeAnalysisTests.cs Fix #1093: Remove usage of type or this qualifiers, when possible. 7 years ago
TypeAnalysisTests.il #1055: Use more type hints in ExpressionBuilder. 7 years ago
TypeAnalysisTests.opt.il #1055: Use more type hints in ExpressionBuilder. 7 years ago
TypeAnalysisTests.opt.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
TypeAnalysisTests.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
UnsafeCode.cs Fix #1078: Eliminate redundant variable in fixed statements. 7 years ago
UnsafeCode.il Fix #1021: Compound assignments on pointer types. 7 years ago
UnsafeCode.opt.il Fix #1021: Compound assignments on pointer types. 7 years ago
UnsafeCode.opt.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
UnsafeCode.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
Using.cs Use mcs for correctness tests. 7 years ago
Using.il Add support for using on nullables. 8 years ago
Using.opt.il Add support for using on nullables. 8 years ago
Using.opt.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
Using.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
VariableNaming.cs Fix #989: Local variable naming conflict 8 years ago
VariableNaming.il Fix #989: Local variable naming conflict 8 years ago
VariableNaming.opt.il Fix #989: Local variable naming conflict 8 years ago
VariableNaming.opt.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
VariableNaming.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
VariableNamingWithoutSymbols.cs Fix #989: Local variable naming conflict 8 years ago
VariableNamingWithoutSymbols.il Fix #989: Local variable naming conflict 8 years ago
VariableNamingWithoutSymbols.opt.il Fix #989: Local variable naming conflict 8 years ago
VariableNamingWithoutSymbols.opt.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
VariableNamingWithoutSymbols.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
WellKnownConstants.cs Fix #1084: Decompiling constants of the target type 7 years ago
WellKnownConstants.il Fix #1084: Decompiling constants of the target type 7 years ago
WellKnownConstants.opt.il Fix #1084: Decompiling constants of the target type 7 years ago
WellKnownConstants.opt.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago
WellKnownConstants.roslyn.il Regenerate test cases with Roslyn 2.7. 7 years ago

Readme.txt

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.

Note: If you delete an .il file, it will be re-created on the next test run.
This can be helpful when modifying the test case; but it also might have unexpected results when your C# compiler differs
from the compiler previously used to create the .il file.