1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-10 10:00:57 +09:00

Fixed System.Tests.DateTimeTests.TryFormat_MatchesToString test (#87693)

Co-authored-by: Stephen Toub <stoub@microsoft.com>
This commit is contained in:
Alexander Radchenko 2023-06-20 03:05:54 +06:00 committed by GitHub
parent e834d4256a
commit 35a598be7a
Signed by: github
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2735,6 +2735,10 @@ namespace System.Tests
public static void TryFormat_MatchesToString(string format)
{
DateTime dt = DateTime.UtcNow;
foreach (CultureInfo culture in CultureInfo.GetCultures(CultureTypes.AllCultures))
{
using (new ThreadCultureChange(culture))
{
string expected = dt.ToString(format);
// UTF16
@ -2779,6 +2783,8 @@ namespace System.Tests
Assert.Equal(0, dest[dest.Length - 1]);
}
}
}
}
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotInvariantGlobalization))]
[MemberData(nameof(ToString_MatchesExpected_MemberData))]