Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(850)

Unified Diff: runtime/vm/json_test.cc

Issue 18472009: JSONStream Print Dart Objects (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/json_stream.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « runtime/vm/json_stream.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698