| Index: pkg/analyzer/test/src/dart/analysis/index_test.dart
|
| diff --git a/pkg/analyzer/test/src/dart/analysis/index_test.dart b/pkg/analyzer/test/src/dart/analysis/index_test.dart
|
| index ffa365d1f01d709c9d3ee3e7538090bbf6e0ae20..ec41c946ad5434159cc1d45f71201aa15f50bfcb 100644
|
| --- a/pkg/analyzer/test/src/dart/analysis/index_test.dart
|
| +++ b/pkg/analyzer/test/src/dart/analysis/index_test.dart
|
| @@ -916,6 +916,59 @@ class A {
|
| ..isWrittenAt('field = 5', true);
|
| }
|
|
|
| + test_subtypes() async {
|
| + String libP = 'package:test/lib.dart;package:test/lib.dart';
|
| + provider.newFile(
|
| + _p('$testProject/lib.dart'),
|
| + '''
|
| +class A {}
|
| +class B {}
|
| +class C {}
|
| +class D {}
|
| +class E {}
|
| +''');
|
| + await _indexTestUnit('''
|
| +import 'lib.dart';
|
| +
|
| +class X extends A {
|
| + int field1, field2;
|
| + int get getter1 => null;
|
| + void set setter1(_) {}
|
| + void method1() {}
|
| +}
|
| +
|
| +class Y extends Object with B, C {
|
| + void methodY() {}
|
| +}
|
| +
|
| +class Z implements E, D {
|
| + void methodZ() {}
|
| +}
|
| +''');
|
| +
|
| + {
|
| + AnalysisDriverSubtype X =
|
| + index.subtypes.singleWhere((t) => t.name == 'X');
|
| + expect(X.supertypes, ['$libP;A']);
|
| + expect(X.members, ['field1', 'field2', 'getter1', 'method1', 'setter1']);
|
| + }
|
| +
|
| + {
|
| + AnalysisDriverSubtype Y =
|
| + index.subtypes.singleWhere((t) => t.name == 'Y');
|
| + expect(
|
| + Y.supertypes, ['dart:core;dart:core;Object', '$libP;B', '$libP;C']);
|
| + expect(Y.members, ['methodY']);
|
| + }
|
| +
|
| + {
|
| + AnalysisDriverSubtype Z =
|
| + index.subtypes.singleWhere((t) => t.name == 'Z');
|
| + expect(Z.supertypes, ['$libP;D', '$libP;E']);
|
| + expect(Z.members, ['methodZ']);
|
| + }
|
| + }
|
| +
|
| test_usedName_inLibraryIdentifier() async {
|
| await _indexTestUnit('''
|
| library aaa.bbb.ccc;
|
|
|