Fix nondeterministic VBPretty test failure.

This commit is contained in:
Daniel Grunwald
2026-08-30 19:18:46 +02:00
parent 123da4deeb
commit 6ac9b813e6
2 changed files with 2 additions and 6 deletions
@@ -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
@@ -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));