-Added JsonLoadSettings.LineInfoHandling

This commit is contained in:
James Newton-King
2015-11-21 19:31:17 +13:00
parent 000407f610
commit 7903b4b2e2
16 changed files with 166 additions and 50 deletions
@@ -560,5 +560,21 @@ Parameter name: index");
Assert.AreEqual(2, (int)a[1]);
Assert.AreEqual(3, (int)a[2]);
}
[Test]
public void Parse_LineInfo()
{
string json = "[1,2,3]";
JArray a = JArray.Parse(json, new JsonLoadSettings
{
LineInfoHandling = LineInfoHandling.Load
});
Assert.AreEqual(false, ((IJsonLineInfo)a).HasLineInfo());
Assert.AreEqual(false, ((IJsonLineInfo)a[0]).HasLineInfo());
Assert.AreEqual(false, ((IJsonLineInfo)a[1]).HasLineInfo());
Assert.AreEqual(false, ((IJsonLineInfo)a[2]).HasLineInfo());
}
}
}
@@ -1,7 +1,7 @@
{
"dependencies": {
"NUnit": "2.6.2",
"FSharp.Core": "4.0.0"
"FSharp.Core": "4.0.0.1"
},
"frameworks": {
"net40": {}
@@ -1,6 +1,6 @@
{
"dependencies": {
"FSharp.Core": "4.0.0",
"FSharp.Core": "4.0.0.1",
"NUnit": "2.6.2",
"System.Collections.Immutable": "1.1.36"
},
@@ -1,6 +1,6 @@
{
"dependencies": {
"FSharp.Core": "4.0.0",
"FSharp.Core": "4.0.0.1",
"NUnit": "2.6.2"
},
"frameworks": {
@@ -1,7 +1,7 @@
{
"dependencies": {
"Autofac": "4.0.0-beta7-130",
"FSharp.Core": "4.0.0",
"FSharp.Core": "4.0.0.1",
"NUnit": "2.6.2",
"System.Collections.Immutable": "1.1.36"
},