diff options
author | Jon Skeet <jonskeet@google.com> | 2016-01-21 10:49:57 +0000 |
---|---|---|
committer | Jon Skeet <jonskeet@google.com> | 2016-01-21 10:49:57 +0000 |
commit | 3878d84662df54533e22193ed5cc18090340ceff (patch) | |
tree | a916dc64a0e73ef173a424c077817fb28faccac1 /csharp | |
parent | fe066bd514fcd08f2c2bf94d3d0e89e3c4f10884 (diff) | |
download | protobuf-3878d84662df54533e22193ed5cc18090340ceff.tar.gz protobuf-3878d84662df54533e22193ed5cc18090340ceff.tar.bz2 protobuf-3878d84662df54533e22193ed5cc18090340ceff.zip |
Fix mistakes in highest-representable float64 integers
Diffstat (limited to 'csharp')
-rw-r--r-- | csharp/src/Google.Protobuf.Test/JsonParserTest.cs | 4 |
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 + "}"; |