Skip to content

Commit 2563295

Browse files
committed
Revert "Fix test cases failing with latest Dart SDK (dart-lang#2312)"
This reverts commit 2ef79f1.
1 parent 04abb18 commit 2563295

File tree

6 files changed

+6
-49
lines changed

6 files changed

+6
-49
lines changed

dwds/test/inspector_test.dart

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import 'package:dwds/src/utilities/conversions.dart';
1111
import 'package:dwds/src/utilities/globals.dart';
1212
import 'package:test/test.dart';
1313
import 'package:test_common/test_sdk_configuration.dart';
14-
import 'package:test_common/utilities.dart';
1514
import 'package:vm_service/vm_service.dart';
1615
import 'package:webkit_inspection_protocol/webkit_inspection_protocol.dart';
1716

@@ -161,10 +160,6 @@ void main() {
161160
final names =
162161
properties.map((p) => p.name).where((x) => x != '__proto__').toList();
163162
final expected = [
164-
if (dartSdkIsAtLeast(
165-
newDdcTypeSystemVersion,
166-
))
167-
'\$ti',
168163
'_privateField',
169164
'abstractField',
170165
'closure',

dwds/test/instances/common/instance_common.dart

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import 'package:dwds/src/utilities/globals.dart';
77
import 'package:test/test.dart';
88
import 'package:test_common/logging.dart';
99
import 'package:test_common/test_sdk_configuration.dart';
10-
import 'package:test_common/utilities.dart';
1110
import 'package:vm_service/vm_service.dart';
1211
import 'package:webkit_inspection_protocol/webkit_inspection_protocol.dart';
1312

@@ -74,12 +73,7 @@ void runTypeSystemVerificationTests({
7473
);
7574
expect(
7675
remoteObject.json['className'],
77-
canaryFeatures ||
78-
dartSdkIsAtLeast(
79-
newDdcTypeSystemVersion,
80-
)
81-
? 'dart_rti.Rti.new'
82-
: 'Function',
76+
canaryFeatures ? 'dart_rti.Rti.new' : 'Function',
8377
);
8478
});
8579
});

dwds/test/variable_scope_test.dart

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import 'package:dwds/src/services/chrome_proxy_service.dart';
99
import 'package:test/test.dart';
1010
import 'package:test_common/logging.dart';
1111
import 'package:test_common/test_sdk_configuration.dart';
12-
import 'package:test_common/utilities.dart';
1312
import 'package:vm_service/vm_service.dart';
1413

1514
import 'fixtures/context.dart';
@@ -204,18 +203,7 @@ void main() {
204203
final variableNames = variables.keys.toList()..sort();
205204
expect(
206205
variableNames,
207-
[
208-
// TODO(https://github.com/dart-lang/webdev/issues/2316): Make sure T
209-
// doesn't show up here.
210-
if (dartSdkIsAtLeast(
211-
newDdcTypeSystemVersion,
212-
))
213-
'T',
214-
'closureLocalInsideMethod',
215-
'local',
216-
'parameter',
217-
'this',
218-
],
206+
['closureLocalInsideMethod', 'local', 'parameter', 'this'],
219207
);
220208
});
221209

@@ -225,15 +213,7 @@ void main() {
225213
await expectDartVariables(variables);
226214

227215
final variableNames = variables.keys.toList()..sort();
228-
expect(variableNames, [
229-
// TODO(https://github.com/dart-lang/webdev/issues/2316): Make sure T
230-
// doesn't show up here.
231-
if (dartSdkIsAtLeast(
232-
newDdcTypeSystemVersion,
233-
))
234-
'T',
235-
'this',
236-
]);
216+
expect(variableNames, ['this']);
237217
});
238218

239219
test('variables in extension method', () async {

frontend_server_client/test/frontend_sever_client_test.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,7 @@ String get message => p.join('hello', 'world');
111111

112112
expect(await stdoutLines.next, p.join('goodbye', 'world'));
113113
expect(await process.exitCode, 0);
114-
// TODO(https://github.com/dart-lang/webdev/issues/2315): Fix and re-enable.
115-
}, skip: true);
114+
});
116115

117116
test('can handle compile errors and reload fixes', () async {
118117
var entrypoint = p.join(packageRoot, 'bin', 'main.dart');
@@ -175,8 +174,7 @@ String get message => p.join('hello', 'world');
175174

176175
expect(await stdoutLines.next, p.join('goodbye', 'world'));
177176
expect(await process.exitCode, 0);
178-
// TODO(https://github.com/dart-lang/webdev/issues/2315): Fix and re-enable.
179-
}, skip: true);
177+
});
180178

181179
test('can compile and recompile a dartdevc app', () async {
182180
var entrypoint =

test_common/lib/utilities.dart

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
4-
import 'dart:io';
54

65
import 'package:path/path.dart' as p;
7-
import 'package:pub_semver/pub_semver.dart';
86

97
const webdevDirName = 'webdev';
108
const dwdsDirName = 'dwds';
119
const fixturesDirName = 'fixtures';
1210

13-
const newDdcTypeSystemVersion = '3.3.0-242.0.dev';
14-
1511
/// The path to the webdev directory in the local machine, e.g.
1612
/// '/workstation/webdev'.
1713
String get webdevPath {
@@ -65,9 +61,3 @@ String absolutePath({
6561
}
6662
throw Exception('Expected a path parameter.');
6763
}
68-
69-
bool dartSdkIsAtLeast(String sdkVersion) {
70-
final expectedVersion = Version.parse(sdkVersion);
71-
final actualVersion = Version.parse(Platform.version.split(' ')[0]);
72-
return actualVersion >= expectedVersion;
73-
}

test_common/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ dependencies:
1010
file: ">=6.0.0 <8.0.0"
1111
logging: ^1.0.1
1212
path: ^1.8.1
13-
pub_semver: ^2.1.1
1413
test: ^1.21.1
1514

1615
dev_dependencies:
1716
lints: ^2.0.0
1817
pubspec_parse: ^1.2.2
18+
pub_semver: ^2.1.1

0 commit comments

Comments
 (0)