Files
RobustToolbox/Robust.UnitTesting/Shared/Utility/YamlHelpers_Test.cs
T
SilverandGitHub 25926a17b7 Renames SS14.* to Robust.* (#793)
RobustToolbox projects should be named Robust.* 

This PR changes the RobustToolbox projects from SS14.* to Robust.*

Updates SS14.* prefixes/namespaces to Robust.*
Updates SpaceStation14.sln to RobustToolbox.sln
Updates MSBUILD/SS14.* to MSBUILD/Robust.*
Updates CSProject and MSBuild references for the above
Updates git_helper.py
Removes Runserver and Runclient as they are unusable
2019-04-15 20:24:59 -06:00

27 lines
961 B
C#

using System;
using System.Globalization;
using NUnit.Framework;
using Robust.Shared.Utility;
using YamlDotNet.RepresentationModel;
namespace Robust.UnitTesting.Shared.Utility
{
[Parallelizable(ParallelScope.All | ParallelScope.Fixtures)]
[TestFixture]
public class YamlHelpers_Test : RobustUnitTest
{
[Test]
[SetCulture("fr-FR")]
public void Test_CultureInvariance()
{
// Make sure that we're on a locale in which the decimals would be messed up.
// French is one but I'd rather have false negatives than false positives.
Assert.That(CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator, Is.EqualTo(","));
Assert.That(float.Parse("10,5"), Is.EqualTo(10.5f));
Assert.That(() => float.Parse("10.5"), Throws.InstanceOf<FormatException>());
Assert.That(new YamlScalarNode("10.5").AsFloat(), Is.EqualTo(10.5f));
}
}
}