mirror of
https://github.com/dart-lang/sdk
synced 2024-09-15 23:39:48 +00:00
76a74ba678
See https://github.com/dart-lang/sdk/issues/45037 TEST=pkg/vm_service/test/* Change-Id: I20bfc03ae40bc41ee4d965a71f090ecf974e4e59 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185522 Commit-Queue: Ben Konyi <bkonyi@google.com> Reviewed-by: Siva Annamalai <asiva@google.com>
57 lines
1.2 KiB
Dart
57 lines
1.2 KiB
Dart
// 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 'common/service_test_common.dart';
|
|
import 'common/test_helper.dart';
|
|
|
|
const int LINE = 18;
|
|
const String file = "breakpoint_on_if_null_1_test.dart";
|
|
|
|
code() {
|
|
foo(42);
|
|
}
|
|
|
|
foo(dynamic args) {
|
|
if (args == null) {
|
|
print("was null");
|
|
}
|
|
if (args != null) {
|
|
print("was not null");
|
|
}
|
|
if (args == 42) {
|
|
print("was 42!");
|
|
}
|
|
}
|
|
|
|
List<String> stops = [];
|
|
|
|
List<String> expected = [
|
|
"$file:${LINE + 0}:12", // on '=='
|
|
"$file:${LINE + 3}:12", // on '!='
|
|
"$file:${LINE + 4}:5", // on 'print'
|
|
"$file:${LINE + 6}:12", // on '=='
|
|
"$file:${LINE + 7}:5", // on 'print'
|
|
"$file:${LINE + 9}:1", // on ending '}'
|
|
];
|
|
|
|
var tests = <IsolateTest>[
|
|
hasPausedAtStart,
|
|
setBreakpointAtUriAndLine(file, LINE),
|
|
runStepThroughProgramRecordingStops(stops),
|
|
checkRecordedStops(stops, expected)
|
|
];
|
|
|
|
main(args) {
|
|
runIsolateTestsSynchronous(
|
|
args,
|
|
tests,
|
|
'breakpoint_on_if_null_1_test.dart',
|
|
testeeConcurrent: code,
|
|
pause_on_start: true,
|
|
pause_on_exit: true,
|
|
);
|
|
}
|