Skip to content

Commit

Permalink
Clean up a number of 2.19 opt outs in language tests.
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
jakemac53 authored and Commit Queue committed Mar 17, 2023
1 parent e34165c commit 3b06df2
Show file tree
Hide file tree
Showing 83 changed files with 158 additions and 443 deletions.
6 changes: 1 addition & 5 deletions tests/corelib/map_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// TODO(51557): Decide if the mixins being applied in this test should be
// "mixin", "mixin class" or the test should be left at 2.19.
// @dart=2.19

library map_test;

import "package:expect/expect.dart";
Expand Down Expand Up @@ -858,7 +854,7 @@ class Mutable {
}

// Slow implementation of Map based on MapBase.
abstract class MapBaseOperations<K, V> {
mixin class MapBaseOperations<K, V> {
final List _keys = <K>[];
final List _values = <V>[];
int _modCount = 0;
Expand Down
6 changes: 1 addition & 5 deletions tests/corelib/map_update_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// TODO(51557): Decide if the mixins being applied in this test should be
// "mixin", "mixin class" or the test should be left at 2.19.
// @dart=2.19

import "package:expect/expect.dart";
import 'dart:collection';
import 'dart:convert' show json;
Expand Down Expand Up @@ -130,7 +126,7 @@ void testNonNull(Map<Comparable?, Object?> map) {
}

// Slow implementation of Map based on MapBase.
abstract class MapBaseOperations<K, V> {
mixin class MapBaseOperations<K, V> {
final List _keys = <K>[];
final List _values = <V>[];
int _modCount = 0;
Expand Down
6 changes: 1 addition & 5 deletions tests/language/abstract/getter2_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// TODO(51557): Decide if the mixins being applied in this test should be
// "mixin", "mixin class" or the test should be left at 2.19.
// @dart=2.19

import "package:expect/expect.dart";

class A {
Expand All @@ -25,7 +21,7 @@ class C extends B {
int get x => super.x;
}

class GetterConcrete {
mixin class GetterConcrete {
var _foo;

get foo => _foo;
Expand Down
3 changes: 1 addition & 2 deletions tests/language/call/method_as_cast_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

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

// Dart test program to test arithmetic operations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

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

// Dart test program to test arithmetic operations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

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

// Dart test program to test arithmetic operations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

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

// Dart test program to test arithmetic operations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

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

// Dart test program to test arithmetic operations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

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

// Dart test program to test arithmetic operations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

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

// Dart test program to test arithmetic operations.
Expand Down
3 changes: 1 addition & 2 deletions tests/language/call/method_implicit_invoke_local_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

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

// Dart test program to test arithmetic operations.
Expand Down
3 changes: 1 addition & 2 deletions tests/language/call/method_implicit_invoke_static_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

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

// Dart test program to test arithmetic operations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

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

// Dart test program to test arithmetic operations.
Expand Down
3 changes: 1 addition & 2 deletions tests/language/call/method_is_check_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

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

// Dart test program to test arithmetic operations.
Expand Down
6 changes: 1 addition & 5 deletions tests/language/class/override_inference_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// TODO(51557): Decide if the mixins being applied in this test should be
// "mixin", "mixin class" or the test should be left at 2.19.
// @dart=2.19

// Test that inheriting types on overriding members work as specified.

// ignore_for_file: unused_local_variable
Expand Down Expand Up @@ -47,7 +43,7 @@ class INumInt {
int foo(num x) => x.toInt();
}

class IIntNum {
mixin class IIntNum {
num foo(int x) => x.toInt();
}

Expand Down
6 changes: 1 addition & 5 deletions tests/language/const/constructor_mixin2_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// TODO(51557): Decide if the mixins being applied in this test should be
// "mixin", "mixin class" or the test should be left at 2.19.
// @dart=2.19

class Mixin {
mixin Mixin {
var nonFinalField;
}

Expand Down
6 changes: 1 addition & 5 deletions tests/language/const/constructor_mixin3_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// TODO(51557): Decide if the mixins being applied in this test should be
// "mixin", "mixin class" or the test should be left at 2.19.
// @dart=2.19

class Mixin {}
mixin Mixin {}

class A {
const A();
Expand Down
6 changes: 1 addition & 5 deletions tests/language/const/constructor_mixin_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// TODO(51557): Decide if the mixins being applied in this test should be
// "mixin", "mixin class" or the test should be left at 2.19.
// @dart=2.19

class Mixin {}
mixin Mixin {}

class A {
const A(foo);
Expand Down
6 changes: 1 addition & 5 deletions tests/language/constructor/missing_initializer_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,13 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// TODO(51557): Decide if the mixins being applied in this test should be
// "mixin", "mixin class" or the test should be left at 2.19.
// @dart=2.19

// Test that it is an error for a class with no generative constructors to
// have a final instance variable without an initializing expression, except
// if it is `abstract` or `external`. The latter also holds in a class with
// generative constructors.

// Has factory, hence no default, hence no generative constructors.
abstract class A {
abstract mixin class A {
final dynamic n;
// ^
// [analyzer] COMPILE_TIME_ERROR.FINAL_NOT_INITIALIZED
Expand Down
6 changes: 1 addition & 5 deletions tests/language/constructor/with_mixin_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// TODO(51557): Decide if the mixins being applied in this test should be
// "mixin", "mixin class" or the test should be left at 2.19.
// @dart=2.19

// Test super constructor invocation with mixins.
// Regression test for issue dartbug.com/22604

Expand All @@ -21,7 +17,7 @@ class A {
}
}

class I {}
mixin I {}

class B extends A with I {
int y;
Expand Down
8 changes: 2 additions & 6 deletions tests/language/covariant/setter_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// TODO(51557): Decide if the mixins being applied in this test should be
// "mixin", "mixin class" or the test should be left at 2.19.
// @dart=2.19

import "package:expect/expect.dart";

class A {}
Expand Down Expand Up @@ -67,11 +63,11 @@ abstract class D<T> {
void set m1(T x);
}

class E {
mixin E {
void set m1(A x) {}
}

class F = Object with E implements D<A>;
mixin class F = Object with E implements D<A>;
class G = C with E implements D<A>;

class H extends Object with E implements D<A> {}
Expand Down
6 changes: 1 addition & 5 deletions tests/language/covariant/subtyping_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// TODO(51557): Decide if the mixins being applied in this test should be
// "mixin", "mixin class" or the test should be left at 2.19.
// @dart=2.19

import 'package:expect/expect.dart';

class Fields<T> {
Expand Down Expand Up @@ -132,7 +128,7 @@ testFieldOfGenericFunctionType() {
cNum.g(42);
}

class Base {
mixin class Base {
int _t = 0;
add(int t) {
_t += t;
Expand Down
6 changes: 1 addition & 5 deletions tests/language/covariant/subtyping_with_mixin_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// TODO(51557): Decide if the mixins being applied in this test should be
// "mixin", "mixin class" or the test should be left at 2.19.
// @dart=2.19

import 'package:expect/expect.dart';

class A {}
Expand All @@ -14,7 +10,7 @@ class B extends A {}

class Base<S> {}

class Mixin<T> {
mixin Mixin<T> {
void f(T arg) {}
}

Expand Down
12 changes: 4 additions & 8 deletions tests/language/covariant_override/tear_off_type_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// TODO(51557): Decide if the mixins being applied in this test should be
// "mixin", "mixin class" or the test should be left at 2.19.
// @dart=2.19

import "package:expect/expect.dart";

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

class M1 {
mixin M1 {
method(covariant int a, int b) {}
}

class M2 {
mixin M2 {
method(int a, covariant int b) {}
}

Expand Down Expand Up @@ -87,11 +83,11 @@ class Interface2 {
void method(int a, covariant int b, int c, int d, int e) {}
}

class Mixin1 {
mixin Mixin1 {
void method(int a, int b, covariant int c, int d, int e) {}
}

class Mixin2 {
mixin Mixin2 {
void method(int a, int b, int c, covariant int d, int e) {}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,10 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// TODO(51557): Decide if the mixins being applied in this test should be
// "mixin", "mixin class" or the test should be left at 2.19.
// @dart=2.19

import "package:expect/expect.dart";
import "inheritance_constraints_lib.dart" deferred as lib;

class Foo {}
mixin class Foo {}

class Foo2 extends D {}

Expand Down
Loading

0 comments on commit 3b06df2

Please sign in to comment.