From 3878d84662df54533e22193ed5cc18090340ceff Mon Sep 17 00:00:00 2001 From: Jon Skeet Date: Thu, 21 Jan 2016 10:49:57 +0000 Subject: Fix mistakes in highest-representable float64 integers --- csharp/src/Google.Protobuf.Test/JsonParserTest.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'csharp/src') diff --git a/csharp/src/Google.Protobuf.Test/JsonParserTest.cs b/csharp/src/Google.Protobuf.Test/JsonParserTest.cs index c4f6dfb4..d21da58a 100644 --- a/csharp/src/Google.Protobuf.Test/JsonParserTest.cs +++ b/csharp/src/Google.Protobuf.Test/JsonParserTest.cs @@ -477,7 +477,7 @@ namespace Google.Protobuf [TestCase("-1", -1L)] // long.MaxValue isn't actually representable as a double. This string value is the highest // representable value which isn't greater than long.MaxValue. - [TestCase("9223372036854769664", 9223372036854769664)] + [TestCase("9223372036854774784", 9223372036854774784)] [TestCase("-9223372036854775808", -9223372036854775808)] public void NumberToInt64_Valid(string jsonValue, long expectedParsedValue) { @@ -504,7 +504,7 @@ namespace Google.Protobuf [TestCase("1", 1UL)] // ulong.MaxValue isn't representable as a double. This value is the largest double within // the range of ulong. - [TestCase("18446744073709500416", 18446744073709500416UL)] + [TestCase("18446744073709549568", 18446744073709549568UL)] public void NumberToUInt64_Valid(string jsonValue, ulong expectedParsedValue) { string json = "{ \"singleUint64\": " + jsonValue + "}"; -- cgit v1.2.3