Add the ability to specify format provider (to make tests culture invariant)

This commit is contained in:
Dean Herbert
2021-03-26 13:09:53 +09:00
parent 6a7f926168
commit 4909eaf890
2 changed files with 7 additions and 4 deletions

View File

@ -1,6 +1,7 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Globalization;
using NUnit.Framework;
using osu.Game.Utils;
@ -19,7 +20,7 @@ namespace osu.Game.Tests.NonVisual
[TestCase(1, "100.00%")]
public void TestAccuracyFormatting(double input, string expectedOutput)
{
Assert.AreEqual(expectedOutput, input.FormatAccuracy());
Assert.AreEqual(expectedOutput, input.FormatAccuracy(CultureInfo.InvariantCulture));
}
}
}