-Fixed JToken Load and Parse methods not checking for incomplete content

This commit is contained in:
JamesNK
2010-12-27 10:06:35 +00:00
parent 1297d64457
commit f32e1f53c5
7 changed files with 95 additions and 23 deletions
@@ -429,5 +429,12 @@ Parameter name: index")]
Assert.AreEqual(1, a.Count);
Assert.AreEqual(1, (int)a[0]);
}
[Test]
[ExpectedException(typeof(Exception), ExpectedMessage = "Unexpected end of content while loading JArray.")]
public void ParseIncomplete()
{
JArray.Parse("[1");
}
}
}