Skip to content

Commit 24c7666

Browse files
committed
Update tests that have the current version number hardcoded
Some package configuration tests have the current version hardcoded in local package_config.json files. Update these from 2.9 to 2.10. Change-Id: I77bf63c0e5dfa73aa8a86fb1b4e8a404e8cfaa7f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155441 Reviewed-by: Martin Kustermann <kustermann@google.com>
1 parent f88ce7a commit 24c7666

File tree

20 files changed

+28
-28
lines changed

20 files changed

+28
-28
lines changed

pkg/analyzer/test/src/dart/resolution/language_version_test.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,10 @@ var x = 0;
131131
assertErrorsInList(result.errors, []);
132132
assertType(findElement.topVar('x').type, 'int*');
133133

134-
// Upgrade the language version to `2.9`, so enabled Null Safety.
134+
// Upgrade the language version to `2.10`, so enabled Null Safety.
135135
driver.changeFile(path);
136136
await _resolveFile(path, r'''
137-
// @dart = 2.9
137+
// @dart = 2.10
138138
var x = 0;
139139
''');
140140
assertType(findElement.topVar('x').type, 'int');
@@ -162,10 +162,10 @@ var x = 0;
162162
''');
163163
assertType(findElement.topVar('x').type, 'int*');
164164

165-
// Upgrade the language version to `2.9`, so enabled Null Safety.
165+
// Upgrade the language version to `2.10`, so enabled Null Safety.
166166
_changeTestFile();
167167
await assertNoErrorsInCode('''
168-
// @dart = 2.9
168+
// @dart = 2.10
169169
var x = 0;
170170
''');
171171
assertType(findElement.topVar('x').type, 'int');

pkg/analyzer/test/src/diagnostics/invalid_language_override_greater_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ class A {}
4040
test_greaterThanPackage() async {
4141
_configureTestPackageLanguageVersion('2.5');
4242
await assertNoErrorsInCode(r'''
43-
// @dart = 2.9
43+
// @dart = 2.10
4444
int? a;
4545
''');
4646
_assertUnitLanguageVersion(
4747
package: Version.parse('2.5.0'),
48-
override: Version.parse('2.9.0'),
48+
override: Version.parse('2.10.0'),
4949
);
5050
}
5151

pkg/analyzer/test/src/diagnostics/invalid_language_override_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ int i = 0;
2424
]);
2525
}
2626

27-
test_correct_2_10() async {
27+
test_correct_2_19() async {
2828
await assertErrorsInCode(r'''
29-
// @dart = 2.10
29+
// @dart = 2.19
3030
int i = 0;
3131
''', [
3232
error(HintCode.INVALID_LANGUAGE_VERSION_OVERRIDE_GREATER, 0, 15),

pkg/front_end/testcases/nnbd_mixed/issue42387/foundation_basic_types_lib.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
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.
44

5-
// @dart = 2.9
5+
// @dart = 2.10
66

77
typedef Future<Null> AsyncCallback();

pkg/front_end/testcases/nnbd_mixed/issue42387/foundation_binding_lib.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
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.
44

5-
// @dart = 2.9
5+
// @dart = 2.10
66

77
import 'foundation_basic_types_lib.dart';
88

pkg/front_end/testcases/nnbd_mixed/issue42660_lib.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
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.
44

5-
// @dart=2.9
5+
// @dart=2.10
66

77
extension E on int {
88
String m() => 'm';

pkg/vm/testcases/transformations/type_flow/transformer/lists_nnbd.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// BSD-style license that can be found in the LICENSE file.
44

55
// This test requires non-nullable experiment.
6-
// @dart = 2.9
6+
// @dart = 2.10
77

88
nonConstant() => int.parse('1') == 1;
99

pkg/vm/testcases/transformations/type_flow/transformer/null_check_elimination_nnbd.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Tests elimination of null checks.
66
// This test requires non-nullable experiment.
77

8-
// @dart = 2.9
8+
// @dart = 2.10
99

1010
class A {
1111
String? nonNullable;

pkg/vm/testcases/transformations/type_flow/transformer/regress_41452_nnbd_strong.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Tests handling of null initializer of covariant field.
77
// This test requires non-nullable experiment and NNBD strong mode.
88

9-
// @dart = 2.9
9+
// @dart = 2.10
1010

1111
class _SplayTreeNode<Node extends _SplayTreeNode<Node>> {
1212
Node? left;

pkg/vm/testcases/transformations/type_flow/transformer/type_cast_elimination_nnbd.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Tests elimination of type casts.
66
// This test requires non-nullable experiment.
77

8-
// @dart = 2.9
8+
// @dart = 2.10
99

1010
class A<T> {}
1111

0 commit comments

Comments
 (0)