dart-sdk/pkg/vm_service/test/breakpoints_with_mixin_test.dart
Ben Konyi 76a74ba678 [ package:vm_service ] Migrate Observatory service tests to package:vm_service (Pt 1)
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>
2021-11-05 17:04:07 +00:00

63 lines
1.9 KiB
Dart

// Copyright (c) 2020, 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 "breakpoints_with_mixin_lib1.dart";
import "breakpoints_with_mixin_lib2.dart";
import "breakpoints_with_mixin_lib3.dart";
import 'common/service_test_common.dart';
import 'common/test_helper.dart';
const String testFilename = "breakpoints_with_mixin_test.dart";
const int testCodeLineStart = 17;
const String lib3Filename = "breakpoints_with_mixin_lib3.dart";
const int lib3Bp1 = 7;
const int lib3Bp2 = 13;
void code() {
Test1 test1 = Test1();
test1.foo();
Test2 test2 = Test2();
test2.foo();
Foo foo = Foo();
foo.foo();
Bar bar = Bar();
bar.bar();
test1.foo();
test2.foo();
foo.foo();
bar.bar();
}
List<String> stops = [];
List<String> expected = [
"$lib3Filename:$lib3Bp1:5 ($testFilename:${testCodeLineStart + 2}:9)",
"$lib3Filename:$lib3Bp1:5 ($testFilename:${testCodeLineStart + 4}:9)",
"$lib3Filename:$lib3Bp1:5 ($testFilename:${testCodeLineStart + 6}:7)",
"$lib3Filename:$lib3Bp2:5 ($testFilename:${testCodeLineStart + 8}:7)",
"$lib3Filename:$lib3Bp1:5 ($testFilename:${testCodeLineStart + 9}:9)",
"$lib3Filename:$lib3Bp1:5 ($testFilename:${testCodeLineStart + 10}:9)",
"$lib3Filename:$lib3Bp1:5 ($testFilename:${testCodeLineStart + 11}:7)",
"$lib3Filename:$lib3Bp2:5 ($testFilename:${testCodeLineStart + 12}:7)",
];
var tests = <IsolateTest>[
hasPausedAtStart,
setBreakpointAtUriAndLine(lib3Filename, lib3Bp1),
setBreakpointAtUriAndLine(lib3Filename, lib3Bp2),
resumeProgramRecordingStops(stops, true),
checkRecordedStops(stops, expected)
];
main(args) {
runIsolateTestsSynchronous(
args,
tests,
'breakpoints_with_mixin_test.dart',
testeeConcurrent: code,
pause_on_start: true,
pause_on_exit: true,
);
}