From 98661a56c2c3c136f37b7023f41fd1f6a5cb47fc Mon Sep 17 00:00:00 2001 From: Luc Tremblay Date: Wed, 30 Oct 2024 20:58:45 -0400 Subject: [PATCH] Set the DefaultThreadCurrentUICulture to a specific culture, otherwise if the current computer culture is not en-US a lot of asserts will fail, because the language of the error might not be english. --- Tests/TestRunners/ConverterTestBase.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Tests/TestRunners/ConverterTestBase.cs b/Tests/TestRunners/ConverterTestBase.cs index fbd3ce66..a1ea27b3 100644 --- a/Tests/TestRunners/ConverterTestBase.cs +++ b/Tests/TestRunners/ConverterTestBase.cs @@ -11,6 +11,7 @@ using Microsoft.CodeAnalysis.VisualBasic; using Xunit; using Xunit.Sdk; +using System.Globalization; namespace ICSharpCode.CodeConverter.Tests.TestRunners; @@ -28,6 +29,7 @@ public class ConverterTestBase public ConverterTestBase(string rootNamespace = null) { + CultureInfo.DefaultThreadCurrentUICulture = CultureInfo.InvariantCulture; _rootNamespace = rootNamespace; var options = new VisualBasicCompilationOptions(OutputKind.DynamicallyLinkedLibrary) .WithOptionExplicit(true)