Skip to content
Closed
Changes from all 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
13 changes: 13 additions & 0 deletions TestcsFastFloat/Basic/TestFloatParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using csFastFloat.Structures;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
using Xunit;

Expand All @@ -22,6 +23,18 @@ public class TestFloatParser : BaseTestClass
{ "-infinity", float.NegativeInfinity }
};

[Fact]
unsafe public void FastFloatParser_ThousandSeparator()
{
var culture = CultureInfo.InvariantCulture;
var input = "1,234,567.89";
fixed (char* p = input)
{
var bcl = float.Parse(input, culture);
var csff = FastFloatParser.ParseFloat(input);
Assert.Equal(bcl, csff);
}
}

[Trait("Category", "Smoke Test")]
[Theory]
Expand Down
Loading