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

Side by Side Diff: runtime/vm/debugger_api_impl_test.cc

Issue 12328019: - Improve the message for NoSuchMethodErrors that are (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/dart_entry.cc ('k') | runtime/vm/exceptions.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "include/dart_debugger_api.h" 5 #include "include/dart_debugger_api.h"
6 #include "platform/assert.h" 6 #include "platform/assert.h"
7 #include "vm/dart_api_impl.h" 7 #include "vm/dart_api_impl.h"
8 #include "vm/thread.h" 8 #include "vm/thread.h"
9 #include "vm/unit_test.h" 9 #include "vm/unit_test.h"
10 10
(...skipping 1390 matching lines...) Expand 10 before | Expand all | Expand 10 after
1401 "Test.func1", 1401 "Test.func1",
1402 "main" 1402 "main"
1403 }; 1403 };
1404 1404
1405 intptr_t trace_len; 1405 intptr_t trace_len;
1406 Dart_Handle res = Dart_StackTraceLength(trace, &trace_len); 1406 Dart_Handle res = Dart_StackTraceLength(trace, &trace_len);
1407 EXPECT_VALID(res); 1407 EXPECT_VALID(res);
1408 EXPECT_EQ(kStackTraceLen, trace_len); 1408 EXPECT_EQ(kStackTraceLen, trace_len);
1409 1409
1410 // Frame 0 corresponding to "Object._noSuchMethod". 1410 // Frame 0 corresponding to "Object._noSuchMethod".
1411 Dart_Handle frame0_locals = Dart_NewList(10); 1411 Dart_Handle frame0_locals = Dart_NewList(12);
1412 Dart_ListSetAt(frame0_locals, 0, NewString("this")); 1412 Dart_ListSetAt(frame0_locals, 0, NewString("this"));
1413 Dart_ListSetAt(frame0_locals, 1, Dart_Null()); 1413 Dart_ListSetAt(frame0_locals, 1, Dart_Null());
1414 Dart_ListSetAt(frame0_locals, 2, NewString("isMethod")); 1414 Dart_ListSetAt(frame0_locals, 2, NewString("isMethod"));
1415 Dart_ListSetAt(frame0_locals, 3, Dart_Null()); 1415 Dart_ListSetAt(frame0_locals, 3, Dart_Null());
1416 Dart_ListSetAt(frame0_locals, 4, NewString("memberName")); 1416 Dart_ListSetAt(frame0_locals, 4, NewString("memberName"));
1417 Dart_ListSetAt(frame0_locals, 5, Dart_Null()); 1417 Dart_ListSetAt(frame0_locals, 5, Dart_Null());
1418 Dart_ListSetAt(frame0_locals, 6, NewString("arguments")); 1418 Dart_ListSetAt(frame0_locals, 6, NewString("type"));
1419 Dart_ListSetAt(frame0_locals, 7, Dart_Null()); 1419 Dart_ListSetAt(frame0_locals, 7, Dart_Null());
1420 Dart_ListSetAt(frame0_locals, 8, NewString("namedArguments")); 1420 Dart_ListSetAt(frame0_locals, 8, NewString("arguments"));
1421 Dart_ListSetAt(frame0_locals, 9, Dart_Null()); 1421 Dart_ListSetAt(frame0_locals, 9, Dart_Null());
1422 Dart_ListSetAt(frame0_locals, 10, NewString("namedArguments"));
1423 Dart_ListSetAt(frame0_locals, 11, Dart_Null());
1422 1424
1423 // Frame 1 corresponding to "Object.noSuchMethod". 1425 // Frame 1 corresponding to "Object.noSuchMethod".
1424 Dart_Handle frame1_locals = Dart_NewList(4); 1426 Dart_Handle frame1_locals = Dart_NewList(4);
1425 Dart_ListSetAt(frame1_locals, 0, NewString("this")); 1427 Dart_ListSetAt(frame1_locals, 0, NewString("this"));
1426 Dart_ListSetAt(frame1_locals, 1, Dart_Null()); 1428 Dart_ListSetAt(frame1_locals, 1, Dart_Null());
1427 Dart_ListSetAt(frame1_locals, 2, NewString("invocation")); 1429 Dart_ListSetAt(frame1_locals, 2, NewString("invocation"));
1428 Dart_ListSetAt(frame1_locals, 3, Dart_Null()); 1430 Dart_ListSetAt(frame1_locals, 3, Dart_Null());
1429 1431
1430 // Frame 2 corresponding to "Test.local1_to_func1". 1432 // Frame 2 corresponding to "Test.local1_to_func1".
1431 Dart_Handle frame2_locals = Dart_NewList(16); 1433 Dart_Handle frame2_locals = Dart_NewList(16);
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
1543 1545
1544 Dart_Handle retval = Invoke("main"); 1546 Dart_Handle retval = Invoke("main");
1545 EXPECT(Dart_IsError(retval)); 1547 EXPECT(Dart_IsError(retval));
1546 EXPECT(Dart_IsUnhandledExceptionError(retval)); 1548 EXPECT(Dart_IsUnhandledExceptionError(retval));
1547 EXPECT_EQ(1, breakpoint_hit_counter); 1549 EXPECT_EQ(1, breakpoint_hit_counter);
1548 } 1550 }
1549 1551
1550 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). 1552 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64).
1551 1553
1552 } // namespace dart 1554 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/dart_entry.cc ('k') | runtime/vm/exceptions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698