| Index: pkg/analyzer/test/src/summary/summary_common.dart
|
| diff --git a/pkg/analyzer/test/src/summary/summary_common.dart b/pkg/analyzer/test/src/summary/summary_common.dart
|
| index 6ee90eb7b886118ff079de94c177d55b541143ef..5466f15f5e65d92d11035dedffce5f3ec7c10d85 100644
|
| --- a/pkg/analyzer/test/src/summary/summary_common.dart
|
| +++ b/pkg/analyzer/test/src/summary/summary_common.dart
|
| @@ -1066,43 +1066,15 @@ class E {}
|
| expect(unlinkedUnits[0].publicNamespace.names[0].numTypeParameters, 0);
|
| }
|
|
|
| - test_class_documented() {
|
| - String text = '''
|
| -// Extra comment so doc comment offset != 0
|
| -/**
|
| - * Docs
|
| - */
|
| -class C {}''';
|
| - UnlinkedClass cls = serializeClassText(text);
|
| - expect(cls.documentationComment, isNotNull);
|
| - checkDocumentationComment(cls.documentationComment, text);
|
| - }
|
| -
|
| - test_class_documented_with_references() {
|
| - String text = '''
|
| -// Extra comment so doc comment offset != 0
|
| -/**
|
| - * Docs referring to [D] and [E]
|
| - */
|
| -class C {}
|
| -
|
| -class D {}
|
| -class E {}''';
|
| - UnlinkedClass cls = serializeClassText(text);
|
| - expect(cls.documentationComment, isNotNull);
|
| - checkDocumentationComment(cls.documentationComment, text);
|
| - }
|
| -
|
| - test_class_documented_with_with_windows_line_endings() {
|
| - String text = '/**\r\n * Docs\r\n */\r\nclass C {}';
|
| - UnlinkedClass cls = serializeClassText(text);
|
| - expect(cls.documentationComment, isNotNull);
|
| - checkDocumentationComment(cls.documentationComment, text);
|
| - }
|
| -
|
| - test_class_executables() {
|
| + test_class_constMembers() {
|
| UnlinkedClass cls = serializeClassText('''
|
| class C {
|
| + int fieldInstance = 0;
|
| + final int fieldInstanceFinal = 0;
|
| + static int fieldStatic = 0;
|
| + static final int fieldStaticFinal = 0;
|
| + static const int fieldStaticConst = 0;
|
| + static const int _fieldStaticConstPrivate = 0;
|
| static void methodStaticPublic() {}
|
| static void _methodStaticPrivate() {}
|
| C();
|
| @@ -1121,25 +1093,64 @@ class C {
|
| // executables
|
| Map<String, UnlinkedPublicName> executablesMap =
|
| <String, UnlinkedPublicName>{};
|
| - className.executables.forEach((e) => executablesMap[e.name] = e);
|
| - expect(executablesMap, hasLength(3));
|
| + className.constMembers.forEach((e) => executablesMap[e.name] = e);
|
| + expect(executablesMap, hasLength(4));
|
| + {
|
| + UnlinkedPublicName executable = executablesMap['fieldStaticConst'];
|
| + expect(executable.kind, ReferenceKind.constField);
|
| + expect(executable.constMembers, isEmpty);
|
| + }
|
| {
|
| UnlinkedPublicName executable = executablesMap['methodStaticPublic'];
|
| expect(executable.kind, ReferenceKind.staticMethod);
|
| - expect(executable.executables, isEmpty);
|
| + expect(executable.constMembers, isEmpty);
|
| }
|
| {
|
| UnlinkedPublicName executable = executablesMap[''];
|
| expect(executable.kind, ReferenceKind.constructor);
|
| - expect(executable.executables, isEmpty);
|
| + expect(executable.constMembers, isEmpty);
|
| }
|
| {
|
| UnlinkedPublicName executable = executablesMap['constructorNamedPublic'];
|
| expect(executable.kind, ReferenceKind.constructor);
|
| - expect(executable.executables, isEmpty);
|
| + expect(executable.constMembers, isEmpty);
|
| }
|
| }
|
|
|
| + test_class_documented() {
|
| + String text = '''
|
| +// Extra comment so doc comment offset != 0
|
| +/**
|
| + * Docs
|
| + */
|
| +class C {}''';
|
| + UnlinkedClass cls = serializeClassText(text);
|
| + expect(cls.documentationComment, isNotNull);
|
| + checkDocumentationComment(cls.documentationComment, text);
|
| + }
|
| +
|
| + test_class_documented_with_references() {
|
| + String text = '''
|
| +// Extra comment so doc comment offset != 0
|
| +/**
|
| + * Docs referring to [D] and [E]
|
| + */
|
| +class C {}
|
| +
|
| +class D {}
|
| +class E {}''';
|
| + UnlinkedClass cls = serializeClassText(text);
|
| + expect(cls.documentationComment, isNotNull);
|
| + checkDocumentationComment(cls.documentationComment, text);
|
| + }
|
| +
|
| + test_class_documented_with_with_windows_line_endings() {
|
| + String text = '/**\r\n * Docs\r\n */\r\nclass C {}';
|
| + UnlinkedClass cls = serializeClassText(text);
|
| + expect(cls.documentationComment, isNotNull);
|
| + checkDocumentationComment(cls.documentationComment, text);
|
| + }
|
| +
|
| test_class_interface() {
|
| UnlinkedClass cls = serializeClassText('''
|
| class C implements D {}
|
|
|