aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Tattermusch <jtattermusch@users.noreply.github.com>2016-01-21 15:49:08 -0800
committerJan Tattermusch <jtattermusch@users.noreply.github.com>2016-01-21 15:49:08 -0800
commit187977649b46891887503d7f8c60b228238efe84 (patch)
tree7aeca0a75c13ce87fb7644452f86bc01b50054ca
parentf2b6dbb8b34dcf2124ebbc17860f2335495f692a (diff)
parent3878d84662df54533e22193ed5cc18090340ceff (diff)
downloadprotobuf-187977649b46891887503d7f8c60b228238efe84.tar.gz
protobuf-187977649b46891887503d7f8c60b228238efe84.tar.bz2
protobuf-187977649b46891887503d7f8c60b228238efe84.zip
Merge pull request #1163 from jskeet/more-json
Fix mistakes in highest-representable float64 integers
-rw-r--r--csharp/src/Google.Protobuf.Test/JsonParserTest.cs4
1 files changed, 2 insertions, 2 deletions
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 + "}";