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
@@ -880,7 +880,12 @@ namespace Newtonsoft.Json.Tests
jsonWriter.WriteEndArray();
}
#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]
@@ -962,7 +967,7 @@ namespace Newtonsoft.Json.Tests
ExceptionAssert.Throws<FormatException>(() => { jsonWriter.WriteToken(JsonToken.Integer, "three"); }, "Input string was not in a correct format.");
ExceptionAssert.Throws<ArgumentNullException>(() => { jsonWriter.WriteToken(JsonToken.Integer); }, @"Value cannot be null.
Parameter name: value");
Parameter name: value", "Value cannot be null. (Parameter 'value')");
}
}