.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 783c934bfd Transform RequiresLocationAttribute to 'ref readonly' on function pointers. 10 months 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 Fix nullable and other warnings. 3 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 #3010: Remove compiler-generated attributes for required members with custom ctors. 2 years ago
CS9_ExtensionGetEnumerator.cs Add additional tests for .NET 4.0 3 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 Merge pull request #3003 from icsharpcode/local-compound-assignment 2 years ago
ConstantsTests.cs Add feature: C#11 nint without NativeIntegerAttribute 2 years ago
ConstructorInitializers.cs Fix #2714: Force inlining of call targets in ctor initializers. 3 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 Add test case for generic attributes. 2 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 Add additional tests for .NET 4.0 3 years ago
DelegateConstruction.cs Fix #2791: Ensure that the capture scope used is either a loop or the ILFunction root container. 3 years ago
Discards.cs Fix #2140: ILSpy 6.2p1 no longer respects "use discards" setting 5 years ago
DynamicTests.cs Transform RequiresLocationAttribute to 'ref readonly' on function pointers. 10 months ago
EnumTests.cs Fix #2646: Missing values for enums with skipped or duplicate items 3 years ago
ExceptionHandling.cs Fix nullable and other warnings. 3 years ago
ExpressionTrees.cs Fix #3014: Missing type information in lambda expressions. 2 years ago
FileScopedNamespaces.cs Generate file-scoped namespace declarations, if possible. 4 years ago
FixProxyCalls.cs Fix #3014: Missing type information in lambda expressions. 2 years ago
FunctionPointers.cs Transform RequiresLocationAttribute to 'ref readonly' on function pointers. 10 months 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 #3091: extension methods named "Add" were skipping some checks in AccessPathElement.IsMethodApplicable. 2 years ago
InlineAssignmentTest.cs Fix #603: Single element arrays should not span multiple lines 4 years ago
InterfaceTests.cs Output attributes on lambda expressions 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 Add feature: C#11 nint without NativeIntegerAttribute 2 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
MetadataAttributes.cs Add MethodCodeType argument to MethodImplAttribute. 3 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 Merge pull request #2873 from icsharpcode/net-7.0 2 years ago
NullPropagation.cs Fix #603: Single element arrays should not span multiple lines 4 years ago
NullableRefTypes.cs Add test case for explicit interface implementation involving nullable types 2 years ago
Operators.cs Add support for calling `operator checked`. 2 years ago
OptionalArguments.cs Fix #2920: Implement support for DefaultParameterValueAttribute. 2 years ago
OutVariables.cs Fix #2806: Do not use implicitly typed out variables, if argument and parameter types do not match exactly. 3 years ago
PInvoke.cs Fix interaction of C# 11 nint==IntPtr with overload resolution. 2 years ago
PatternMatching.cs Add test case for empty string pattern 2 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 Remove incomplete/wrong support for null-forgiving operator. 3 years ago
Readme.txt Upgrade Roslyn for tests to 3.0.0-beta3. 6 years ago
Records.cs Fix #3010: Remove compiler-generated attributes for required members with custom ctors. 2 years ago
ReduceNesting.cs Adjust test name 2 years ago
RefFields.cs Add support for ScopedRefAttribute 2 years ago
RefLocalsAndReturns.cs Transform RequiresLocationAttribute to 'ref readonly' on function pointers. 10 months ago
ShortCircuit.cs Fix DecompilerSettings.PatternMatching should only be active in case >= CS70. 4 years ago
StaticAbstractInterfaceMembers.cs Implement support for explicit interface implementation of operators and operator uses. 2 years ago
StringInterpolation.cs Add support for string format alignment. 3 years ago
Structs.cs Add support for C# 11 required members. 3 years ago
Switch.cs Move to .NET 8.0 (#3119) 2 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 #3014: Missing type information in lambda expressions. 2 years ago
TypeAnalysisTests.cs Avoid using `>>>` operator when the context expects a cast to unsigned anyway. 2 years ago
TypeMemberTests.cs Fix #603: Single element arrays should not span multiple lines 4 years ago
UnsafeCode.cs Add feature: C#11 nint without NativeIntegerAttribute 2 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 Add additional tests for .NET 4.0 3 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 Add additional tests for .NET 4.0 3 years ago
YieldReturn.cs Add support for `lock` statements within yield return state machines 3 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.