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

Unified Diff: runtime/vm/debugger_api_impl_test.cc

Issue 9264058: Debugger API: get local variables of an activation frame (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 years, 11 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/debugger_api_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/debugger_api_impl_test.cc
===================================================================
--- runtime/vm/debugger_api_impl_test.cc (revision 3737)
+++ runtime/vm/debugger_api_impl_test.cc (working copy)
@@ -160,6 +160,7 @@
" class A { \n"
" var a_field = 'a'; \n"
" static var bla = 'yada yada yada';\n"
+ " static var error = unresolvedName(); \n"
" var d = 42.1; \n"
" } \n"
" class B extends A { \n"
@@ -243,7 +244,7 @@
Dart_StringToCString(value_handle, &value);
EXPECT_STREQ("blah blah", value);
- // Check static field of B's superclass (one field named 'bla')
+ // Check static field of B's superclass.
Dart_Handle class_A = Dart_GetSuperclass(class_B);
EXPECT_NOT_ERROR(class_A);
EXPECT(!Dart_IsNull(class_A));
@@ -253,7 +254,8 @@
list_length = 0;
retval = Dart_ListLength(fields, &list_length);
EXPECT_NOT_ERROR(retval);
- EXPECT_EQ(2, list_length);
+ EXPECT_EQ(4, list_length);
+ // Static field "bla" should have value "yada yada yada".
name_handle = Dart_ListGetAt(fields, 0);
EXPECT_NOT_ERROR(name_handle);
EXPECT(Dart_IsString(name_handle));
@@ -266,6 +268,14 @@
EXPECT(Dart_IsString(value_handle));
Dart_StringToCString(value_handle, &value);
EXPECT_STREQ("yada yada yada", value);
+ // The static field "error" should result in a compile error.
+ name_handle = Dart_ListGetAt(fields, 2);
+ EXPECT_NOT_ERROR(name_handle);
+ EXPECT(Dart_IsString(name_handle));
+ Dart_StringToCString(name_handle, &name);
+ EXPECT_STREQ("error", name);
+ value_handle = Dart_ListGetAt(fields, 3);
+ EXPECT(Dart_IsError(value_handle));
}
« no previous file with comments | « runtime/vm/debugger_api_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698