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

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

Issue 1018373002: Re-enable and adjust skipped VM debugger tests. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 9 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/tests/vm/vm.status ('k') | no next file » | 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 "include/dart_mirrors_api.h" 6 #include "include/dart_mirrors_api.h"
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/dart_api_impl.h" 8 #include "vm/dart_api_impl.h"
9 #include "vm/lockers.h" 9 #include "vm/lockers.h"
10 #include "vm/unit_test.h" 10 #include "vm/unit_test.h"
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 EXPECT(Dart_IsString(func_name)); 246 EXPECT(Dart_IsString(func_name));
247 const char* func_name_chars; 247 const char* func_name_chars;
248 Dart_StringToCString(func_name, &func_name_chars); 248 Dart_StringToCString(func_name, &func_name_chars);
249 if (expected_name != NULL) { 249 if (expected_name != NULL) {
250 EXPECT_SUBSTRING(expected_name, func_name_chars); 250 EXPECT_SUBSTRING(expected_name, func_name_chars);
251 } 251 }
252 EXPECT(Dart_IsFunction(func)); 252 EXPECT(Dart_IsFunction(func));
253 const char* func_name_chars_from_func_handle; 253 const char* func_name_chars_from_func_handle;
254 Dart_StringToCString(Dart_FunctionName(func), 254 Dart_StringToCString(Dart_FunctionName(func),
255 &func_name_chars_from_func_handle); 255 &func_name_chars_from_func_handle);
256 EXPECT_STREQ(func_name_chars, func_name_chars_from_func_handle); 256 EXPECT_SUBSTRING(func_name_chars_from_func_handle, func_name_chars);
257 257
258 if (!Dart_IsNull(expected_locals)) { 258 if (!Dart_IsNull(expected_locals)) {
259 Dart_Handle locals = Dart_GetLocalVariables(frame); 259 Dart_Handle locals = Dart_GetLocalVariables(frame);
260 EXPECT_VALID(locals); 260 EXPECT_VALID(locals);
261 VerifyListEquals(expected_locals, locals, skip_null_expects); 261 VerifyListEquals(expected_locals, locals, skip_null_expects);
262 } 262 }
263 } 263 }
264 264
265 265
266 static void VerifyStackTrace(Dart_StackTrace trace, 266 static void VerifyStackTrace(Dart_StackTrace trace,
(...skipping 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after
1565 Dart_ListSetAt(frame0_locals, 0, NewString("i")); 1565 Dart_ListSetAt(frame0_locals, 0, NewString("i"));
1566 Dart_ListSetAt(frame0_locals, 1, Dart_NewInteger(76)); 1566 Dart_ListSetAt(frame0_locals, 1, Dart_NewInteger(76));
1567 Dart_ListSetAt(frame0_locals, 2, NewString("j")); 1567 Dart_ListSetAt(frame0_locals, 2, NewString("j"));
1568 Dart_ListSetAt(frame0_locals, 3, Dart_NewInteger(119)); 1568 Dart_ListSetAt(frame0_locals, 3, Dart_NewInteger(119));
1569 Dart_ListSetAt(frame0_locals, 4, NewString("k")); 1569 Dart_ListSetAt(frame0_locals, 4, NewString("k"));
1570 Dart_ListSetAt(frame0_locals, 5, Dart_NewInteger(66)); 1570 Dart_ListSetAt(frame0_locals, 5, Dart_NewInteger(66));
1571 Dart_ListSetAt(frame0_locals, 6, NewString("l")); 1571 Dart_ListSetAt(frame0_locals, 6, NewString("l"));
1572 Dart_ListSetAt(frame0_locals, 7, Dart_NewInteger(99)); 1572 Dart_ListSetAt(frame0_locals, 7, Dart_NewInteger(99));
1573 1573
1574 // Frame 1 corresponding to "Test.local1_to_func1". 1574 // Frame 1 corresponding to "Test.local1_to_func1".
1575 Dart_Handle frame1_locals = Dart_NewList(14); 1575 Dart_Handle frame1_locals = Dart_NewList(12);
1576 Dart_ListSetAt(frame1_locals, 0, NewString("i")); 1576 Dart_ListSetAt(frame1_locals, 0, NewString("i"));
1577 Dart_ListSetAt(frame1_locals, 1, Dart_NewInteger(11)); 1577 Dart_ListSetAt(frame1_locals, 1, Dart_NewInteger(11));
1578 Dart_ListSetAt(frame1_locals, 2, NewString("j")); 1578 Dart_ListSetAt(frame1_locals, 2, NewString("j"));
1579 Dart_ListSetAt(frame1_locals, 3, Dart_NewInteger(22)); 1579 Dart_ListSetAt(frame1_locals, 3, Dart_NewInteger(22));
1580 Dart_ListSetAt(frame1_locals, 4, NewString("k")); 1580 Dart_ListSetAt(frame1_locals, 4, NewString("k"));
1581 Dart_ListSetAt(frame1_locals, 5, Dart_NewInteger(33)); 1581 Dart_ListSetAt(frame1_locals, 5, Dart_NewInteger(33));
1582 Dart_ListSetAt(frame1_locals, 6, NewString("l")); 1582 Dart_ListSetAt(frame1_locals, 6, NewString("l"));
1583 Dart_ListSetAt(frame1_locals, 7, Dart_NewInteger(44)); 1583 Dart_ListSetAt(frame1_locals, 7, Dart_NewInteger(44));
1584 Dart_ListSetAt(frame1_locals, 8, NewString("m")); 1584 Dart_ListSetAt(frame1_locals, 8, NewString("m"));
1585 Dart_ListSetAt(frame1_locals, 9, Dart_NewInteger(55)); 1585 Dart_ListSetAt(frame1_locals, 9, Dart_NewInteger(55));
1586 Dart_ListSetAt(frame1_locals, 10, NewString("func")); 1586 Dart_ListSetAt(frame1_locals, 10, NewString("func"));
1587 Dart_ListSetAt(frame1_locals, 11, Dart_Null()); 1587 Dart_ListSetAt(frame1_locals, 11, Dart_Null());
1588 Dart_ListSetAt(frame1_locals, 12, NewString("n"));
1589 Dart_ListSetAt(frame1_locals, 13, Dart_Null());
1590 1588
1591 // Frame 2 corresponding to "Test.func1". 1589 // Frame 2 corresponding to "Test.func1".
1592 Dart_Handle frame2_locals = Dart_NewList(18); 1590 Dart_Handle frame2_locals = Dart_NewList(18);
1593 Dart_ListSetAt(frame2_locals, 0, NewString("this")); 1591 Dart_ListSetAt(frame2_locals, 0, NewString("this"));
1594 Dart_ListSetAt(frame2_locals, 1, Dart_Null()); 1592 Dart_ListSetAt(frame2_locals, 1, Dart_Null());
1595 Dart_ListSetAt(frame2_locals, 2, NewString("func")); 1593 Dart_ListSetAt(frame2_locals, 2, NewString("func"));
1596 Dart_ListSetAt(frame2_locals, 3, Dart_Null()); 1594 Dart_ListSetAt(frame2_locals, 3, Dart_Null());
1597 Dart_ListSetAt(frame2_locals, 4, NewString("i")); 1595 Dart_ListSetAt(frame2_locals, 4, NewString("i"));
1598 Dart_ListSetAt(frame2_locals, 5, Dart_NewInteger(11)); 1596 Dart_ListSetAt(frame2_locals, 5, Dart_NewInteger(11));
1599 Dart_ListSetAt(frame2_locals, 6, NewString("j")); 1597 Dart_ListSetAt(frame2_locals, 6, NewString("j"));
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
1733 Dart_ListSetAt(frame0_locals, 11, Dart_Null()); 1731 Dart_ListSetAt(frame0_locals, 11, Dart_Null());
1734 1732
1735 // Frame 1 corresponding to "Object.noSuchMethod". 1733 // Frame 1 corresponding to "Object.noSuchMethod".
1736 Dart_Handle frame1_locals = Dart_NewList(4); 1734 Dart_Handle frame1_locals = Dart_NewList(4);
1737 Dart_ListSetAt(frame1_locals, 0, NewString("this")); 1735 Dart_ListSetAt(frame1_locals, 0, NewString("this"));
1738 Dart_ListSetAt(frame1_locals, 1, Dart_Null()); 1736 Dart_ListSetAt(frame1_locals, 1, Dart_Null());
1739 Dart_ListSetAt(frame1_locals, 2, NewString("invocation")); 1737 Dart_ListSetAt(frame1_locals, 2, NewString("invocation"));
1740 Dart_ListSetAt(frame1_locals, 3, Dart_Null()); 1738 Dart_ListSetAt(frame1_locals, 3, Dart_Null());
1741 1739
1742 // Frame 2 corresponding to "Test.local1_to_func1". 1740 // Frame 2 corresponding to "Test.local1_to_func1".
1743 Dart_Handle frame2_locals = Dart_NewList(16); 1741 Dart_Handle frame2_locals = Dart_NewList(14);
1744 Dart_ListSetAt(frame2_locals, 0, NewString("i")); 1742 Dart_ListSetAt(frame2_locals, 0, NewString("i"));
1745 Dart_ListSetAt(frame2_locals, 1, Dart_NewInteger(11)); 1743 Dart_ListSetAt(frame2_locals, 1, Dart_NewInteger(11));
1746 Dart_ListSetAt(frame2_locals, 2, NewString("j")); 1744 Dart_ListSetAt(frame2_locals, 2, NewString("j"));
1747 Dart_ListSetAt(frame2_locals, 3, Dart_NewInteger(22)); 1745 Dart_ListSetAt(frame2_locals, 3, Dart_NewInteger(22));
1748 Dart_ListSetAt(frame2_locals, 4, NewString("k")); 1746 Dart_ListSetAt(frame2_locals, 4, NewString("k"));
1749 Dart_ListSetAt(frame2_locals, 5, Dart_NewInteger(33)); 1747 Dart_ListSetAt(frame2_locals, 5, Dart_NewInteger(33));
1750 Dart_ListSetAt(frame2_locals, 6, NewString("l")); 1748 Dart_ListSetAt(frame2_locals, 6, NewString("l"));
1751 Dart_ListSetAt(frame2_locals, 7, Dart_NewInteger(44)); 1749 Dart_ListSetAt(frame2_locals, 7, Dart_NewInteger(44));
1752 Dart_ListSetAt(frame2_locals, 8, NewString("m")); 1750 Dart_ListSetAt(frame2_locals, 8, NewString("m"));
1753 Dart_ListSetAt(frame2_locals, 9, Dart_NewInteger(55)); 1751 Dart_ListSetAt(frame2_locals, 9, Dart_NewInteger(55));
1754 Dart_ListSetAt(frame2_locals, 10, NewString("this")); 1752 Dart_ListSetAt(frame2_locals, 10, NewString("this"));
1755 Dart_ListSetAt(frame2_locals, 11, Dart_Null()); 1753 Dart_ListSetAt(frame2_locals, 11, Dart_Null());
1756 Dart_ListSetAt(frame2_locals, 12, NewString("func")); 1754 Dart_ListSetAt(frame2_locals, 12, NewString("func"));
1757 Dart_ListSetAt(frame2_locals, 13, Dart_Null()); 1755 Dart_ListSetAt(frame2_locals, 13, Dart_Null());
1758 Dart_ListSetAt(frame2_locals, 14, NewString("n"));
1759 Dart_ListSetAt(frame2_locals, 15, Dart_Null());
1760 1756
1761 // Frame 3 corresponding to "Test.func1". 1757 // Frame 3 corresponding to "Test.func1".
1762 Dart_Handle frame3_locals = Dart_NewList(18); 1758 Dart_Handle frame3_locals = Dart_NewList(18);
1763 Dart_ListSetAt(frame3_locals, 0, NewString("this")); 1759 Dart_ListSetAt(frame3_locals, 0, NewString("this"));
1764 Dart_ListSetAt(frame3_locals, 1, Dart_Null()); 1760 Dart_ListSetAt(frame3_locals, 1, Dart_Null());
1765 Dart_ListSetAt(frame3_locals, 2, NewString("func")); 1761 Dart_ListSetAt(frame3_locals, 2, NewString("func"));
1766 Dart_ListSetAt(frame3_locals, 3, Dart_Null()); 1762 Dart_ListSetAt(frame3_locals, 3, Dart_Null());
1767 Dart_ListSetAt(frame3_locals, 4, NewString("i")); 1763 Dart_ListSetAt(frame3_locals, 4, NewString("i"));
1768 Dart_ListSetAt(frame3_locals, 5, Dart_NewInteger(11)); 1764 Dart_ListSetAt(frame3_locals, 5, Dart_NewInteger(11));
1769 Dart_ListSetAt(frame3_locals, 6, NewString("j")); 1765 Dart_ListSetAt(frame3_locals, 6, NewString("j"));
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
2313 " null, 3, 7, 1, 8, 6, 9, 10, 10, 11, 11, 13," 2309 " null, 3, 7, 1, 8, 6, 9, 10, 10, 11, 11, 13,"
2314 " null, 4, 13, 3, 14, 10," 2310 " null, 4, 13, 3, 14, 10,"
2315 " null, 5, 17, 5, 18, 9, 19, 12," 2311 " null, 5, 17, 5, 18, 9, 19, 12,"
2316 " null, 6, 21, 1," 2312 " null, 6, 21, 1,"
2317 " null, 8, 24, 1, 25, 5, 26, 6, 27, 8," 2313 " null, 8, 24, 1, 25, 5, 26, 6, 27, 8,"
2318 " null, 9, 29, 1]", 2314 " null, 9, 29, 1]",
2319 tokens_cstr); 2315 tokens_cstr);
2320 } 2316 }
2321 2317
2322 } // namespace dart 2318 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/tests/vm/vm.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698