| 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 067c14ecf913948137ca411cbd18df7bbc790381..8eeacac9a8357ffd78a37c71d10d5d68b36bda62 100644
|
| --- a/pkg/analysis_server/test/services/completion/optype_test.dart
|
| +++ b/pkg/analysis_server/test/services/completion/optype_test.dart
|
| @@ -562,12 +562,6 @@ class OpTypeTest {
|
| assertOpType(constructors: true);
|
| }
|
|
|
| - test_InstanceCreationExpression_trailingStmt() {
|
| - // SimpleIdentifier TypeName ConstructorName InstanceCreationExpression
|
| - addTestSource('class C {foo(){var f; {var x;} new ^ int x = 7;}}');
|
| - assertOpType(constructors: true);
|
| - }
|
| -
|
| test_InstanceCreationExpression_keyword() {
|
| // InstanceCreationExpression ExpressionStatement Block
|
| addTestSource('class C {foo(){var f; {var x;} new^ }}');
|
| @@ -580,6 +574,12 @@ class OpTypeTest {
|
| assertOpType(returnValue: true, typeNames: true, voidReturn: true);
|
| }
|
|
|
| + test_InstanceCreationExpression_trailingStmt() {
|
| + // SimpleIdentifier TypeName ConstructorName InstanceCreationExpression
|
| + addTestSource('class C {foo(){var f; {var x;} new ^ int x = 7;}}');
|
| + assertOpType(constructors: true);
|
| + }
|
| +
|
| test_InterpolationExpression() {
|
| // SimpleIdentifier InterpolationExpression StringInterpolation
|
| addTestSource('main() {String name; print("hello \$^");}');
|
| @@ -652,6 +652,153 @@ class OpTypeTest {
|
| assertOpType(typeNames: true);
|
| }
|
|
|
| + test_MethodDeclaration_inLineComment() {
|
| + // Comment ClassDeclaration CompilationUnit
|
| + addTestSource('''
|
| + class C2 {
|
| + // normal comment ^
|
| + zoo(z) { } String name; }''');
|
| + assertOpType();
|
| + }
|
| +
|
| + test_MethodDeclaration_inLineComment2() {
|
| + // Comment ClassDeclaration CompilationUnit
|
| + addTestSource('''
|
| + class C2 {
|
| + // normal ^comment
|
| + zoo(z) { } String name; }''');
|
| + assertOpType();
|
| + }
|
| +
|
| + test_MethodDeclaration_inLineComment3() {
|
| + // Comment ClassDeclaration CompilationUnit
|
| + addTestSource('''
|
| + class C2 {
|
| + // normal comment ^
|
| + // normal comment 2
|
| + zoo(z) { } String name; }''');
|
| + assertOpType();
|
| + }
|
| +
|
| + test_MethodDeclaration_inLineComment4() {
|
| + // Comment ClassDeclaration CompilationUnit
|
| + addTestSource('''
|
| + class C2 {
|
| + // normal comment
|
| + // normal comment 2^
|
| + zoo(z) { } String name; }''');
|
| + assertOpType();
|
| + }
|
| +
|
| + test_MethodDeclaration_inLineDocComment() {
|
| + // Comment MethodDeclaration ClassDeclaration CompilationUnit
|
| + addTestSource('''
|
| + class C2 {
|
| + /// some dartdoc ^
|
| + zoo(z) { } String name; }''');
|
| + assertOpType();
|
| + }
|
| +
|
| + test_MethodDeclaration_inLineDocComment2() {
|
| + // Comment MethodDeclaration ClassDeclaration CompilationUnit
|
| + addTestSource('''
|
| + class C2 {
|
| + /// some ^dartdoc
|
| + zoo(z) { } String name; }''');
|
| + assertOpType();
|
| + }
|
| +
|
| + test_MethodDeclaration_inStarComment() {
|
| + // Comment ClassDeclaration CompilationUnit
|
| + addTestSource('class C2 {/* ^ */ zoo(z) {} String name;}');
|
| + assertOpType();
|
| + }
|
| +
|
| + test_MethodDeclaration_inStarComment2() {
|
| + // Comment ClassDeclaration CompilationUnit
|
| + addTestSource('class C2 {/* *^/ zoo(z) {} String name;}');
|
| + assertOpType();
|
| + }
|
| +
|
| + test_MethodDeclaration_inStarDocComment() {
|
| + // Comment MethodDeclaration ClassDeclaration CompilationUnit
|
| + addTestSource('class C2 {/** ^ */ zoo(z) { } String name; }');
|
| + assertOpType();
|
| + }
|
| +
|
| + test_MethodDeclaration_inStarDocComment2() {
|
| + // Comment MethodDeclaration ClassDeclaration CompilationUnit
|
| + addTestSource('class C2 {/** *^/ zoo(z) { } String name; }');
|
| + assertOpType();
|
| + }
|
| +
|
| + test_MethodDeclaration_returnType() {
|
| + // ClassDeclaration CompilationUnit
|
| + addTestSource('class C2 {^ zoo(z) { } String name; }');
|
| + assertOpType(typeNames: true);
|
| + }
|
| +
|
| + test_MethodDeclaration_returnType_afterLineComment() {
|
| + // MethodDeclaration ClassDeclaration CompilationUnit
|
| + addTestSource('''
|
| + class C2 {
|
| + // normal comment
|
| + ^ zoo(z) {} String name;}''');
|
| + assertOpType(typeNames: true);
|
| + }
|
| +
|
| + test_MethodDeclaration_returnType_afterLineComment2() {
|
| + // MethodDeclaration ClassDeclaration CompilationUnit
|
| + // TOD(danrubel) left align all test source
|
| + addTestSource('''
|
| +class C2 {
|
| + // normal comment
|
| +^ zoo(z) {} String name;}''');
|
| + assertOpType(typeNames: true);
|
| + }
|
| +
|
| + test_MethodDeclaration_returnType_afterLineDocComment() {
|
| + // SimpleIdentifier MethodDeclaration ClassDeclaration CompilationUnit
|
| + addTestSource('''
|
| + class C2 {
|
| + /// some dartdoc
|
| + ^ zoo(z) { } String name; }''');
|
| + assertOpType(typeNames: true);
|
| + }
|
| +
|
| + test_MethodDeclaration_returnType_afterLineDocComment2() {
|
| + // SimpleIdentifier MethodDeclaration ClassDeclaration CompilationUnit
|
| + addTestSource('''
|
| +class C2 {
|
| + /// some dartdoc
|
| +^ zoo(z) { } String name; }''');
|
| + assertOpType(typeNames: true);
|
| + }
|
| +
|
| + test_MethodDeclaration_returnType_afterStarComment() {
|
| + // ClassDeclaration CompilationUnit
|
| + addTestSource('class C2 {/* */ ^ zoo(z) { } String name; }');
|
| + assertOpType(typeNames: true);
|
| + }
|
| +
|
| + test_MethodDeclaration_returnType_afterStarComment2() {
|
| + // ClassDeclaration CompilationUnit
|
| + addTestSource('class C2 {/* */^ zoo(z) { } String name; }');
|
| + assertOpType(typeNames: true);
|
| + }
|
| +
|
| + test_MethodDeclaration_returnType_afterStarDocComment() {
|
| + // MethodDeclaration ClassDeclaration CompilationUnit
|
| + addTestSource('class C2 {/** */ ^ zoo(z) { } String name; }');
|
| + assertOpType(typeNames: true);
|
| + }
|
| +
|
| + test_MethodDeclaration_returnType_afterStarDocComment2() {
|
| + // MethodDeclaration ClassDeclaration CompilationUnit
|
| + addTestSource('class C2 {/** */^ zoo(z) { } String name; }');
|
| + assertOpType(typeNames: true);
|
| + }
|
| +
|
| test_MethodInvocation_no_semicolon() {
|
| // MethodInvocation ExpressionStatement Block
|
| addTestSource('''
|
|
|