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

Fixes test DeserializeScalarEdgeCases for non english cultures. #793

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion YamlDotNet.Test/Serialization/DeserializerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
using YamlDotNet.Core;
using YamlDotNet.Serialization;
using YamlDotNet.Serialization.NamingConventions;
using System.Globalization;

namespace YamlDotNet.Test.Serialization
{
Expand Down Expand Up @@ -279,7 +280,8 @@ public static IEnumerable<object[]> DeserializeScalarEdgeCases_TestCases
public void DeserializeScalarEdgeCases(IConvertible value, Type type)
{
var deserializer = new DeserializerBuilder().Build();
var result = deserializer.Deserialize(value.ToString(), type);
var stringValue = string.Format(CultureInfo.InvariantCulture, "{0}", value);
var result = deserializer.Deserialize(stringValue, type);

result.Should().Be(value);
}
Expand Down