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

Unified Diff: runtime/vm/debugger_api_impl_test.cc

Issue 11696005: Improve line info accuracy in debugging (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years 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 16535)
+++ runtime/vm/debugger_api_impl_test.cc (working copy)
@@ -971,9 +971,7 @@
const String& script_url = String::Handle(String::New(TestCase::url()));
Function& func = Function::Handle();
- // TODO(hausner): Looking up functions from source and line number
- // needs to be refined. We currently dont find "main" on line 7.
- for (int line = 8; line <= 9; line++) {
+ for (int line = 7; line <= 9; line++) {
func = test_lib.LookupFunctionInSource(script_url, line);
EXPECT(!func.IsNull());
EXPECT_STREQ("main", String::Handle(func.name()).ToCString());
@@ -984,7 +982,8 @@
EXPECT_STREQ("foo", String::Handle(func.name()).ToCString());
func = test_lib.LookupFunctionInSource(script_url, 1);
- EXPECT(func.IsNull());
+ EXPECT(!func.IsNull());
Ivan Posva 2012/12/28 17:53:49 Please explain in a comment why you find the const
hausner 2013/01/07 23:24:31 Done.
+ EXPECT_STREQ("A.", String::Handle(func.name()).ToCString());
func = test_lib.LookupFunctionInSource(script_url, 6);
EXPECT(func.IsNull());
func = test_lib.LookupFunctionInSource(script_url, 10);
« no previous file with comments | « runtime/vm/debugger.cc ('k') | runtime/vm/intermediate_language.h » ('j') | runtime/vm/object.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698