.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 db7d507138 Fix #2615: Overflow check did not work reliably due to fp rounding error 3 years ago
..
.gitignore Move UnsafeCode tests to pretty-tests (except for those that are not yet successful). 8 years ago
AnonymousTypes.cs Fix #603: Single element arrays should not span multiple lines 4 years ago
AssemblyCustomAttributes.cs Rearrange pretty tests, so that they work with Roslyn compilers as well. 7 years ago
Async.cs Add test case for #2436 4 years ago
AsyncForeach.cs Fix #1749, fix #2339, fix #2353: Add support for rethrow in async exception handlers, fix await catch/finally patterns for complex methods. 4 years ago
AsyncMain.cs Fix lines starting with spaces 7 years ago
AsyncStreams.cs #2128: Reformat the whole code base. 5 years ago
AsyncUsing.cs #2128: Reformat the whole code base. 5 years ago
AutoProperties.cs Fix #603: Single element arrays should not span multiple lines 4 years ago
CS6_StringInterpolation.cs Fix #2544: do not transform to interpolated string, if the format string is not syntactically correct. 4 years ago
CS9_ExtensionGetEnumerator.cs Fix unit tests. 4 years ago
CS72_PrivateProtected.cs Fix #603: Single element arrays should not span multiple lines 4 years ago
CS73_StackAllocInitializers.cs Âdd a test case for stackalloc in nested context. 3 years ago
CheckedUnchecked.cs Fix #603: Single element arrays should not span multiple lines 4 years ago
CompoundAssignmentTest.cs Fix #2448: Decompiler shows some enum values as hexdecimal instead of decimal 4 years ago
ConstantsTests.cs Fix #2202: prevent casting null to void* if the expected target-type is (U)IntPtr? 5 years ago
ConstructorInitializers.cs Fix #2547: decimal const not removed from static constructor. 4 years ago
CovariantReturns.cs Adds support for C# 9 covariant return types in methods and getter-only properties and indexers. 4 years ago
CustomAttributeConflicts.cs #2128: Reformat the whole code base. 5 years ago
CustomAttributeSamples.cs Fix #2448: Decompiler shows some enum values as hexdecimal instead of decimal 4 years ago
CustomAttributes.cs Fix #2448: Decompiler shows some enum values as hexdecimal instead of decimal 4 years ago
CustomAttributes2.cs Fix #2448: Decompiler shows some enum values as hexdecimal instead of decimal 4 years ago
CustomShortCircuitOperators.cs #2128: Reformat the whole code base. 5 years ago
CustomTaskType.cs Fix #603: Single element arrays should not span multiple lines 4 years ago
DeconstructionTests.cs Fix #2378: DeconstructionTransform produced invalid ILAst with some optimized deconstruction patterns. 4 years ago
DelegateConstruction.cs Run tests with different versions of Roslyn 5 years ago
Discards.cs Fix #2140: ILSpy 6.2p1 no longer respects "use discards" setting 5 years ago
DynamicTests.cs Fix #2278: Implement support for CSharpBinderFlags.InvokeSimpleName 4 years ago
EnumTests.cs Fix #2448: Decompiler shows some enum values as hexdecimal instead of decimal 4 years ago
ExceptionHandling.cs Fix #2379: Keep `return` statements around in original form for ConditionDetection, only transform to fall-through block-exit at the end of the transform pipeline. 4 years ago
ExpressionTrees.cs Fix #2354: decompilation of unary and binary operators with nullable value types. 4 years ago
FileScopedNamespaces.cs Generate file-scoped namespace declarations, if possible. 4 years ago
FixProxyCalls.cs Avoid parentheses around lambdas where possible. 5 years ago
FunctionPointers.cs Adjust AsyncAwaitDecompiler to Roslyn 3.9.0. 4 years ago
Generics.cs Fix #2231: Add support for ldloca; dup; initobj pattern used by Roslyn. 4 years ago
HelloWorld.cs Move test projects to their own directory in \ 8 years ago
IndexRangeTest.cs Fix #2156: range syntax not being detected correctly in some cases 5 years ago
InitializerTests.cs Fix #2612 decompilation of newarr with int.MaxValue causes OOME in decompiler. 3 years ago
InlineAssignmentTest.cs Fix #603: Single element arrays should not span multiple lines 4 years ago
InterfaceTests.cs Add basic support for abstract static members in interfaces. 3 years ago
Issue1080.cs #2128: Reformat the whole code base. 5 years ago
LiftedOperators.cs Adjust NullableLiftingTransform to match new patterns due to RemoveInfeasiblePathTransform. 4 years ago
LocalFunctions.cs `#enable nullable` for a couple of files. 4 years ago
Lock.cs #2128: Reformat the whole code base. 5 years ago
Loops.cs mcs 5 generates IL patterns that might lead to wrong behavior, if inlined, therefore we have to add another special case to the tests. 4 years ago
MemberTests.cs Fix #2389: missing extern keyword for properties and events. 4 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
NativeInts.cs Fix #2541: Add explicit `unchecked()` around non-constant cast of constant to `nint` 4 years ago
NullPropagation.cs Fix #603: Single element arrays should not span multiple lines 4 years ago
NullableRefTypes.cs Fix #603: Single element arrays should not span multiple lines 4 years ago
OptionalArguments.cs Fix #603: Single element arrays should not span multiple lines 4 years ago
OutVariables.cs Initial implementation of the pattern matching transform. 4 years ago
PInvoke.cs #2128: Reformat the whole code base. 5 years ago
PatternMatching.cs Move PatternMatchingTransform after LoopDetection. 4 years ago
PropertiesAndEvents.cs Fix #603: Single element arrays should not span multiple lines 4 years ago
QualifierTests.cs #1828: Add test case 4 years ago
QueryExpressions.cs Fix #2545: LINQ expression has a question operator on the source collection 4 years ago
Readme.txt Upgrade Roslyn for tests to 3.0.0-beta3. 6 years ago
Records.cs Add support for `in parameters` in primary ctor of records 4 years ago
ReduceNesting.cs DetectExitPoints: introduce exit points for loops+switch 4 years ago
RefLocalsAndReturns.cs Fix #2406: for readonly property with only getter, move readonly to property instead of getter 4 years ago
ShortCircuit.cs Fix DecompilerSettings.PatternMatching should only be active in case >= CS70. 4 years ago
StaticAbstractInterfaceMembers.cs Add basic support for abstract static members in interfaces. 3 years ago
Structs.cs Add struct test case. 4 years ago
Switch.cs Fix #2283: Disallow all implicit conversions in switch on string. 4 years ago
SwitchExpressions.cs Update to dotnet-format 5.1.225507. 4 years ago
ThrowExpressions.cs Fix #603: Single element arrays should not span multiple lines 4 years ago
TupleTests.cs Fix #603: Single element arrays should not span multiple lines 4 years ago
TypeAnalysisTests.cs Fix #2398: TranslateCondition: truncate condition value if necessary 4 years ago
TypeMemberTests.cs Fix #603: Single element arrays should not span multiple lines 4 years ago
UnsafeCode.cs Fix #2391: mark method as unsafe when passing `null` to a parameter of pointer type. 4 years ago
UserDefinedConversions.cs Fix #1944: Add support for implicit conversions with `in` parameters. 4 years ago
Using.cs #2128: Reformat the whole code base. 5 years ago
UsingVariables.cs Fix #1749, fix #2339, fix #2353: Add support for rethrow in async exception handlers, fix await catch/finally patterns for complex methods. 4 years ago
ValueTypes.cs Fix #2390: Extend variable splitting to treat stobj as immediate address use. 4 years ago
VariableNaming.cs Run tests with different versions of Roslyn 5 years ago
VariableNamingWithoutSymbols.cs Run tests with different versions of Roslyn 5 years ago
WellKnownConstants.cs Fix #2615: Overflow check did not work reliably due to fp rounding error 3 years ago
YieldReturn.cs #2128: Reformat the whole code base. 5 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.