Skip to content

Commit 3b06df2

Browse files
jakemac53Commit Queue
authored and
Commit Queue
committed
Clean up a number of 2.19 opt outs in language tests.
This is less than half of them, will send some other chunks later. Bug:51557 Change-Id: I4e80812a689fde99e23c34b6405aaf57cd431ce8 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289261 Reviewed-by: Bob Nystrom <[email protected]> Commit-Queue: Jake Macdonald <[email protected]>
1 parent e34165c commit 3b06df2

File tree

83 files changed

+158
-443
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+158
-443
lines changed

tests/corelib/map_test.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +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-
// TODO(51557): Decide if the mixins being applied in this test should be
6-
// "mixin", "mixin class" or the test should be left at 2.19.
7-
// @dart=2.19
8-
95
library map_test;
106

117
import "package:expect/expect.dart";
@@ -858,7 +854,7 @@ class Mutable {
858854
}
859855

860856
// Slow implementation of Map based on MapBase.
861-
abstract class MapBaseOperations<K, V> {
857+
mixin class MapBaseOperations<K, V> {
862858
final List _keys = <K>[];
863859
final List _values = <V>[];
864860
int _modCount = 0;

tests/corelib/map_update_test.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +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-
// TODO(51557): Decide if the mixins being applied in this test should be
6-
// "mixin", "mixin class" or the test should be left at 2.19.
7-
// @dart=2.19
8-
95
import "package:expect/expect.dart";
106
import 'dart:collection';
117
import 'dart:convert' show json;
@@ -130,7 +126,7 @@ void testNonNull(Map<Comparable?, Object?> map) {
130126
}
131127

132128
// Slow implementation of Map based on MapBase.
133-
abstract class MapBaseOperations<K, V> {
129+
mixin class MapBaseOperations<K, V> {
134130
final List _keys = <K>[];
135131
final List _values = <V>[];
136132
int _modCount = 0;

tests/language/abstract/getter2_test.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +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-
// TODO(51557): Decide if the mixins being applied in this test should be
6-
// "mixin", "mixin class" or the test should be left at 2.19.
7-
// @dart=2.19
8-
95
import "package:expect/expect.dart";
106

117
class A {
@@ -25,7 +21,7 @@ class C extends B {
2521
int get x => super.x;
2622
}
2723

28-
class GetterConcrete {
24+
mixin class GetterConcrete {
2925
var _foo;
3026

3127
get foo => _foo;

tests/language/call/method_as_cast_test.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +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-
// TODO(51557): Decide if the mixins being applied in this test should be
6-
// "mixin", "mixin class" or the test should be left at 2.19.
5+
// Implements Function which is not allowed in Dart 3.
76
// @dart=2.19
87

98
// Dart test program to test arithmetic operations.

tests/language/call/method_implicit_invoke_instance_test.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +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-
// TODO(51557): Decide if the mixins being applied in this test should be
6-
// "mixin", "mixin class" or the test should be left at 2.19.
5+
// Implements Function which is not allowed in Dart 3.
76
// @dart=2.19
87

98
// Dart test program to test arithmetic operations.

tests/language/call/method_implicit_invoke_local_runtime_1_test.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
// for details. All rights reserved. Use of this source code is governed by a
66
// BSD-style license that can be found in the LICENSE file.
77

8-
// TODO(51557): Decide if the mixins being applied in this test should be
9-
// "mixin", "mixin class" or the test should be left at 2.19.
8+
// Implements Function which is not allowed in Dart 3.
109
// @dart=2.19
1110

1211
// Dart test program to test arithmetic operations.

tests/language/call/method_implicit_invoke_local_runtime_2_test.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
// for details. All rights reserved. Use of this source code is governed by a
66
// BSD-style license that can be found in the LICENSE file.
77

8-
// TODO(51557): Decide if the mixins being applied in this test should be
9-
// "mixin", "mixin class" or the test should be left at 2.19.
8+
// Implements Function which is not allowed in Dart 3.
109
// @dart=2.19
1110

1211
// Dart test program to test arithmetic operations.

tests/language/call/method_implicit_invoke_local_runtime_3_test.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
// for details. All rights reserved. Use of this source code is governed by a
66
// BSD-style license that can be found in the LICENSE file.
77

8-
// TODO(51557): Decide if the mixins being applied in this test should be
9-
// "mixin", "mixin class" or the test should be left at 2.19.
8+
// Implements Function which is not allowed in Dart 3.
109
// @dart=2.19
1110

1211
// Dart test program to test arithmetic operations.

tests/language/call/method_implicit_invoke_local_runtime_4_test.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
// for details. All rights reserved. Use of this source code is governed by a
66
// BSD-style license that can be found in the LICENSE file.
77

8-
// TODO(51557): Decide if the mixins being applied in this test should be
9-
// "mixin", "mixin class" or the test should be left at 2.19.
8+
// Implements Function which is not allowed in Dart 3.
109
// @dart=2.19
1110

1211
// Dart test program to test arithmetic operations.

tests/language/call/method_implicit_invoke_local_runtime_test.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
// for details. All rights reserved. Use of this source code is governed by a
66
// BSD-style license that can be found in the LICENSE file.
77

8-
// TODO(51557): Decide if the mixins being applied in this test should be
9-
// "mixin", "mixin class" or the test should be left at 2.19.
8+
// Implements Function which is not allowed in Dart 3.
109
// @dart=2.19
1110

1211
// Dart test program to test arithmetic operations.

tests/language/call/method_implicit_invoke_local_test.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +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-
// TODO(51557): Decide if the mixins being applied in this test should be
6-
// "mixin", "mixin class" or the test should be left at 2.19.
5+
// Implements Function which is not allowed in Dart 3.
76
// @dart=2.19
87

98
// Dart test program to test arithmetic operations.

tests/language/call/method_implicit_invoke_static_test.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +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-
// TODO(51557): Decide if the mixins being applied in this test should be
6-
// "mixin", "mixin class" or the test should be left at 2.19.
5+
// Implements Function which is not allowed in Dart 3.
76
// @dart=2.19
87

98
// Dart test program to test arithmetic operations.

tests/language/call/method_implicit_invoke_top_level_test.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +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-
// TODO(51557): Decide if the mixins being applied in this test should be
6-
// "mixin", "mixin class" or the test should be left at 2.19.
5+
// Implements Function which is not allowed in Dart 3.
76
// @dart=2.19
87

98
// Dart test program to test arithmetic operations.

tests/language/call/method_is_check_test.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +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-
// TODO(51557): Decide if the mixins being applied in this test should be
6-
// "mixin", "mixin class" or the test should be left at 2.19.
5+
// Implements Function which is not allowed in Dart 3.
76
// @dart=2.19
87

98
// Dart test program to test arithmetic operations.

tests/language/class/override_inference_test.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +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-
// TODO(51557): Decide if the mixins being applied in this test should be
6-
// "mixin", "mixin class" or the test should be left at 2.19.
7-
// @dart=2.19
8-
95
// Test that inheriting types on overriding members work as specified.
106

117
// ignore_for_file: unused_local_variable
@@ -47,7 +43,7 @@ class INumInt {
4743
int foo(num x) => x.toInt();
4844
}
4945

50-
class IIntNum {
46+
mixin class IIntNum {
5147
num foo(int x) => x.toInt();
5248
}
5349

tests/language/const/constructor_mixin2_test.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +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-
// TODO(51557): Decide if the mixins being applied in this test should be
6-
// "mixin", "mixin class" or the test should be left at 2.19.
7-
// @dart=2.19
8-
9-
class Mixin {
5+
mixin Mixin {
106
var nonFinalField;
117
}
128

tests/language/const/constructor_mixin3_test.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +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-
// TODO(51557): Decide if the mixins being applied in this test should be
6-
// "mixin", "mixin class" or the test should be left at 2.19.
7-
// @dart=2.19
8-
9-
class Mixin {}
5+
mixin Mixin {}
106

117
class A {
128
const A();

tests/language/const/constructor_mixin_test.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +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-
// TODO(51557): Decide if the mixins being applied in this test should be
6-
// "mixin", "mixin class" or the test should be left at 2.19.
7-
// @dart=2.19
8-
9-
class Mixin {}
5+
mixin Mixin {}
106

117
class A {
128
const A(foo);

tests/language/constructor/missing_initializer_test.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,13 @@
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-
// TODO(51557): Decide if the mixins being applied in this test should be
6-
// "mixin", "mixin class" or the test should be left at 2.19.
7-
// @dart=2.19
8-
95
// Test that it is an error for a class with no generative constructors to
106
// have a final instance variable without an initializing expression, except
117
// if it is `abstract` or `external`. The latter also holds in a class with
128
// generative constructors.
139

1410
// Has factory, hence no default, hence no generative constructors.
15-
abstract class A {
11+
abstract mixin class A {
1612
final dynamic n;
1713
// ^
1814
// [analyzer] COMPILE_TIME_ERROR.FINAL_NOT_INITIALIZED

tests/language/constructor/with_mixin_test.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +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-
// TODO(51557): Decide if the mixins being applied in this test should be
6-
// "mixin", "mixin class" or the test should be left at 2.19.
7-
// @dart=2.19
8-
95
// Test super constructor invocation with mixins.
106
// Regression test for issue dartbug.com/22604
117

@@ -21,7 +17,7 @@ class A {
2117
}
2218
}
2319

24-
class I {}
20+
mixin I {}
2521

2622
class B extends A with I {
2723
int y;

tests/language/covariant/setter_test.dart

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +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-
// TODO(51557): Decide if the mixins being applied in this test should be
6-
// "mixin", "mixin class" or the test should be left at 2.19.
7-
// @dart=2.19
8-
95
import "package:expect/expect.dart";
106

117
class A {}
@@ -67,11 +63,11 @@ abstract class D<T> {
6763
void set m1(T x);
6864
}
6965

70-
class E {
66+
mixin E {
7167
void set m1(A x) {}
7268
}
7369

74-
class F = Object with E implements D<A>;
70+
mixin class F = Object with E implements D<A>;
7571
class G = C with E implements D<A>;
7672

7773
class H extends Object with E implements D<A> {}

tests/language/covariant/subtyping_test.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +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-
// TODO(51557): Decide if the mixins being applied in this test should be
6-
// "mixin", "mixin class" or the test should be left at 2.19.
7-
// @dart=2.19
8-
95
import 'package:expect/expect.dart';
106

117
class Fields<T> {
@@ -132,7 +128,7 @@ testFieldOfGenericFunctionType() {
132128
cNum.g(42);
133129
}
134130

135-
class Base {
131+
mixin class Base {
136132
int _t = 0;
137133
add(int t) {
138134
_t += t;

tests/language/covariant/subtyping_with_mixin_test.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +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-
// TODO(51557): Decide if the mixins being applied in this test should be
6-
// "mixin", "mixin class" or the test should be left at 2.19.
7-
// @dart=2.19
8-
95
import 'package:expect/expect.dart';
106

117
class A {}
@@ -14,7 +10,7 @@ class B extends A {}
1410

1511
class Base<S> {}
1612

17-
class Mixin<T> {
13+
mixin Mixin<T> {
1814
void f(T arg) {}
1915
}
2016

tests/language/covariant_override/tear_off_type_test.dart

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +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-
// TODO(51557): Decide if the mixins being applied in this test should be
6-
// "mixin", "mixin class" or the test should be left at 2.19.
7-
// @dart=2.19
8-
95
import "package:expect/expect.dart";
106

117
// If a parameter is directly or indirectly a covariant override, its type in
@@ -21,11 +17,11 @@ typedef void TakeOptionalObjectsAndInts([Object? a, int b, Object? c, int d]);
2117
typedef void TakeNamedInts({int a, int b, int c, int d});
2218
typedef void TakeNamedObjectsAndInts({Object? a, int b, Object? c, int d});
2319

24-
class M1 {
20+
mixin M1 {
2521
method(covariant int a, int b) {}
2622
}
2723

28-
class M2 {
24+
mixin M2 {
2925
method(int a, covariant int b) {}
3026
}
3127

@@ -87,11 +83,11 @@ class Interface2 {
8783
void method(int a, covariant int b, int c, int d, int e) {}
8884
}
8985

90-
class Mixin1 {
86+
mixin Mixin1 {
9187
void method(int a, int b, covariant int c, int d, int e) {}
9288
}
9389

94-
class Mixin2 {
90+
mixin Mixin2 {
9591
void method(int a, int b, int c, covariant int d, int e) {}
9692
}
9793

tests/language/deferred/inheritance_constraints_runtime_test.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,10 @@
55
// for details. All rights reserved. Use of this source code is governed by a
66
// BSD-style license that can be found in the LICENSE file.
77

8-
// TODO(51557): Decide if the mixins being applied in this test should be
9-
// "mixin", "mixin class" or the test should be left at 2.19.
10-
// @dart=2.19
11-
128
import "package:expect/expect.dart";
139
import "inheritance_constraints_lib.dart" deferred as lib;
1410

15-
class Foo {}
11+
mixin class Foo {}
1612

1713
class Foo2 extends D {}
1814

0 commit comments

Comments
 (0)