Index: runtime/vm/json_test.cc |
diff --git a/runtime/vm/json_test.cc b/runtime/vm/json_test.cc |
index 152c5dda6063aafecf0dcd062641ac13b593f3ad..8f3e40eb5cea58815318f6e136a9eef2b05e1511 100644 |
--- a/runtime/vm/json_test.cc |
+++ b/runtime/vm/json_test.cc |
@@ -219,4 +219,17 @@ TEST_CASE(JSON_JSONStream_ArrayArray) { |
} |
+TEST_CASE(JSON_JSONStream_DartObject) { |
+ TextBuffer tb(256); |
+ JSONStream js(&tb); |
+ js.OpenArray(); |
+ js.PrintValue(Object::Handle(Object::null())); |
+ js.OpenObject(); |
+ js.PrintProperty("object_key", Object::Handle(Object::null())); |
+ js.CloseArray(); |
+ EXPECT_STREQ("[{\"type\":\"null\"},{\"object_key\":{\"type\":\"null\"}]", |
+ tb.buf()); |
+} |
+ |
+ |
} // namespace dart |