Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[browser][HybridGlobalization] Fix incorrect value in FirstDayOfWeek test #93595

Merged
merged 3 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ public static IEnumerable<object[]> FirstDayOfWeek_Get_TestData()
{
yield return new object[] { DateTimeFormatInfo.InvariantInfo, DayOfWeek.Sunday, "invariant" };
yield return new object[] { new CultureInfo("en-US", false).DateTimeFormat, DayOfWeek.Sunday, "en-US" };
// ActiveIssue: https://github.com/dotnet/runtime/issues/93354
if (!PlatformDetection.IsHybridGlobalizationOnBrowser)
yield return new object[] { new CultureInfo("fr-FR", false).DateTimeFormat, DayOfWeek.Monday, "fr-FR" };
yield return new object[] { new CultureInfo("fr-FR", false).DateTimeFormat, DayOfWeek.Monday, "fr-FR" };
}

public static IEnumerable<object[]> FirstDayOfWeek_Get_TestData_HybridGlobalization()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ private static unsafe int GetFirstDayOfWeek(string localeName)
int result = Interop.JsGlobalization.GetFirstDayOfWeek(localeName, out int exception, out object ex_result);
if (exception != 0)
{
// Failed, just use 0
Debug.Fail($"[CultureData.GetFirstDayOfWeek()] failed with {ex_result}");
return 0;
ilonatommy marked this conversation as resolved.
Show resolved Hide resolved
}
return result;
}
Expand All @@ -47,9 +45,7 @@ private static unsafe int GetFirstWeekOfYear(string localeName)
int result = Interop.JsGlobalization.GetFirstWeekOfYear(localeName, out int exception, out object ex_result);
if (exception != 0)
{
// Failed, just use 0
Debug.Fail($"[CultureData.GetFirstWeekOfYear()] failed with {ex_result}");
return 0;
}
return result;
}
Expand Down