Update Newtonsoft.Json project to use nullable reference types (#1950)
This commit is contained in:
@@ -242,6 +242,26 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
Assert.AreEqual(2, a[2].BeforeSelf().Count());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void BeforeSelf_NoParent_ReturnEmpty()
|
||||
{
|
||||
JObject o = new JObject();
|
||||
|
||||
List<JToken> result = o.BeforeSelf().ToList();
|
||||
Assert.AreEqual(0, result.Count);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void BeforeSelf_OnlyChild_ReturnEmpty()
|
||||
{
|
||||
JArray a = new JArray();
|
||||
JObject o = new JObject();
|
||||
a.Add(o);
|
||||
|
||||
List<JToken> result = o.BeforeSelf().ToList();
|
||||
Assert.AreEqual(0, result.Count);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Casting()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user