Skip to content

Commit 8042e95

Browse files
committed
Remove stale calls to dartSdkIsAtLeast.
1 parent 9724fea commit 8042e95

File tree

6 files changed

+50
-89
lines changed

6 files changed

+50
-89
lines changed

dwds/test/instances/common/instance_common.dart

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import 'package:dwds/src/debugging/inspector.dart';
88
import 'package:test/test.dart';
99
import 'package:test_common/logging.dart';
1010
import 'package:test_common/test_sdk_configuration.dart';
11-
import 'package:test_common/utilities.dart';
1211
import 'package:vm_service/vm_service.dart';
1312
import 'package:webkit_inspection_protocol/webkit_inspection_protocol.dart';
1413

@@ -72,12 +71,7 @@ void runTypeSystemVerificationTests({
7271
final remoteObject = await inspector.jsEvaluate(
7372
libraryVariableTypeExpression('libraryPublicFinal', compilationMode),
7473
);
75-
expect(
76-
remoteObject.json['className'],
77-
canaryFeatures || dartSdkIsAtLeast(newDdcTypeSystemVersion)
78-
? 'dart_rti.Rti.new'
79-
: 'Function',
80-
);
74+
expect(remoteObject.json['className'], 'dart_rti.Rti.new');
8175
});
8276
});
8377
});
@@ -243,7 +237,7 @@ void runTests({
243237
expect(classRef.name, '_ControllerStream<int>');
244238
expect(classRef.id, 'classes|dart:async|_ControllerStream<int>');
245239
expect(inspector.isDisplayableObject(ref), isTrue);
246-
}, skip: !dartSdkIsAtLeast('3.6.0-148.0.dev'));
240+
});
247241

248242
test(
249243
'for a Dart error',
@@ -431,7 +425,7 @@ void runTests({
431425
final classRef = instance.classRef!;
432426
expect(classRef.name, '_ControllerStream<int>');
433427
expect(inspector.isDisplayableObject(instance), isTrue);
434-
}, skip: !dartSdkIsAtLeast('3.6.0-148.0.dev'));
428+
});
435429

436430
test(
437431
'for a Dart error',

dwds/test/instances/common/patterns_inspection_common.dart

Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import 'package:test/test.dart';
66
import 'package:test_common/logging.dart';
77
import 'package:test_common/test_sdk_configuration.dart';
8-
import 'package:test_common/utilities.dart';
98
import 'package:vm_service/vm_service.dart';
109

1110
import '../../fixtures/context.dart';
@@ -98,30 +97,15 @@ void runTests({
9897
await onBreakPoint('testPatternCase2', (event) async {
9998
final frame = event.topFrame!;
10099

101-
if (dartSdkIsAtLeast('3.7.0-246.0.dev')) {
102-
expect(await getFrameVariables(frame), {
103-
'obj': matchListInstance(type: 'Object'),
104-
// Renamed to avoid shadowing variables from previous case.
105-
'a\$': matchPrimitiveInstance(
106-
kind: InstanceKind.kString,
107-
value: 'b',
108-
),
109-
'n\$': matchPrimitiveInstance(
110-
kind: InstanceKind.kDouble,
111-
value: 3.14,
112-
),
113-
});
114-
} else {
115-
expect(await getFrameVariables(frame), {
116-
'obj': matchListInstance(type: 'Object'),
117-
// Renamed to avoid shadowing variables from previous case.
118-
'a': matchPrimitiveInstance(kind: InstanceKind.kString, value: 'b'),
119-
'n': matchPrimitiveInstance(
120-
kind: InstanceKind.kDouble,
121-
value: 3.14,
122-
),
123-
});
124-
}
100+
expect(await getFrameVariables(frame), {
101+
'obj': matchListInstance(type: 'Object'),
102+
// Renamed to avoid shadowing variables from previous case.
103+
'a\$': matchPrimitiveInstance(kind: InstanceKind.kString, value: 'b'),
104+
'n\$': matchPrimitiveInstance(
105+
kind: InstanceKind.kDouble,
106+
value: 3.14,
107+
),
108+
});
125109
});
126110
});
127111

dwds/test/instances/common/record_type_inspection_common.dart

Lines changed: 30 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import 'package:test/test.dart';
66
import 'package:test_common/logging.dart';
77
import 'package:test_common/test_sdk_configuration.dart';
8-
import 'package:test_common/utilities.dart';
98
import 'package:vm_service/vm_service.dart';
109

1110
import '../../fixtures/context.dart';
@@ -126,7 +125,7 @@ void runTests({
126125
matchDisplayedTypeObjectGetters,
127126
);
128127
});
129-
}, skip: !dartSdkIsAtLeast('3.4.0-56.0.dev'));
128+
});
130129

131130
test('simple record type display', () async {
132131
await onBreakPoint('printSimpleLocalRecord', (event) async {
@@ -190,7 +189,7 @@ void runTests({
190189
matchDisplayedTypeObjectGetters,
191190
);
192191
});
193-
}, skip: !dartSdkIsAtLeast('3.4.0-56.0.dev'));
192+
});
194193

195194
test('complex record type display', () async {
196195
await onBreakPoint('printComplexLocalRecord', (event) async {
@@ -245,21 +244,17 @@ void runTests({
245244
});
246245
});
247246

248-
test(
249-
'complex record type with named fields getters',
250-
() async {
251-
await onBreakPoint('printComplexNamedLocalRecord', (event) async {
252-
final frame = event.topFrame!.index!;
253-
final instanceRef = await getInstanceRef(frame, 'record.runtimeType');
254-
255-
expect(
256-
await getDisplayedGetters(instanceRef),
257-
matchDisplayedTypeObjectGetters,
258-
);
259-
});
260-
},
261-
skip: !dartSdkIsAtLeast('3.4.0-56.0.dev'),
262-
);
247+
test('complex record type with named fields getters', () async {
248+
await onBreakPoint('printComplexNamedLocalRecord', (event) async {
249+
final frame = event.topFrame!.index!;
250+
final instanceRef = await getInstanceRef(frame, 'record.runtimeType');
251+
252+
expect(
253+
await getDisplayedGetters(instanceRef),
254+
matchDisplayedTypeObjectGetters,
255+
);
256+
});
257+
});
263258

264259
test('complex record type with named fields display', () async {
265260
await onBreakPoint('printComplexNamedLocalRecord', (event) async {
@@ -332,7 +327,7 @@ void runTests({
332327
matchDisplayedTypeObjectGetters,
333328
);
334329
});
335-
}, skip: !dartSdkIsAtLeast('3.4.0-56.0.dev'));
330+
});
336331

337332
test('nested record type display', () async {
338333
await onBreakPoint('printNestedLocalRecord', (event) async {
@@ -392,26 +387,22 @@ void runTests({
392387
});
393388
});
394389

395-
test(
396-
'nested record type with named fields getters',
397-
() async {
398-
await onBreakPoint('printNestedNamedLocalRecord', (event) async {
399-
final frame = event.topFrame!.index!;
400-
final instanceRef = await getInstanceRef(frame, 'record.runtimeType');
401-
final elements = await getElements(instanceRef.id!);
402-
403-
expect(
404-
await getDisplayedGetters(instanceRef),
405-
matchDisplayedTypeObjectGetters,
406-
);
407-
expect(
408-
await getDisplayedGetters(elements[1]),
409-
matchDisplayedTypeObjectGetters,
410-
);
411-
});
412-
},
413-
skip: !dartSdkIsAtLeast('3.4.0-56.0.dev'),
414-
);
390+
test('nested record type with named fields getters', () async {
391+
await onBreakPoint('printNestedNamedLocalRecord', (event) async {
392+
final frame = event.topFrame!.index!;
393+
final instanceRef = await getInstanceRef(frame, 'record.runtimeType');
394+
final elements = await getElements(instanceRef.id!);
395+
396+
expect(
397+
await getDisplayedGetters(instanceRef),
398+
matchDisplayedTypeObjectGetters,
399+
);
400+
expect(
401+
await getDisplayedGetters(elements[1]),
402+
matchDisplayedTypeObjectGetters,
403+
);
404+
});
405+
});
415406

416407
test('nested record type with named fields display', () async {
417408
await onBreakPoint('printNestedNamedLocalRecord', (event) async {

dwds/test/instances/common/type_inspection_common.dart

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import 'package:test/test.dart';
66
import 'package:test_common/logging.dart';
77
import 'package:test_common/test_sdk_configuration.dart';
8-
import 'package:test_common/utilities.dart';
98
import 'package:vm_service/vm_service.dart';
109

1110
import '../../fixtures/context.dart';
@@ -135,7 +134,7 @@ void runTests({
135134
matchDisplayedTypeObjectGetters,
136135
);
137136
});
138-
}, skip: !dartSdkIsAtLeast('3.4.0-56.0.dev'));
137+
});
139138

140139
test('int type', () async {
141140
await onBreakPoint('printSimpleLocalRecord', (event) async {
@@ -167,7 +166,7 @@ void runTests({
167166
matchDisplayedTypeObjectGetters,
168167
);
169168
});
170-
}, skip: !dartSdkIsAtLeast('3.4.0-56.0.dev'));
169+
});
171170

172171
test('list type', () async {
173172
await onBreakPoint('printSimpleLocalRecord', (event) async {
@@ -229,7 +228,7 @@ void runTests({
229228
matchDisplayedTypeObjectGetters,
230229
);
231230
});
232-
}, skip: !dartSdkIsAtLeast('3.4.0-56.0.dev'));
231+
});
233232

234233
test('set type', () async {
235234
await onBreakPoint('printSimpleLocalRecord', (event) async {
@@ -261,7 +260,7 @@ void runTests({
261260
matchDisplayedTypeObjectGetters,
262261
);
263262
});
264-
}, skip: !dartSdkIsAtLeast('3.4.0-56.0.dev'));
263+
});
265264

266265
test('record type', () async {
267266
await onBreakPoint('printSimpleLocalRecord', (event) async {
@@ -297,7 +296,7 @@ void runTests({
297296
matchDisplayedTypeObjectGetters,
298297
);
299298
});
300-
}, skip: !dartSdkIsAtLeast('3.4.0-56.0.dev'));
299+
});
301300

302301
test('class type', () async {
303302
await onBreakPoint('printSimpleLocalRecord', (event) async {
@@ -335,6 +334,6 @@ void runTests({
335334
matchDisplayedTypeObjectGetters,
336335
);
337336
});
338-
}, skip: !dartSdkIsAtLeast('3.4.0-56.0.dev'));
337+
});
339338
});
340339
}

test_common/lib/utilities.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ const webdevDirName = 'webdev';
1010
const dwdsDirName = 'dwds';
1111
const fixturesDirName = 'fixtures';
1212

13-
const newDdcTypeSystemVersion = '3.3.0-242.0.dev';
14-
1513
/// The path to the webdev directory in the local machine, e.g.
1614
/// '/workstation/webdev'.
1715
String get webdevPath {

webdev/test/e2e_test.dart

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import 'package:logging/logging.dart';
1313
import 'package:path/path.dart' as p;
1414
import 'package:pub_semver/pub_semver.dart';
1515
import 'package:test/test.dart';
16-
import 'package:test_common/utilities.dart';
1716
import 'package:test_descriptor/test_descriptor.dart' as d;
1817
import 'package:test_process/test_process.dart';
1918
import 'package:vm_service/vm_service.dart';
@@ -446,9 +445,7 @@ void main() {
446445
const TypeMatcher<InstanceRef>().having(
447446
(instance) => instance.classRef?.name,
448447
'class name',
449-
dartSdkIsAtLeast('3.3.0-242.0.dev')
450-
? 'JSArray<bool>'
451-
: 'List<bool>'));
448+
'JSArray<bool>'));
452449

453450
final instanceRef = result as InstanceRef;
454451
final list = await vmService.getObject(isolateId, instanceRef.id!);
@@ -457,9 +454,7 @@ void main() {
457454
const TypeMatcher<Instance>().having(
458455
(instance) => instance.classRef?.name,
459456
'class name',
460-
dartSdkIsAtLeast('3.3.0-242.0.dev')
461-
? 'JSArray<bool>'
462-
: 'List<bool>'));
457+
'JSArray<bool>'));
463458

464459
final elements = (list as Instance).elements;
465460
expect(elements, [

0 commit comments

Comments
 (0)