| Index: runtime/vm/json_test.cc
|
| diff --git a/runtime/vm/json_test.cc b/runtime/vm/json_test.cc
|
| index 8f3e40eb5cea58815318f6e136a9eef2b05e1511..39a8eeebe097c93a222835def8af3b1dab5e1ed3 100644
|
| --- a/runtime/vm/json_test.cc
|
| +++ b/runtime/vm/json_test.cc
|
| @@ -141,7 +141,7 @@ TEST_CASE(JSON_JSONStream_Primitives) {
|
| EXPECT_STREQ("false", tb.buf());
|
|
|
| js.Clear();
|
| - js.PrintValue((intptr_t)4);
|
| + js.PrintValue(static_cast<intptr_t>(4));
|
| EXPECT_STREQ("4", tb.buf());
|
|
|
| js.Clear();
|
| @@ -219,6 +219,26 @@ TEST_CASE(JSON_JSONStream_ArrayArray) {
|
| }
|
|
|
|
|
| +TEST_CASE(JSON_JSONStream_Printf) {
|
| + TextBuffer tb(256);
|
| + JSONStream js(&tb);
|
| + js.OpenArray();
|
| + js.PrintfValue("%d %s", 2, "hello");
|
| + js.CloseArray();
|
| + EXPECT_STREQ("[\"2 hello\"]", tb.buf());
|
| +}
|
| +
|
| +
|
| +TEST_CASE(JSON_JSONStream_ObjectPrintf) {
|
| + TextBuffer tb(256);
|
| + JSONStream js(&tb);
|
| + js.OpenObject();
|
| + js.PrintfProperty("key", "%d %s", 2, "hello");
|
| + js.CloseObject();
|
| + EXPECT_STREQ("{\"key\":\"2 hello\"}", tb.buf());
|
| +}
|
| +
|
| +
|
| TEST_CASE(JSON_JSONStream_DartObject) {
|
| TextBuffer tb(256);
|
| JSONStream js(&tb);
|
|
|