dart-sdk/pkg/vm_service/test/column_breakpoint_test.dart
Derek Xu 0ba8d4ef77 [VM/Debugger] Fix the behaviour of setting inline breakpoints in uncompiled functions
TEST=pkg/vm_service/test/column_breakpoint_test.dart, other debugger
tests in tryjobs

Fixes: https://github.com/dart-lang/sdk/issues/51563
Change-Id: I87ef7e52cfc7e922904b267b7eb74fc783214b44
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316440
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2023-07-26 17:15:36 +00:00

43 lines
1.1 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.
import 'common/service_test_common.dart';
import 'common/test_helper.dart';
void testMain() {
var b = [1, 2].map((i) => i == 0).toList();
print(b.length);
}
const int LINE = 9;
const int COLUMN = 29;
const String shortFile = "column_breakpoint_test.dart";
List<String> stops = [];
const List<String> expected = [
"$shortFile:${LINE + 0}:29", // on 'i == 0'
"$shortFile:${LINE + 0}:29", // iterate twice
"$shortFile:${LINE + 1}:11" //on 'b.length'
];
final tests = <IsolateTest>[
hasPausedAtStart,
setBreakpointAtLineColumn(LINE, COLUMN), // on 'i == 0'
setBreakpointAtLineColumn(LINE + 1, 9), // on 'b.length'
resumeProgramRecordingStops(stops, false),
checkRecordedStops(stops, expected),
];
main(args) {
runIsolateTestsSynchronous(
args,
tests,
'column_breakpoint_test.dart',
testeeConcurrent: testMain,
pause_on_start: true,
pause_on_exit: true,
);
}