-DoubleTryParse WIP

This commit is contained in:
James Newton-King
2016-08-09 12:36:37 +12:00
parent 8621a71e19
commit a98ffca811
3 changed files with 63 additions and 9 deletions
@@ -1850,6 +1850,11 @@ third line", jsonTextReader.Value);
reader = new JsonTextReader(new StringReader("5.1231231E"));
ExceptionAssert.Throws<JsonReaderException>(() => reader.Read(), "Input string '5.1231231E' is not a valid number. Path '', line 1, position 10.");
reader = new JsonTextReader(new StringReader("1E-23"));
Assert.IsTrue(reader.Read());
Assert.AreEqual(typeof(double), reader.ValueType);
Assert.AreEqual(1e-23, reader.Value);
}
[Test]