.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 3bf9f7c301 Fix #1943: "ref readonly" returns from properties/indexers 5 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
AssemblyCustomAttributes.cs Rearrange pretty tests, so that they work with Roslyn compilers as well. 7 years ago
Async.cs Fix #1925: Adjust AsyncAwaitDecompiler to changes in Roslyn 3.5.0-beta2 5 years ago
AsyncMain.cs Fix lines starting with spaces 7 years ago
AsyncStreams.cs Fix #1782: AsyncAwaitDecompiler for methods in struct 6 years ago
AsyncUsing.cs Enable tests for await using and DIM. 6 years ago
AutoProperties.cs Fix #1319: Property name collides with variable name 7 years ago
CS6_StringInterpolation.cs Fix #1497: do not insert newlines inside string interpolation expressions. 6 years ago
CS72_PrivateProtected.cs Add C# 7.2 private protected unit tests 8 years ago
CS73_StackAllocInitializers.cs Fix #1854 6 years ago
CheckedUnchecked.cs Upgrade Roslyn for tests to 3.0.0-beta3. 6 years ago
CompoundAssignmentTest.cs Fix compound assignments with type `bool`. 6 years ago
ConstantsTests.cs Fix #1552: user-defined and decimal increments 6 years ago
ConstructorInitializers.cs Fix #1743: Add pattern for struct constructor initializers. 6 years ago
CustomAttributeConflicts.cs Upgrade Roslyn for tests to 3.0.0-beta3. 6 years ago
CustomAttributeSamples.cs Upgrade Roslyn for tests to 3.0.0-beta3. 6 years ago
CustomAttributes.cs Add ununsed CustomAttributes test. 6 years ago
CustomAttributes2.cs Atributes -> Attributes 6 years ago
CustomShortCircuitOperators.cs Support short-circuiting operators with dynamic. (e.g. "if (x.A && x.B)" where "x" is dynamic) 7 years ago
CustomTaskType.cs Enable static local functions and update related tests, since roslyn 3.4.0-beta3 is available for tests 6 years ago
DelegateConstruction.cs Fix #1867: Captures of copies of this are not properly handled by the decompiler 5 years ago
Discards.cs Fix build break; only escape _ if it is a type name. Add basic Discards tests. 6 years ago
DynamicTests.cs Fix #1635: DynamicInvokeConstructorInstruction Did report the wrong StackType for value types and unknown types. 6 years ago
EnumTests.cs Rename TypeTests to EnumTests and merge old EnumTests into new pretty tests. 6 years ago
ExceptionHandling.cs Fix #1643: Handle unbox.any in TransformCatchVariable. 6 years ago
ExpressionTrees.cs Fix #1811: Assert in NullCoalescingInstruction.CheckInvariant after expression tree transform 6 years ago
FixProxyCalls.cs Fix #1660: Generic proxy calls should use the callee's type parameter substitution, not the caller's. 6 years ago
Generics.cs Fix #1760: NRE in ILInlining, if nullable.rewrap is used with an expression that has a type parameter as its type. 6 years ago
HelloWorld.cs Move test projects to their own directory in \ 8 years ago
InitializerTests.cs Do not convert simple LINQ method calls to LINQ expressions. Closes #1501. 6 years ago
InlineAssignmentTest.cs Fix #1571: Expression transforms not running for values of inline assignments. 6 years ago
InterfaceTests.cs Enable tests for await using and DIM. 6 years ago
Issue1080.cs Upgrade Roslyn for tests to 3.0.0-beta3. 6 years ago
LiftedOperators.cs Reenable LiftedOperators tests. 6 years ago
LocalFunctions.cs Add an workaround for #1798 6 years ago
Lock.cs Implement C# 2, C# 4 legacy and Roslyn lock patterns. 8 years ago
Loops.cs #1691: Further improvements for decompiling the new VS 2019.3 string concatenation IL pattern 6 years ago
MemberTests.cs Apply expression-body transform to indexers as well. 6 years ago
MultidimensionalArray.cs Add old MultidimensionalArrays test to pretty test runner. 6 years ago
NamedArguments.cs Move named arguments to its own transform. 7 years ago
NullPropagation.cs Fix #1689: Add support for null propagation on array access: `arr?[i]` 6 years ago
NullableRefTypes.cs Fix references to nested types in generic classes. 6 years ago
OptionalArguments.cs Fix #1567: Do not transform string.Concat method calls to + operators if named arguments are used. 6 years ago
OutVariables.cs Add support for "definitely assigned if true/false" to data flow analysis. 6 years ago
PInvoke.cs Fix #538: Give higher priority to out parameters when naming variables 7 years ago
PropertiesAndEvents.cs #1837 Add combined test with tuples, dynamic and nullability 6 years ago
QualifierTests.cs Fix #1758: Input var name conflicting with framework class name 6 years ago
QueryExpressions.cs Upgrade Roslyn for tests to 3.0.0-beta3. 6 years ago
Readme.txt Upgrade Roslyn for tests to 3.0.0-beta3. 6 years ago
ReduceNesting.cs Add ReduceNestingTransform 7 years ago
RefLocalsAndReturns.cs Fix #1943: "ref readonly" returns from properties/indexers 5 years ago
ShortCircuit.cs Improve block ordering in ConditionDetection using the ILOffsets of Leave instruction arguments 7 years ago
Switch.cs Fix #1767: Fix detection switch-on-string that uses leave instead of branch instructions. 6 years ago
ThrowExpressions.cs Reformat ThrowExpressions tests. 6 years ago
TupleTests.cs Merge branch 'master' of https://github.com/icsharpcode/ILSpy into ref 6 years ago
TypeAnalysisTests.cs Fix invalid code generated for impossible casts. 6 years ago
TypeMemberTests.cs Upgrade Roslyn for tests to 3.0.0-beta3. 6 years ago
UnsafeCode.cs Fix #1853: Detect pinning of multi-dimensional array 5 years ago
UserDefinedConversions.cs Fix #1574: When re-introducing an explicit cast for an implicit user-defined conversion; ensure we use a direct cast and don't go through the code path for builtin conversions. 6 years ago
Using.cs Avoid making explicit ToString() implicit when doing so changes the semantics for mutable value types. 6 years ago
ValueTypes.cs #1691: Further improvements for decompiling the new VS 2019.3 string concatenation IL pattern 6 years ago
VariableNaming.cs Fix #1681: Use discard assignment, if possible. 6 years ago
VariableNamingWithoutSymbols.cs Fix #1681: Use discard assignment, if possible. 6 years ago
WellKnownConstants.cs Exclude whole numbers from "constant unfolding" for floating point literals. 6 years ago
YieldReturn.cs Fix #1563: `Unexpected return in MoveNext()` when mixed `using` and more than one `yield break` 6 years ago

Readme.txt

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

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

Each test case is a C# file.
The test runner will:
1. Compile the file into an .exe/.dll
2. Decompile the .exe/.dll
3. Compare the resulting code with the original input code.

The tests pass if the code looks exactly the same as the input code, ignoring comments, empty lines and preprocessor directives.
It also ignores disabled preprocessors sections (e.g. "#if ROSLYN") when the test runs with a compiler that does not set this symbol.
See Tester.GetPreprocessorSymbols() for the available symbols.