| 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 5b009584c75a0ac80db76decba481e14305e0ee0..e1646440c071b00890a621615c4aaebfb74562d8 100644
|
| --- a/pkg/analysis_server/test/services/completion/optype_test.dart
|
| +++ b/pkg/analysis_server/test/services/completion/optype_test.dart
|
| @@ -303,16 +303,35 @@ class OpTypeTest {
|
| assertOpType(returnValue: true, typeNames: true, voidReturn: true);
|
| }
|
|
|
| - test_ConditionalExpression_empty() {
|
| - // SimpleIdentifier PrefixIdentifier IfStatement
|
| - addTestSource('class A {foo() {A a; if (^) something}}');
|
| +
|
| + test_ConditionalExpression_partial_thenExpression() {
|
| + // SimpleIdentifier ConditionalExpression ReturnStatement
|
| + addTestSource('class C {foo(){var f; {var x;} return a ? T^}}');
|
| assertOpType(returnValue: true, typeNames: true);
|
| }
|
|
|
| - test_ConditionalExpression_invocation() {
|
| - // SimpleIdentifier PrefixIdentifier IfStatement
|
| - addTestSource('main() {var a; if (a.^) something}');
|
| - assertOpType(invocation: true);
|
| + test_ConditionalExpression_partial_thenExpression_empty() {
|
| + // SimpleIdentifier ConditionalExpression ReturnStatement
|
| + addTestSource('class C {foo(){var f; {var x;} return a ? ^}}');
|
| + assertOpType(returnValue: true, typeNames: true);
|
| + }
|
| +
|
| + test_ConditionalExpression_elseExpression() {
|
| + // SimpleIdentifier ConditionalExpression ReturnStatement
|
| + addTestSource('class C {foo(){var f; {var x;} return a ? T1 : T^}}');
|
| + assertOpType(returnValue: true, typeNames: true);
|
| + }
|
| +
|
| + test_ConditionalExpression_elseExpression_empty() {
|
| + // SimpleIdentifier ConditionalExpression ReturnStatement
|
| + addTestSource('class C {foo(){var f; {var x;} return a ? T1 : ^}}');
|
| + assertOpType(returnValue: true, typeNames: true);
|
| + }
|
| +
|
| + test_ConditionalExpression_thenExpression() {
|
| + // SimpleIdentifier ConditionalExpression ReturnStatement
|
| + addTestSource('class C {foo(){var f; {var x;} return a ? T^ : c}}');
|
| + assertOpType(returnValue: true, typeNames: true);
|
| }
|
|
|
| test_ConstructorName() {
|
| @@ -471,6 +490,18 @@ class OpTypeTest {
|
| assertOpType(returnValue: true, typeNames: true);
|
| }
|
|
|
| + test_IfStatement_empty() {
|
| + // SimpleIdentifier PrefixIdentifier IfStatement
|
| + addTestSource('class A {foo() {A a; if (^) something}}');
|
| + assertOpType(returnValue: true, typeNames: true);
|
| + }
|
| +
|
| + test_IfStatement_invocation() {
|
| + // SimpleIdentifier PrefixIdentifier IfStatement
|
| + addTestSource('main() {var a; if (a.^) something}');
|
| + assertOpType(invocation: true);
|
| + }
|
| +
|
| test_ImplementsClause() {
|
| // ImplementsClause ClassDeclaration
|
| addTestSource('class x implements ^\n{}');
|
|
|