mirror of
https://github.com/dart-lang/sdk
synced 2024-09-15 21:50:11 +00:00
3fc0bf7e59
Remove them from tests. (They should have been removed from tests before launcing 2.17.) Change-Id: I546f6cb90fdf9e6ed1bb560f3715f9db163b7c68 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250384 Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com> Reviewed-by: Devon Carew <devoncarew@google.com> Commit-Queue: Lasse Nielsen <lrn@google.com>
108 lines
2 KiB
Dart
108 lines
2 KiB
Dart
// Copyright (c) 2022, 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.
|
|
|
|
// @dart=2.17
|
|
|
|
import 'common/service_test_common.dart';
|
|
import 'common/test_helper.dart';
|
|
|
|
const int LINE_A = 21;
|
|
const int LINE_B = LINE_A + 11;
|
|
const int LINE_C = LINE_B + 4;
|
|
const int LINE_D = LINE_C + 4;
|
|
const int LINE_E = LINE_D + 5;
|
|
const int LINE_F = LINE_E + 4;
|
|
const int LINE_G = LINE_F + 5;
|
|
const int LINE_H = LINE_G + 4;
|
|
|
|
mixin M on Object {
|
|
int mixedInMethod() {
|
|
print('mixedInMethod'); // LINE_A
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
enum E with M {
|
|
e1,
|
|
e2,
|
|
e3;
|
|
|
|
void instanceMethod() {
|
|
print('instanceMethod'); // LINE_B
|
|
}
|
|
|
|
static void staticMethod() {
|
|
print('staticMethod'); // LINE_C
|
|
}
|
|
|
|
int get getter {
|
|
print('getter'); // LINE_D
|
|
return 0;
|
|
}
|
|
|
|
set setter(int x) {
|
|
print('setter'); // LINE_E
|
|
}
|
|
|
|
static int get staticGetter {
|
|
print('staticGetter'); // LINE_F
|
|
return 0;
|
|
}
|
|
|
|
static set staticSetter(int x) {
|
|
print('staticSetter'); // LINE_G
|
|
}
|
|
|
|
String toString() {
|
|
print('overridden toString'); // LINE_H
|
|
return '';
|
|
}
|
|
}
|
|
|
|
void testMain() {
|
|
E.staticMethod();
|
|
E.staticGetter;
|
|
E.staticSetter = 42;
|
|
final e = E.e1;
|
|
e.mixedInMethod();
|
|
e.instanceMethod();
|
|
e.getter;
|
|
e.setter = 42;
|
|
e.toString();
|
|
}
|
|
|
|
const lines = <int>[
|
|
LINE_C,
|
|
LINE_F,
|
|
LINE_G,
|
|
LINE_A,
|
|
LINE_B,
|
|
LINE_D,
|
|
LINE_E,
|
|
LINE_H,
|
|
];
|
|
|
|
const fileName = 'breakpoint_in_enhanced_enums_test.dart';
|
|
final expected = <String>[
|
|
for (final line in lines) '$fileName:$line:5',
|
|
];
|
|
|
|
final stops = <String>[];
|
|
|
|
final tests = <IsolateTest>[
|
|
hasPausedAtStart,
|
|
for (final line in lines) setBreakpointAtLine(line),
|
|
resumeProgramRecordingStops(stops, false),
|
|
checkRecordedStops(stops, expected),
|
|
];
|
|
|
|
main([args = const <String>[]]) => runIsolateTests(
|
|
args,
|
|
tests,
|
|
fileName,
|
|
testeeConcurrent: testMain,
|
|
pause_on_start: true,
|
|
pause_on_exit: true,
|
|
);
|