.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.
 
 
 
 
Chicken-Bones ab9397d099 Add ReduceNestingTransform 7 years ago
..
.gitignore Move UnsafeCode tests to pretty-tests (except for those that are not yet successful). 8 years ago
AnonymousTypes.cs Fix #538: Give higher priority to out parameters when naming variables 7 years ago
AnonymousTypes.il Regenerate all IL test cases. 7 years ago
AnonymousTypes.mcs.il Add pretty tests for anonymous types for mcs. 7 years ago
AnonymousTypes.opt.il Regenerate all IL test cases. 7 years ago
AnonymousTypes.opt.mcs.il Add pretty tests for anonymous types for mcs. 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
AssemblyCustomAttributes.cs Rearrange pretty tests, so that they work with Roslyn compilers as well. 7 years ago
AssemblyCustomAttributes.il Rearrange pretty tests, so that they work with Roslyn compilers as well. 7 years ago
AssemblyCustomAttributes.opt.il Rearrange pretty tests, so that they work with Roslyn compilers as well. 7 years ago
AssemblyCustomAttributes.opt.roslyn.il Rearrange pretty tests, so that they work with Roslyn compilers as well. 7 years ago
AssemblyCustomAttributes.roslyn.il Rearrange pretty tests, so that they work with Roslyn compilers as well. 7 years ago
Async.cs Fix #1093: Remove usage of type or this qualifiers, when possible. 7 years ago
Async.il Regenerate all IL test cases. 7 years ago
Async.opt.il Regenerate all IL test cases. 7 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 7 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 Add support for C# 7.3 Attributes on backing fields: Allows [field: …] attributes on an auto-implemented property to target its backing field. 7 years ago
AutoProperties.opt.roslyn.il Add support for C# 7.3 Attributes on backing fields: Allows [field: …] attributes on an auto-implemented property to target its backing field. 7 years ago
AutoProperties.roslyn.il Add support for C# 7.3 Attributes on backing fields: Allows [field: …] attributes on an auto-implemented property to target its backing field. 7 years ago
CS6_StringInterpolation.cs Add support for FormattableString patterns. 7 years ago
CS6_StringInterpolation.opt.roslyn.il Add support for FormattableString patterns. 7 years ago
CS6_StringInterpolation.roslyn.il Add support for FormattableString patterns. 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 Regenerate all IL test cases. 7 years ago
CheckedUnchecked.opt.il Regenerate all IL test cases. 7 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 Disable ref inline assignments. 7 years ago
CompoundAssignmentTest.il Fix #1082: Add support for compound assignment with string.Concat(). 7 years ago
CompoundAssignmentTest.opt.il Fix #1082: Add support for compound assignment with string.Concat(). 7 years ago
CompoundAssignmentTest.opt.roslyn.il Fix #1082: Add support for compound assignment with string.Concat(). 7 years ago
CompoundAssignmentTest.roslyn.il Fix #1082: Add support for compound assignment with string.Concat(). 7 years ago
CustomAttributeConflicts.cs Add CustomAttributeConflicts test 7 years ago
CustomAttributeConflicts.il Add CustomAttributeConflicts test 7 years ago
CustomAttributeConflicts.opt.il Add CustomAttributeConflicts test 7 years ago
CustomAttributeConflicts.opt.roslyn.il Add CustomAttributeConflicts test 7 years ago
CustomAttributeConflicts.roslyn.il Add CustomAttributeConflicts test 7 years ago
CustomAttributeSamples.cs Rearrange pretty tests, so that they work with Roslyn compilers as well. 7 years ago
CustomAttributeSamples.il Rearrange pretty tests, so that they work with Roslyn compilers as well. 7 years ago
CustomAttributeSamples.opt.il Rearrange pretty tests, so that they work with Roslyn compilers as well. 7 years ago
CustomAttributeSamples.opt.roslyn.il Rearrange pretty tests, so that they work with Roslyn compilers as well. 7 years ago
CustomAttributeSamples.roslyn.il Rearrange pretty tests, so that they work with Roslyn compilers as well. 7 years ago
CustomAttributes.cs Introduce IType.IsByRefLike. 7 years ago
CustomAttributes.il Introduce IType.IsByRefLike. 7 years ago
CustomAttributes.opt.il Introduce IType.IsByRefLike. 7 years ago
CustomAttributes.opt.roslyn.il Introduce IType.IsByRefLike. 7 years ago
CustomAttributes.roslyn.il Introduce IType.IsByRefLike. 7 years ago
CustomShortCircuitOperators.cs Support short-circuiting operators with dynamic. (e.g. "if (x.A && x.B)" where "x" is dynamic) 7 years ago
CustomShortCircuitOperators.il Support short-circuiting operators with dynamic. (e.g. "if (x.A && x.B)" where "x" is dynamic) 7 years ago
CustomShortCircuitOperators.opt.il Support short-circuiting operators with dynamic. (e.g. "if (x.A && x.B)" where "x" is dynamic) 7 years ago
CustomShortCircuitOperators.opt.roslyn.il Support short-circuiting operators with dynamic. (e.g. "if (x.A && x.B)" where "x" is dynamic) 7 years ago
CustomShortCircuitOperators.roslyn.il Support short-circuiting operators with dynamic. (e.g. "if (x.A && x.B)" where "x" is dynamic) 7 years ago
DelegateConstruction.cs Fix #1093: Remove usage of type or this qualifiers, when possible. 7 years ago
DelegateConstruction.il Regenerate all IL test cases. 7 years ago
DelegateConstruction.opt.il Regenerate all IL test cases. 7 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
DynamicTests.cs Support short-circuiting operators with dynamic. (e.g. "if (x.A && x.B)" where "x" is dynamic) 7 years ago
DynamicTests.il Support short-circuiting operators with dynamic. (e.g. "if (x.A && x.B)" where "x" is dynamic) 7 years ago
DynamicTests.opt.il Support short-circuiting operators with dynamic. (e.g. "if (x.A && x.B)" where "x" is dynamic) 7 years ago
DynamicTests.opt.roslyn.il Support short-circuiting operators with dynamic. (e.g. "if (x.A && x.B)" where "x" is dynamic) 7 years ago
DynamicTests.roslyn.il Support short-circuiting operators with dynamic. (e.g. "if (x.A && x.B)" where "x" is dynamic) 7 years ago
ExceptionHandling.cs Improve control flow decompilation in ConditionDetection 7 years ago
ExceptionHandling.il Improve control flow decompilation in ConditionDetection 7 years ago
ExceptionHandling.opt.il Improve control flow decompilation in ConditionDetection 7 years ago
ExceptionHandling.opt.roslyn.il Improve control flow decompilation in ConditionDetection 7 years ago
ExceptionHandling.roslyn.il Improve control flow decompilation in ConditionDetection 7 years ago
ExpressionTrees.cs Add ReduceNestingTransform 7 years ago
ExpressionTrees.il Fix #1249: Bug in detection of multiple nested expression trees in query expressions. 7 years ago
ExpressionTrees.opt.il Fix #1249: Bug in detection of multiple nested expression trees in query expressions. 7 years ago
ExpressionTrees.opt.roslyn.il Fix #1249: Bug in detection of multiple nested expression trees in query expressions. 7 years ago
ExpressionTrees.roslyn.il Fix #1249: Bug in detection of multiple nested expression trees in query expressions. 7 years ago
FixProxyCalls.cs Fix crash in ProxyCallReplacer 7 years ago
FixProxyCalls.il Fix crash in ProxyCallReplacer 7 years ago
FixProxyCalls.opt.il Fix crash in ProxyCallReplacer 7 years ago
FixProxyCalls.roslyn.il Fix crash in ProxyCallReplacer 7 years ago
Generics.cs System.Activator.CreateInstance<T>() -> new T() transform is only valid if T has new() constraint. 7 years ago
Generics.il System.Activator.CreateInstance<T>() -> new T() transform is only valid if T has new() constraint. 7 years ago
Generics.opt.il System.Activator.CreateInstance<T>() -> new T() transform is only valid if T has new() constraint. 7 years ago
Generics.opt.roslyn.il System.Activator.CreateInstance<T>() -> new T() transform is only valid if T has new() constraint. 7 years ago
Generics.roslyn.il System.Activator.CreateInstance<T>() -> new T() transform is only valid if T has new() constraint. 7 years ago
HelloWorld.cs Move test projects to their own directory in \ 8 years ago
HelloWorld.il Regenerate all IL test cases. 7 years ago
InitializerTests.cs Fix #1279: Event fields in object initializers 7 years ago
InitializerTests.il Fix #1279: Event fields in object initializers 7 years ago
InitializerTests.opt.il Fix #1279: Event fields in object initializers 7 years ago
InitializerTests.opt.roslyn.il Fix #1279: Event fields in object initializers 7 years ago
InitializerTests.roslyn.il Fix #1279: Event fields in object initializers 7 years ago
InlineAssignmentTest.cs Fix #1093: Remove usage of type or this qualifiers, when possible. 7 years ago
InlineAssignmentTest.il Regenerate all IL test cases. 7 years ago
InlineAssignmentTest.opt.il Regenerate all IL test cases. 7 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 Regenerate all IL test cases. 7 years ago
LiftedOperators.opt.il Regenerate all IL test cases. 7 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 Regenerate all IL test cases. 7 years ago
Lock.mcs.il Regenerate all IL test cases. 7 years ago
Lock.opt.il Regenerate all IL test cases. 7 years ago
Lock.opt.mcs.il Regenerate all IL test cases. 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 Improve control flow decompilation in ConditionDetection 7 years ago
Loops.il Improve control flow decompilation in ConditionDetection 7 years ago
Loops.mcs.il Improve control flow decompilation in ConditionDetection 7 years ago
Loops.opt.il Improve control flow decompilation in ConditionDetection 7 years ago
Loops.opt.mcs.il Improve control flow decompilation in ConditionDetection 7 years ago
Loops.opt.roslyn.il Improve control flow decompilation in ConditionDetection 7 years ago
Loops.roslyn.il Improve control flow decompilation in ConditionDetection 7 years ago
MemberTests.cs Add support for IndexerNameAttribute. 7 years ago
MemberTests.il Add support for IndexerNameAttribute. 7 years ago
MemberTests.opt.il Add support for IndexerNameAttribute. 7 years ago
MemberTests.opt.roslyn.il Add support for IndexerNameAttribute. 7 years ago
MemberTests.roslyn.il Add support for IndexerNameAttribute. 7 years ago
NamedArguments.cs Move named arguments to its own transform. 7 years ago
NamedArguments.il Move named arguments to its own transform. 7 years ago
NamedArguments.opt.il Move named arguments to its own transform. 7 years ago
NamedArguments.opt.roslyn.il Move named arguments to its own transform. 7 years ago
NamedArguments.roslyn.il Move named arguments to its own transform. 7 years ago
NullPropagation.cs Allow splitting a variable even if it has its address taken and stored in a ref-local. 7 years ago
NullPropagation.opt.roslyn.il Allow splitting a variable even if it has its address taken and stored in a ref-local. 7 years ago
NullPropagation.roslyn.il Allow splitting a variable even if it has its address taken and stored in a ref-local. 7 years ago
OptionalArguments.cs Fixed bug with decimal optional parameters not being resolved correctly. 7 years ago
OptionalArguments.il Fixed bug with decimal optional parameters not being resolved correctly. 7 years ago
OptionalArguments.opt.il Fixed bug with decimal optional parameters not being resolved correctly. 7 years ago
OptionalArguments.opt.roslyn.il Fixed bug with decimal optional parameters not being resolved correctly. 7 years ago
OptionalArguments.roslyn.il Fixed bug with decimal optional parameters not being resolved correctly. 7 years ago
PInvoke.cs Fix #538: Give higher priority to out parameters when naming variables 7 years ago
PInvoke.il Fix ReflectionDisassembler so that we can re-generate the IL files for the PInvoke test. 7 years ago
PInvoke.opt.il Fix ReflectionDisassembler so that we can re-generate the IL files for the PInvoke test. 7 years ago
PInvoke.opt.roslyn.il Fix ReflectionDisassembler so that we can re-generate the IL files for the PInvoke test. 7 years ago
PInvoke.roslyn.il Fix ReflectionDisassembler so that we can re-generate the IL files for the PInvoke test. 7 years ago
PropertiesAndEvents.cs Fix #1220: Auto Property named 'Item' decompiled as an invalid indexer 7 years ago
PropertiesAndEvents.il Fix #1220: Auto Property named 'Item' decompiled as an invalid indexer 7 years ago
PropertiesAndEvents.opt.il Fix #1220: Auto Property named 'Item' decompiled as an invalid indexer 7 years ago
PropertiesAndEvents.opt.roslyn.il Fix #1220: Auto Property named 'Item' decompiled as an invalid indexer 7 years ago
PropertiesAndEvents.roslyn.il Fix #1220: Auto Property named 'Item' decompiled as an invalid indexer 7 years ago
QualifierTests.cs Add base. resolution to QualifierTests 7 years ago
QualifierTests.il Add base. resolution to QualifierTests 7 years ago
QualifierTests.opt.il Add base. resolution to QualifierTests 7 years ago
QualifierTests.opt.roslyn.il Add base. resolution to QualifierTests 7 years ago
QualifierTests.roslyn.il Add base. resolution to QualifierTests 7 years ago
QueryExpressions.cs Relax rules for object and collection initializer detection to properly decompile query expressions. 7 years ago
QueryExpressions.il Relax rules for object and collection initializer detection to properly decompile query expressions. 7 years ago
QueryExpressions.opt.il Relax rules for object and collection initializer detection to properly decompile query expressions. 7 years ago
QueryExpressions.opt.roslyn.il Relax rules for object and collection initializer detection to properly decompile query expressions. 7 years ago
QueryExpressions.roslyn.il Relax rules for object and collection initializer detection to properly decompile query expressions. 7 years ago
Readme.txt Move test projects to their own directory in \ 8 years ago
ReduceNesting.cs Add ReduceNestingTransform 7 years ago
ReduceNesting.il Add ReduceNestingTransform 7 years ago
ReduceNesting.opt.il Add ReduceNestingTransform 7 years ago
ReduceNesting.opt.roslyn.il Add ReduceNestingTransform 7 years ago
ReduceNesting.roslyn.il Add ReduceNestingTransform 7 years ago
RefLocalsAndReturns.cs Add more tests, fix typo. 7 years ago
RefLocalsAndReturns.opt.roslyn.il Add more tests, fix typo. 7 years ago
RefLocalsAndReturns.roslyn.il Add more tests, fix typo. 7 years ago
ShortCircuit.cs Improve block ordering in ConditionDetection using the ILOffsets of Leave instruction arguments 7 years ago
ShortCircuit.il Improve block ordering in ConditionDetection using the ILOffsets of Leave instruction arguments 7 years ago
ShortCircuit.opt.il Improve block ordering in ConditionDetection using the ILOffsets of Leave instruction arguments 7 years ago
ShortCircuit.opt.roslyn.il Improve block ordering in ConditionDetection using the ILOffsets of Leave instruction arguments 7 years ago
ShortCircuit.roslyn.il Improve block ordering in ConditionDetection using the ILOffsets of Leave instruction arguments 7 years ago
Switch.cs Better shortcircuit detection to avoid single condition switch statements 7 years ago
Switch.il Better shortcircuit detection to avoid single condition switch statements 7 years ago
Switch.opt.il Better shortcircuit detection to avoid single condition switch statements 7 years ago
Switch.opt.roslyn.il Better shortcircuit detection to avoid single condition switch statements 7 years ago
Switch.roslyn.il Better shortcircuit detection to avoid single condition switch statements 7 years ago
TupleTests.cs Add missing ApplyAttributesToType in MetadataAssembly.ResolveMethodSpecification. 7 years ago
TupleTests.opt.roslyn.il Add missing ApplyAttributesToType in MetadataAssembly.ResolveMethodSpecification. 7 years ago
TupleTests.roslyn.il Add missing ApplyAttributesToType in MetadataAssembly.ResolveMethodSpecification. 7 years ago
TypeAnalysisTests.cs Avoid redundant explicit boxing casts 7 years ago
TypeAnalysisTests.il Avoid redundant explicit boxing casts 7 years ago
TypeAnalysisTests.opt.il Avoid redundant explicit boxing casts 7 years ago
TypeAnalysisTests.opt.roslyn.il Avoid redundant explicit boxing casts 7 years ago
TypeAnalysisTests.roslyn.il Avoid redundant explicit boxing casts 7 years ago
TypeTests.cs Fix #1148: Do not use hexadecimal display in enums if the value is negative. 7 years ago
TypeTests.il Fix #1148: Do not use hexadecimal display in enums if the value is negative. 7 years ago
TypeTests.opt.il Fix #1148: Do not use hexadecimal display in enums if the value is negative. 7 years ago
TypeTests.opt.roslyn.il Fix #1148: Do not use hexadecimal display in enums if the value is negative. 7 years ago
TypeTests.roslyn.il Fix #1148: Do not use hexadecimal display in enums if the value is negative. 7 years ago
UnsafeCode.cs Fix #1154: Decompilation of fixed statement when pointer variable is unused 7 years ago
UnsafeCode.il Fix #1154: Decompilation of fixed statement when pointer variable is unused 7 years ago
UnsafeCode.opt.il Fix #1154: Decompilation of fixed statement when pointer variable is unused 7 years ago
UnsafeCode.opt.roslyn.il Fix #1154: Decompilation of fixed statement when pointer variable is unused 7 years ago
UnsafeCode.roslyn.il Fix #1154: Decompilation of fixed statement when pointer variable is unused 7 years ago
Using.cs Use mcs for correctness tests. 7 years ago
Using.il Regenerate all IL test cases. 7 years ago
Using.opt.il Regenerate all IL test cases. 7 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 Regenerate all IL test cases. 7 years ago
VariableNaming.opt.il Regenerate all IL test cases. 7 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 Regenerate all IL test cases. 7 years ago
VariableNamingWithoutSymbols.opt.il Regenerate all IL test cases. 7 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 Regenerate all IL test cases. 7 years ago
WellKnownConstants.opt.il Regenerate all IL test cases. 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.