-
Notifications
You must be signed in to change notification settings - Fork 6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ VM / Service ] Allow for breakpoints to be set using either file: o…
…r package: URIs for packages. Additional minor changes: - Sorted list of Symbols in symbols.h by name - Added Symbol::PackageScheme() to symbol list Change-Id: I2f739bfb5c8cbbe1e318614124695ae45dee4f23 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98043 Reviewed-by: Ben Konyi <bkonyi@google.com> Commit-Queue: Ben Konyi <bkonyi@google.com>
- Loading branch information
Showing
6 changed files
with
466 additions
and
409 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
runtime/observatory/tests/service/breakpoint_in_package_parts_class_file_uri_test.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file | ||
// for details. All rights reserved. Use of this source code is governed by a | ||
// BSD-style license that can be found in the LICENSE file. | ||
|
||
library breakpoint_in_parts_class; | ||
|
||
import 'dart:io' show Platform; | ||
|
||
import 'package:observatory_test_package/has_part.dart' as hasPart; | ||
import 'package:path/path.dart' as path; | ||
import 'test_helper.dart'; | ||
import 'service_test_common.dart'; | ||
|
||
// Chop off the file name. | ||
String baseDirectory = | ||
path.dirname(Platform.script.path) + Platform.pathSeparator; | ||
Uri baseUri = Platform.script.replace(path: baseDirectory); | ||
Uri breakpointFile = baseUri.resolve('observatory_test_package/the_part.dart'); | ||
const String shortFile = "the_part.dart"; | ||
|
||
const int LINE = 87; | ||
|
||
code() { | ||
hasPart.main(); | ||
} | ||
|
||
List<String> stops = []; | ||
|
||
List<String> expected = [ | ||
"$shortFile:${LINE + 0}:5", // on 'print' | ||
"$shortFile:${LINE + 1}:3" // on class ending '}' | ||
]; | ||
|
||
var tests = <IsolateTest>[ | ||
hasPausedAtStart, | ||
setBreakpointAtUriAndLine(breakpointFile.toString(), LINE), | ||
runStepThroughProgramRecordingStops(stops), | ||
checkRecordedStops(stops, expected) | ||
]; | ||
|
||
main(args) { | ||
runIsolateTestsSynchronous(args, tests, | ||
testeeConcurrent: code, pause_on_start: true, pause_on_exit: true); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.