.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 c9df069526 Add minimal test case + DecompilerSettings.Deconstruction setting 5 years ago
..
.gitignore
AnonymousTypes.cs
AssemblyCustomAttributes.cs
Async.cs Fix #1925: Adjust AsyncAwaitDecompiler to changes in Roslyn 3.5.0-beta2 5 years ago
AsyncMain.cs
AsyncStreams.cs Fix #1772: Support EnumeratorCancellationAttribute 5 years ago
AsyncUsing.cs Enable tests for await using and DIM. 6 years ago
AutoProperties.cs
CS6_StringInterpolation.cs
CS72_PrivateProtected.cs
CS73_StackAllocInitializers.cs Fix #1854 6 years ago
CheckedUnchecked.cs
CompoundAssignmentTest.cs Fix compound assignments with type `bool`. 6 years ago
ConstantsTests.cs
ConstructorInitializers.cs Fix #1743: Add pattern for struct constructor initializers. 6 years ago
CustomAttributeConflicts.cs
CustomAttributeSamples.cs
CustomAttributes.cs
CustomAttributes2.cs Atributes -> Attributes 6 years ago
CustomShortCircuitOperators.cs
CustomTaskType.cs Enable static local functions and update related tests, since roslyn 3.4.0-beta3 is available for tests 6 years ago
DeconstructionTests.cs Add minimal test case + DecompilerSettings.Deconstruction setting 5 years ago
DelegateConstruction.cs Fix #1867: Captures of copies of this are not properly handled by the decompiler 6 years ago
Discards.cs
DynamicTests.cs
EnumTests.cs
ExceptionHandling.cs
ExpressionTrees.cs Improve ReduceNestingTransform by considering nested containers (Try/Using/Lock/Pinned/etc) 6 years ago
FixProxyCalls.cs
Generics.cs Fix #1959: Resolve the "F(G<A,B>(7));" grammar ambiguity by inserting parentheses when necessary. 5 years ago
HelloWorld.cs
IndexRangeTest.cs Handle the special cases where the range does not have a start or endpoint. 5 years ago
InitializerTests.cs
InlineAssignmentTest.cs
InterfaceTests.cs Enable tests for await using and DIM. 6 years ago
Issue1080.cs
LiftedOperators.cs
LocalFunctions.cs #1798: Add more unit tests 5 years ago
Lock.cs
Loops.cs
MemberTests.cs
MultidimensionalArray.cs
NamedArguments.cs
NativeInts.cs Use `nint` type for local IntPtr variables if arithmetic is performed on them. 5 years ago
NullPropagation.cs Add Mode.UnconstrainedType and implement TransformNullPropagationOnUnconstrainedGenericExpression using TryNullPropagation. 5 years ago
NullableRefTypes.cs Workaround dotnet/roslyn#43659 in decompiled code. 5 years ago
OptionalArguments.cs
OutVariables.cs
PInvoke.cs
PropertiesAndEvents.cs #1837 Add combined test with tuples, dynamic and nullability 6 years ago
QualifierTests.cs Fix #1955: struct 'base' access to ValueType mis-decompiles 5 years ago
QueryExpressions.cs
Readme.txt
ReduceNesting.cs Fix ReduceNestingTransform when extracting default block of switch in a try container 5 years ago
RefLocalsAndReturns.cs Fix #1943: "ref readonly" returns from properties/indexers 5 years ago
ShortCircuit.cs
Switch.cs Fix #1767: Fix detection switch-on-string that uses leave instead of branch instructions. 6 years ago
ThrowExpressions.cs
TupleTests.cs Use `nint` type for local IntPtr variables if arithmetic is performed on them. 5 years ago
TypeAnalysisTests.cs
TypeMemberTests.cs
UnsafeCode.cs #1918: Fix a bunch of issues with pinned region detection. 5 years ago
UserDefinedConversions.cs
Using.cs
ValueTypes.cs Update to Roslyn 3.7.0-2.final for tests. 5 years ago
VariableNaming.cs Fix #1881: Not properly reusing names from PDB#2 5 years ago
VariableNamingWithoutSymbols.cs
WellKnownConstants.cs
YieldReturn.cs

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.