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

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

Issue 1561833006: Improve token position for the entry CheckStackoverflowInstr (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | runtime/vm/flow_graph_builder.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 "bin/builtin.h" 5 #include "bin/builtin.h"
6 #include "include/dart_api.h" 6 #include "include/dart_api.h"
7 #include "include/dart_mirrors_api.h" 7 #include "include/dart_mirrors_api.h"
8 #include "include/dart_native_api.h" 8 #include "include/dart_native_api.h"
9 #include "include/dart_tools_api.h" 9 #include "include/dart_tools_api.h"
10 #include "platform/assert.h" 10 #include "platform/assert.h"
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 result = Dart_GetActivationFrame(stacktrace, 0, &frame); 247 result = Dart_GetActivationFrame(stacktrace, 0, &frame);
248 EXPECT_VALID(result); 248 EXPECT_VALID(result);
249 result = Dart_ActivationFrameInfo( 249 result = Dart_ActivationFrameInfo(
250 frame, &function_name, &script_url, &line_number, &column_number); 250 frame, &function_name, &script_url, &line_number, &column_number);
251 EXPECT_VALID(result); 251 EXPECT_VALID(result);
252 Dart_StringToCString(function_name, &cstr); 252 Dart_StringToCString(function_name, &cstr);
253 EXPECT_STREQ("C.foo", cstr); 253 EXPECT_STREQ("C.foo", cstr);
254 Dart_StringToCString(script_url, &cstr); 254 Dart_StringToCString(script_url, &cstr);
255 EXPECT_STREQ("test-lib", cstr); 255 EXPECT_STREQ("test-lib", cstr);
256 EXPECT_EQ(2, line_number); 256 EXPECT_EQ(2, line_number);
257 EXPECT_EQ(3, column_number); 257 EXPECT_EQ(13, column_number);
258 258
259 // Out-of-bounds frames. 259 // Out-of-bounds frames.
260 result = Dart_GetActivationFrame(stacktrace, frame_count, &frame); 260 result = Dart_GetActivationFrame(stacktrace, frame_count, &frame);
261 EXPECT(Dart_IsError(result)); 261 EXPECT(Dart_IsError(result));
262 result = Dart_GetActivationFrame(stacktrace, -1, &frame); 262 result = Dart_GetActivationFrame(stacktrace, -1, &frame);
263 EXPECT(Dart_IsError(result)); 263 EXPECT(Dart_IsError(result));
264 } 264 }
265 265
266 266
267 TEST_CASE(OutOfMemoryStacktraceInfo) { 267 TEST_CASE(OutOfMemoryStacktraceInfo) {
(...skipping 9292 matching lines...) Expand 10 before | Expand all | Expand 10 after
9560 EXPECT_SUBSTRING("\"cat\":\"Compiler\"", buffer); 9560 EXPECT_SUBSTRING("\"cat\":\"Compiler\"", buffer);
9561 EXPECT_SUBSTRING("\"name\":\"CompileFunction\"", buffer); 9561 EXPECT_SUBSTRING("\"name\":\"CompileFunction\"", buffer);
9562 EXPECT_SUBSTRING("\"function\":\"::_main\"", buffer); 9562 EXPECT_SUBSTRING("\"function\":\"::_main\"", buffer);
9563 9563
9564 // Heartbeat test for new events. 9564 // Heartbeat test for new events.
9565 EXPECT_SUBSTRING("\"name\":\"TestVMDuration2\"", buffer); 9565 EXPECT_SUBSTRING("\"name\":\"TestVMDuration2\"", buffer);
9566 EXPECT_SUBSTRING("\"function\":\"::_bar\"", buffer); 9566 EXPECT_SUBSTRING("\"function\":\"::_bar\"", buffer);
9567 } 9567 }
9568 9568
9569 } // namespace dart 9569 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698