Browse Source

Fix nondeterministic VBPretty test failure.

pull/4089/head
Daniel Grunwald 2 weeks ago
parent
commit
6ac9b813e6
  1. 5
      ICSharpCode.Decompiler.Tests/TestCases/VBPretty/VBAnonymousTypes.cs
  2. 3
      ICSharpCode.Decompiler.Tests/VBPrettyTestRunner.cs

5
ICSharpCode.Decompiler.Tests/TestCases/VBPretty/VBAnonymousTypes.cs

@ -12,13 +12,8 @@ using Microsoft.VisualBasic.CompilerServices; @@ -12,13 +12,8 @@ using Microsoft.VisualBasic.CompilerServices;
// A VB anonymous type. Its properties are settable and only those declared 'Key'
// take part in Equals and GetHashCode, so it cannot be written as a C# anonymous
// type and is declared here instead.
#if LEGACY_VBC && OPT
[DebuggerDisplay("Value={Value}, Name={Name}")]
[CompilerGenerated]
#else
[CompilerGenerated]
[DebuggerDisplay("Value={Value}, Name={Name}")]
#endif
internal sealed class VB_AnonymousType_0<T0, T1>
{
#if !OPT && !LEGACY_VBC

3
ICSharpCode.Decompiler.Tests/VBPrettyTestRunner.cs

@ -193,7 +193,8 @@ namespace ICSharpCode.Decompiler.Tests @@ -193,7 +193,8 @@ namespace ICSharpCode.Decompiler.Tests
}
var executable = await Tester.CompileVB(vbFile, options | CompilerOptions.ReferenceVisualBasic, exeFile).ConfigureAwait(false);
var decompiled = await Tester.DecompileCSharp(executable.PathToAssembly, settings ?? new DecompilerSettings { FileScopedNamespaces = false }).ConfigureAwait(false);
settings ??= new DecompilerSettings { FileScopedNamespaces = false, SortCustomAttributes = true };
var decompiled = await Tester.DecompileCSharp(executable.PathToAssembly, settings).ConfigureAwait(false);
CodeAssert.FilesAreEqual(csFile, decompiled, Tester.GetPreprocessorSymbols(options).ToArray());
Tester.RepeatOnIOError(() => File.Delete(decompiled));

Loading…
Cancel
Save