Skip to content

Commit b218c92

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

File tree

6 files changed

+50
-84
lines changed

6 files changed

+50
-84
lines changed

dwds/test/instances/common/instance_common.dart

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,7 @@ void runTypeSystemVerificationTests({
7272
final remoteObject = await inspector.jsEvaluate(
7373
libraryVariableTypeExpression('libraryPublicFinal', compilationMode),
7474
);
75-
expect(
76-
remoteObject.json['className'],
77-
canaryFeatures || dartSdkIsAtLeast(newDdcTypeSystemVersion)
78-
? 'dart_rti.Rti.new'
79-
: 'Function',
80-
);
75+
expect(remoteObject.json['className'], 'dart_rti.Rti.new');
8176
});
8277
});
8378
});
@@ -243,7 +238,7 @@ void runTests({
243238
expect(classRef.name, '_ControllerStream<int>');
244239
expect(classRef.id, 'classes|dart:async|_ControllerStream<int>');
245240
expect(inspector.isDisplayableObject(ref), isTrue);
246-
}, skip: !dartSdkIsAtLeast('3.6.0-148.0.dev'));
241+
});
247242

248243
test(
249244
'for a Dart error',
@@ -431,7 +426,7 @@ void runTests({
431426
final classRef = instance.classRef!;
432427
expect(classRef.name, '_ControllerStream<int>');
433428
expect(inspector.isDisplayableObject(instance), isTrue);
434-
}, skip: !dartSdkIsAtLeast('3.6.0-148.0.dev'));
429+
});
435430

436431
test(
437432
'for a Dart error',

dwds/test/instances/common/patterns_inspection_common.dart

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -98,30 +98,15 @@ void runTests({
9898
await onBreakPoint('testPatternCase2', (event) async {
9999
final frame = event.topFrame!;
100100

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-
}
101+
expect(await getFrameVariables(frame), {
102+
'obj': matchListInstance(type: 'Object'),
103+
// Renamed to avoid shadowing variables from previous case.
104+
'a\$': matchPrimitiveInstance(kind: InstanceKind.kString, value: 'b'),
105+
'n\$': matchPrimitiveInstance(
106+
kind: InstanceKind.kDouble,
107+
value: 3.14,
108+
),
109+
});
125110
});
126111
});
127112

dwds/test/instances/common/record_type_inspection_common.dart

Lines changed: 30 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ void runTests({
126126
matchDisplayedTypeObjectGetters,
127127
);
128128
});
129-
}, skip: !dartSdkIsAtLeast('3.4.0-56.0.dev'));
129+
});
130130

131131
test('simple record type display', () async {
132132
await onBreakPoint('printSimpleLocalRecord', (event) async {
@@ -190,7 +190,7 @@ void runTests({
190190
matchDisplayedTypeObjectGetters,
191191
);
192192
});
193-
}, skip: !dartSdkIsAtLeast('3.4.0-56.0.dev'));
193+
});
194194

195195
test('complex record type display', () async {
196196
await onBreakPoint('printComplexLocalRecord', (event) async {
@@ -245,21 +245,17 @@ void runTests({
245245
});
246246
});
247247

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-
);
248+
test('complex record type with named fields getters', () async {
249+
await onBreakPoint('printComplexNamedLocalRecord', (event) async {
250+
final frame = event.topFrame!.index!;
251+
final instanceRef = await getInstanceRef(frame, 'record.runtimeType');
252+
253+
expect(
254+
await getDisplayedGetters(instanceRef),
255+
matchDisplayedTypeObjectGetters,
256+
);
257+
});
258+
});
263259

264260
test('complex record type with named fields display', () async {
265261
await onBreakPoint('printComplexNamedLocalRecord', (event) async {
@@ -332,7 +328,7 @@ void runTests({
332328
matchDisplayedTypeObjectGetters,
333329
);
334330
});
335-
}, skip: !dartSdkIsAtLeast('3.4.0-56.0.dev'));
331+
});
336332

337333
test('nested record type display', () async {
338334
await onBreakPoint('printNestedLocalRecord', (event) async {
@@ -392,26 +388,22 @@ void runTests({
392388
});
393389
});
394390

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-
);
391+
test('nested record type with named fields getters', () async {
392+
await onBreakPoint('printNestedNamedLocalRecord', (event) async {
393+
final frame = event.topFrame!.index!;
394+
final instanceRef = await getInstanceRef(frame, 'record.runtimeType');
395+
final elements = await getElements(instanceRef.id!);
396+
397+
expect(
398+
await getDisplayedGetters(instanceRef),
399+
matchDisplayedTypeObjectGetters,
400+
);
401+
expect(
402+
await getDisplayedGetters(elements[1]),
403+
matchDisplayedTypeObjectGetters,
404+
);
405+
});
406+
});
415407

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

dwds/test/instances/common/type_inspection_common.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ void runTests({
135135
matchDisplayedTypeObjectGetters,
136136
);
137137
});
138-
}, skip: !dartSdkIsAtLeast('3.4.0-56.0.dev'));
138+
});
139139

140140
test('int type', () async {
141141
await onBreakPoint('printSimpleLocalRecord', (event) async {
@@ -167,7 +167,7 @@ void runTests({
167167
matchDisplayedTypeObjectGetters,
168168
);
169169
});
170-
}, skip: !dartSdkIsAtLeast('3.4.0-56.0.dev'));
170+
});
171171

172172
test('list type', () async {
173173
await onBreakPoint('printSimpleLocalRecord', (event) async {
@@ -229,7 +229,7 @@ void runTests({
229229
matchDisplayedTypeObjectGetters,
230230
);
231231
});
232-
}, skip: !dartSdkIsAtLeast('3.4.0-56.0.dev'));
232+
});
233233

234234
test('set type', () async {
235235
await onBreakPoint('printSimpleLocalRecord', (event) async {
@@ -261,7 +261,7 @@ void runTests({
261261
matchDisplayedTypeObjectGetters,
262262
);
263263
});
264-
}, skip: !dartSdkIsAtLeast('3.4.0-56.0.dev'));
264+
});
265265

266266
test('record type', () async {
267267
await onBreakPoint('printSimpleLocalRecord', (event) async {
@@ -297,7 +297,7 @@ void runTests({
297297
matchDisplayedTypeObjectGetters,
298298
);
299299
});
300-
}, skip: !dartSdkIsAtLeast('3.4.0-56.0.dev'));
300+
});
301301

302302
test('class type', () async {
303303
await onBreakPoint('printSimpleLocalRecord', (event) async {
@@ -335,6 +335,6 @@ void runTests({
335335
matchDisplayedTypeObjectGetters,
336336
);
337337
});
338-
}, skip: !dartSdkIsAtLeast('3.4.0-56.0.dev'));
338+
});
339339
});
340340
}

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 & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -446,9 +446,7 @@ void main() {
446446
const TypeMatcher<InstanceRef>().having(
447447
(instance) => instance.classRef?.name,
448448
'class name',
449-
dartSdkIsAtLeast('3.3.0-242.0.dev')
450-
? 'JSArray<bool>'
451-
: 'List<bool>'));
449+
'JSArray<bool>'));
452450

453451
final instanceRef = result as InstanceRef;
454452
final list = await vmService.getObject(isolateId, instanceRef.id!);
@@ -457,9 +455,7 @@ void main() {
457455
const TypeMatcher<Instance>().having(
458456
(instance) => instance.classRef?.name,
459457
'class name',
460-
dartSdkIsAtLeast('3.3.0-242.0.dev')
461-
? 'JSArray<bool>'
462-
: 'List<bool>'));
458+
'JSArray<bool>'));
463459

464460
final elements = (list as Instance).elements;
465461
expect(elements, [

0 commit comments

Comments
 (0)