| Index: pkg/analyzer/test/src/summary/linker_test.dart
|
| diff --git a/pkg/analyzer/test/src/summary/linker_test.dart b/pkg/analyzer/test/src/summary/linker_test.dart
|
| index 1d63571934673a18e13cac2939ecc27fa629e28c..34b31ba83a32b9f83e26905ddddf2618c8db5090 100644
|
| --- a/pkg/analyzer/test/src/summary/linker_test.dart
|
| +++ b/pkg/analyzer/test/src/summary/linker_test.dart
|
| @@ -24,6 +24,8 @@ class LinkerUnitTest extends SummaryLinkerTest {
|
| @override
|
| bool get allowMissingFiles => false;
|
|
|
| + Matcher get isUndefined => new isInstanceOf<UndefinedElementForLink>();
|
| +
|
| LibraryElementInBuildUnit get testLibrary => _testLibrary ??=
|
| linker.getLibrary(linkerInputs.testDartUri) as LibraryElementInBuildUnit;
|
|
|
| @@ -150,6 +152,34 @@ const x = [const C()];
|
| expect(classC.unnamedConstructor.isCycleFree, false);
|
| }
|
|
|
| + void test_getContainedName_nonStaticField() {
|
| + createLinker('class C { var f; }');
|
| + LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
|
| + ClassElementForLink_Class c = library.getContainedName('C');
|
| + expect(c.getContainedName('f'), isNot(isUndefined));
|
| + }
|
| +
|
| + void test_getContainedName_nonStaticGetter() {
|
| + createLinker('class C { get g => null; }');
|
| + LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
|
| + ClassElementForLink_Class c = library.getContainedName('C');
|
| + expect(c.getContainedName('g'), isNot(isUndefined));
|
| + }
|
| +
|
| + void test_getContainedName_nonStaticMethod() {
|
| + createLinker('class C { m() {} }');
|
| + LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
|
| + ClassElementForLink_Class c = library.getContainedName('C');
|
| + expect(c.getContainedName('m'), isNot(isUndefined));
|
| + }
|
| +
|
| + void test_getContainedName_nonStaticSetter() {
|
| + createLinker('class C { void set s(value) {} }');
|
| + LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
|
| + ClassElementForLink_Class c = library.getContainedName('C');
|
| + expect(c.getContainedName('s='), isNot(isUndefined));
|
| + }
|
| +
|
| void test_inferredType_closure_fromBundle() {
|
| var bundle = createPackageBundle(
|
| '''
|
|
|