Index: pkg/analyzer/test/src/task/strong/checker_test.dart |
diff --git a/pkg/analyzer/test/src/task/strong/checker_test.dart b/pkg/analyzer/test/src/task/strong/checker_test.dart |
index 4c2d8af7c6a7f850af83a4989fc4648593bb2ef0..3d11558a05f347ee55b3e2dc2059cb001ca97f88 100644 |
--- a/pkg/analyzer/test/src/task/strong/checker_test.dart |
+++ b/pkg/analyzer/test/src/task/strong/checker_test.dart |
@@ -4,12 +4,13 @@ |
library analyzer.test.src.task.strong.checker_test; |
-import '../../../reflective_tests.dart'; |
+import 'package:test_reflective_loader/test_reflective_loader.dart'; |
+ |
import 'strong_test_helper.dart'; |
void main() { |
initStrongModeTests(); |
- runReflectiveTests(CheckerTest); |
+ defineReflectiveTests(CheckerTest); |
} |
@reflectiveTest |
@@ -320,6 +321,58 @@ test() { |
'''); |
} |
+ void test_constantGenericTypeArg_explict() { |
+ // Regression test for https://github.com/dart-lang/sdk/issues/26141 |
+ checkFile(''' |
+abstract class Equality<R> {} |
+abstract class EqualityBase<R> implements Equality<R> { |
+ final C<R> c = const C<R>(); |
+ const EqualityBase(); |
+} |
+class DefaultEquality<S> extends EqualityBase<S> { |
+ const DefaultEquality(); |
+} |
+class SetEquality<T> implements Equality<T> { |
+ final Equality<T> field = const DefaultEquality<T>(); |
+ const SetEquality([Equality<T> inner = const DefaultEquality<T>()]); |
+} |
+class C<Q> { |
+ final List<Q> list = const <Q>[]; |
+ final Map<Q, Iterable<Q>> m = const <Q, Iterable<Q>>{}; |
+ const C(); |
+} |
+main() { |
+ const SetEquality<String>(); |
+} |
+ '''); |
+ } |
+ |
+ void test_constantGenericTypeArg_infer() { |
+ // Regression test for https://github.com/dart-lang/sdk/issues/26141 |
+ checkFile(''' |
+abstract class Equality<Q> {} |
+abstract class EqualityBase<R> implements Equality<R> { |
+ final C<R> c = /*info:INFERRED_TYPE_ALLOCATION*/const C(); |
+ const EqualityBase(); |
+} |
+class DefaultEquality<S> extends EqualityBase<S> { |
+ const DefaultEquality(); |
+} |
+class SetEquality<T> implements Equality<T> { |
+ final Equality<T> field = const DefaultEquality(); |
+ const SetEquality([Equality<T> inner = const DefaultEquality()]); |
+} |
+class C<Q> { |
+ final List<Q> list = /*info:INFERRED_TYPE_LITERAL*/const []; |
+ final Map<Q, Iterable<Q>> m = /*info:INFERRED_TYPE_LITERAL*/const {}; |
+ const C(); |
+} |
+main() { |
+ const SetEquality<String>(); |
+} |
+ '''); |
+ } |
+ |
void test_constructorInvalid() { |
// Regression test for https://github.com/dart-lang/sdk/issues/26695 |
checkFile(''' |
@@ -1988,6 +2041,7 @@ void main/*<S>*/() { |
'''); |
check(implicitDynamic: false); |
} |
+ |
void test_implicitDynamic_listLiteral() { |
addFile(r''' |
@@ -2168,58 +2222,6 @@ dynamic y1 = (<dynamic>[])[0]; |
check(implicitDynamic: false); |
} |
- void test_constantGenericTypeArg_infer() { |
- // Regression test for https://github.com/dart-lang/sdk/issues/26141 |
- checkFile(''' |
-abstract class Equality<Q> {} |
-abstract class EqualityBase<R> implements Equality<R> { |
- final C<R> c = /*info:INFERRED_TYPE_ALLOCATION*/const C(); |
- const EqualityBase(); |
-} |
-class DefaultEquality<S> extends EqualityBase<S> { |
- const DefaultEquality(); |
-} |
-class SetEquality<T> implements Equality<T> { |
- final Equality<T> field = const DefaultEquality(); |
- const SetEquality([Equality<T> inner = const DefaultEquality()]); |
-} |
-class C<Q> { |
- final List<Q> list = /*info:INFERRED_TYPE_LITERAL*/const []; |
- final Map<Q, Iterable<Q>> m = /*info:INFERRED_TYPE_LITERAL*/const {}; |
- const C(); |
-} |
-main() { |
- const SetEquality<String>(); |
-} |
- '''); |
- } |
- |
- void test_constantGenericTypeArg_explict() { |
- // Regression test for https://github.com/dart-lang/sdk/issues/26141 |
- checkFile(''' |
-abstract class Equality<R> {} |
-abstract class EqualityBase<R> implements Equality<R> { |
- final C<R> c = const C<R>(); |
- const EqualityBase(); |
-} |
-class DefaultEquality<S> extends EqualityBase<S> { |
- const DefaultEquality(); |
-} |
-class SetEquality<T> implements Equality<T> { |
- final Equality<T> field = const DefaultEquality<T>(); |
- const SetEquality([Equality<T> inner = const DefaultEquality<T>()]); |
-} |
-class C<Q> { |
- final List<Q> list = const <Q>[]; |
- final Map<Q, Iterable<Q>> m = const <Q, Iterable<Q>>{}; |
- const C(); |
-} |
-main() { |
- const SetEquality<String>(); |
-} |
- '''); |
- } |
- |
void test_invalidOverrides_baseClassOverrideToChildInterface() { |
checkFile(''' |
class A {} |