| Index: base/json/json_writer_unittest.cc
|
| diff --git a/base/json/json_writer_unittest.cc b/base/json/json_writer_unittest.cc
|
| index 5d44c020efa5b59ce405dce26e98e484d60e18fc..fea0c44b787248dd2067cab408d0bdb32cdba69e 100644
|
| --- a/base/json/json_writer_unittest.cc
|
| +++ b/base/json/json_writer_unittest.cc
|
| @@ -119,6 +119,13 @@ TEST(JSONWriterTest, Writing) {
|
| JSONWriter::OPTIONS_OMIT_BINARY_VALUES,
|
| &output_js);
|
| ASSERT_EQ("{\"a\":5,\"c\":2}", output_js);
|
| +
|
| + // Test allowing a double with no fractional part to be written as an integer.
|
| + FundamentalValue double_value(1e10);
|
| + JSONWriter::WriteWithOptions(&double_value, false,
|
| + JSONWriter::OPTIONS_ALLOW_DOUBLES_AS_INTEGERS,
|
| + &output_js);
|
| + ASSERT_EQ("10000000000", output_js);
|
| }
|
|
|
| } // namespace base
|
|
|