| Index: pkg/analysis_server/test/services/completion/optype_test.dart
|
| diff --git a/pkg/analysis_server/test/services/completion/optype_test.dart b/pkg/analysis_server/test/services/completion/optype_test.dart
|
| index 8eeacac9a8357ffd78a37c71d10d5d68b36bda62..9ff44e53a86c996f4869b3c580db4a9fc40db88f 100644
|
| --- a/pkg/analysis_server/test/services/completion/optype_test.dart
|
| +++ b/pkg/analysis_server/test/services/completion/optype_test.dart
|
| @@ -502,6 +502,155 @@ class OpTypeTest {
|
| assertOpType(returnValue: true, typeNames: true);
|
| }
|
|
|
| + test_FunctionDeclaration1() {
|
| + // SimpleIdentifier FunctionDeclaration CompilationUnit
|
| + addTestSource('const ^Fara();');
|
| + assertOpType(typeNames: true);
|
| + }
|
| +
|
| + test_FunctionDeclaration2() {
|
| + // SimpleIdentifier FunctionDeclaration CompilationUnit
|
| + addTestSource('const F^ara();');
|
| + assertOpType(typeNames: true);
|
| + }
|
| +
|
| + test_FunctionDeclaration_inLineComment() {
|
| + // Comment CompilationUnit
|
| + addTestSource('''
|
| + // normal comment ^
|
| + zoo(z) { } String name;''');
|
| + assertOpType();
|
| + }
|
| +
|
| + test_FunctionDeclaration_inLineComment2() {
|
| + // Comment CompilationUnit
|
| + addTestSource('''
|
| + // normal ^comment
|
| + zoo(z) { } String name;''');
|
| + assertOpType();
|
| + }
|
| +
|
| + test_FunctionDeclaration_inLineComment3() {
|
| + // Comment CompilationUnit
|
| + addTestSource('''
|
| + // normal comment ^
|
| + // normal comment 2
|
| + zoo(z) { } String name;''');
|
| + assertOpType();
|
| + }
|
| +
|
| + test_FunctionDeclaration_inLineComment4() {
|
| + // Comment CompilationUnit
|
| + addTestSource('''
|
| + // normal comment
|
| + // normal comment 2^
|
| + zoo(z) { } String name;''');
|
| + assertOpType();
|
| + }
|
| +
|
| + test_FunctionDeclaration_inLineDocComment() {
|
| + // Comment FunctionDeclaration CompilationUnit
|
| + addTestSource('''
|
| + /// some dartdoc ^
|
| + zoo(z) { } String name;''');
|
| + assertOpType();
|
| + }
|
| +
|
| + test_FunctionDeclaration_inLineDocComment2() {
|
| + // Comment FunctionDeclaration CompilationUnit
|
| + addTestSource('''
|
| + /// some ^dartdoc
|
| + zoo(z) { } String name;''');
|
| + assertOpType();
|
| + }
|
| +
|
| + test_FunctionDeclaration_inStarComment() {
|
| + // Comment CompilationUnit
|
| + addTestSource('/* ^ */ zoo(z) {} String name;');
|
| + assertOpType();
|
| + }
|
| +
|
| + test_FunctionDeclaration_inStarComment2() {
|
| + // Comment CompilationUnit
|
| + addTestSource('/* *^/ zoo(z) {} String name;');
|
| + assertOpType();
|
| + }
|
| +
|
| + test_FunctionDeclaration_inStarDocComment() {
|
| + // Comment FunctionDeclaration CompilationUnit
|
| + addTestSource('/** ^ */ zoo(z) { } String name; ');
|
| + assertOpType();
|
| + }
|
| +
|
| + test_FunctionDeclaration_inStarDocComment2() {
|
| + // Comment FunctionDeclaration CompilationUnit
|
| + addTestSource('/** *^/ zoo(z) { } String name;');
|
| + assertOpType();
|
| + }
|
| +
|
| + test_FunctionDeclaration_returnType() {
|
| + // CompilationUnit
|
| + addTestSource('^ zoo(z) { } String name;');
|
| + assertOpType(typeNames: true);
|
| + }
|
| +
|
| + test_FunctionDeclaration_returnType_afterLineComment() {
|
| + // FunctionDeclaration CompilationUnit
|
| + addTestSource('''
|
| + // normal comment
|
| + ^ zoo(z) {} String name;''');
|
| + assertOpType(typeNames: true);
|
| + }
|
| +
|
| + test_FunctionDeclaration_returnType_afterLineComment2() {
|
| + // FunctionDeclaration CompilationUnit
|
| + // TOD(danrubel) left align all test source
|
| + addTestSource('''
|
| +// normal comment
|
| +^ zoo(z) {} String name;''');
|
| + assertOpType(typeNames: true);
|
| + }
|
| +
|
| + test_FunctionDeclaration_returnType_afterLineDocComment() {
|
| + // SimpleIdentifier FunctionDeclaration CompilationUnit
|
| + addTestSource('''
|
| + /// some dartdoc
|
| + ^ zoo(z) { } String name;''');
|
| + assertOpType(typeNames: true);
|
| + }
|
| +
|
| + test_FunctionDeclaration_returnType_afterLineDocComment2() {
|
| + // SimpleIdentifier FunctionDeclaration CompilationUnit
|
| + addTestSource('''
|
| +/// some dartdoc
|
| +^ zoo(z) { } String name;''');
|
| + assertOpType(typeNames: true);
|
| + }
|
| +
|
| + test_FunctionDeclaration_returnType_afterStarComment() {
|
| + // CompilationUnit
|
| + addTestSource('/* */ ^ zoo(z) { } String name;');
|
| + assertOpType(typeNames: true);
|
| + }
|
| +
|
| + test_FunctionDeclaration_returnType_afterStarComment2() {
|
| + // CompilationUnit
|
| + addTestSource('/* */^ zoo(z) { } String name;');
|
| + assertOpType(typeNames: true);
|
| + }
|
| +
|
| + test_FunctionDeclaration_returnType_afterStarDocComment() {
|
| + // FunctionDeclaration CompilationUnit
|
| + addTestSource('/** */ ^ zoo(z) { } String name;');
|
| + assertOpType(typeNames: true);
|
| + }
|
| +
|
| + test_FunctionDeclaration_returnType_afterStarDocComment2() {
|
| + // FunctionDeclaration CompilationUnit
|
| + addTestSource('/** */^ zoo(z) { } String name;');
|
| + assertOpType(typeNames: true);
|
| + }
|
| +
|
| test_FunctionTypeAlias() {
|
| // SimpleIdentifier FunctionTypeAlias CompilationUnit
|
| addTestSource('typedef n^ ;');
|
|
|