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

Unified Diff: runtime/vm/debugger_api_impl_test.cc

Issue 23439002: JSON string decoding for VM debugger (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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
Index: runtime/vm/debugger_api_impl_test.cc
===================================================================
--- runtime/vm/debugger_api_impl_test.cc (revision 26654)
+++ runtime/vm/debugger_api_impl_test.cc (working copy)
@@ -1526,10 +1526,13 @@
"main() { \n"
" var p = new Point(3, 4); \n"
" l = [1, 2, 3]; /*BP*/ \n"
+ " m = {'\"': 'quote' , \n"
+ " \"\t\": 'tab' }; \n"
" return p; \n"
"} \n"
"var _factor = 2; \n"
"var l; \n"
+ "var m; \n"
"class Point { \n"
" var x, y; \n"
" Point(this.x, this.y); \n"
@@ -1559,6 +1562,18 @@
EXPECT_VALID(len);
EXPECT(Dart_IsNumber(len));
EXPECT_EQ(3, ToInt64(len));
+
+ Dart_Handle point_class = Dart_GetClass(script_lib, NewString("Point"));
+ EXPECT_VALID(point_class);
+ Dart_Handle elem = Dart_EvaluateExpr(point_class, NewString("m['\"']"));
+ EXPECT_VALID(elem);
+ EXPECT(Dart_IsString(elem));
+ EXPECT_STREQ("quote", ToCString(elem));
+
+ elem = Dart_EvaluateExpr(point_class, NewString("m[\"\\t\"]"));
+ EXPECT_VALID(elem);
+ EXPECT(Dart_IsString(elem));
+ EXPECT_STREQ("tab", ToCString(elem));
}

Powered by Google App Engine
This is Rietveld 408576698