public void LowestBoundPasses() { var lowestBoundString = (-1e300).ToString(CultureInfo.InvariantCulture); var result = lowestBoundString.ConvertTo().Double.Parse(); FloatAssertions.AlmostEqual(result, -1e300).Should().BeTrue(); }
public void HighestBoundPasses() { var lowestBoundString = float.MaxValue.ToString(CultureInfo.InvariantCulture); var result = lowestBoundString.ConvertTo().Single.ParseInvariant(); FloatAssertions.AlmostEqual(result, float.MaxValue).Should().BeTrue(); }
public void LowestBoundPasses() { var lowestBoundString = (-1e300).ToString(CultureInfo.InvariantCulture); var result = lowestBoundString.ConvertToNullable().Double.Parse(); result.HasValue.Should().BeTrue(); Debug.Assert(result != null, "result != null"); FloatAssertions.AlmostEqual(result.Value, -1e300).Should().BeTrue(); }
public void HighestBoundPasses() { var lowestBoundString = float.MaxValue.ToString(CultureInfo.InvariantCulture); var result = lowestBoundString.ConvertToNullable().Single.ParseInvariant(); result.HasValue.Should().BeTrue(); Debug.Assert(result != null, "result != null"); FloatAssertions.AlmostEqual(result.Value, float.MaxValue).Should().BeTrue(); }