Run unit tests on .NET Core 3.0 and fix Enumerable.Empty (#2137)

This commit is contained in:
James Newton-King
2019-08-19 12:57:09 +12:00
committed by GitHub
parent 083aa6df83
commit 5eac02a797
22 changed files with 300 additions and 81 deletions
@@ -1018,7 +1018,11 @@ namespace Newtonsoft.Json.Tests
await jsonWriter.WriteEndArrayAsync();
}
#if !NETSTANDARD2_0
Assert.AreEqual(@"[0.0,0.0,0.1,1.0,1.000001,1E-06,4.94065645841247E-324,Infinity,-Infinity,NaN,1.7976931348623157E+308,-1.7976931348623157E+308,Infinity,-Infinity,NaN]", sb.ToString());
#else
Assert.AreEqual(@"[0.0,0.0,0.1,1.0,1.000001,1E-06,5E-324,Infinity,-Infinity,NaN,1.7976931348623157E+308,-1.7976931348623157E+308,Infinity,-Infinity,NaN]", sb.ToString());
#endif
}
[Test]
@@ -1094,7 +1098,7 @@ namespace Newtonsoft.Json.Tests
await ExceptionAssert.ThrowsAsync<FormatException>(async () => { await jsonWriter.WriteTokenAsync(JsonToken.Integer, "three"); }, "Input string was not in a correct format.");
await ExceptionAssert.ThrowsAsync<ArgumentNullException>(async () => { await jsonWriter.WriteTokenAsync(JsonToken.Integer); }, @"Value cannot be null.
Parameter name: value");
Parameter name: value", "Value cannot be null. (Parameter 'value')");
}
}