Skip to content

Commit 8c503e1

Browse files
committed
Fix the browser AOT tests
1 parent a74646e commit 8c503e1

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/tests/BuildWasmApps/Wasm.Build.Tests/InvariantGlobalizationTests.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,17 @@ private void TestInvariantGlobalization(BuildArgs buildArgs, bool? invariantGlob
6262
public class TestClass {
6363
public static int Main()
6464
{
65-
var culture = new CultureInfo(""es-ES"", false);
65+
CultureInfo culture;
66+
try
67+
{
68+
culture = new CultureInfo(""es-ES"", false);
6669
// https://github.com/dotnet/runtime/blob/main/docs/design/features/globalization-invariant-mode.md#cultures-and-culture-data
67-
Console.WriteLine($""{culture.LCID == 0x1000} - {culture.NativeName}"");
70+
}
71+
catch
72+
{
73+
culture = new CultureInfo("""", false);
74+
}
75+
Console.WriteLine($""{culture.LCID == CultureInfo.InvariantCulture.LCID} - {culture.NativeName}"");
6876
return 42;
6977
}
7078
}";

0 commit comments

Comments
 (0)