| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library test.services.completion.invocation; | 5 library test.services.completion.invocation; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:analysis_server/src/protocol.dart'; | 9 import 'package:analysis_server/src/protocol.dart'; |
| 10 import 'package:analysis_server/src/services/completion/dart_completion_manager.
dart'; | 10 import 'package:analysis_server/src/services/completion/dart_completion_manager.
dart'; |
| (...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 class Derived extends Base implements Interface { | 516 class Derived extends Base implements Interface { |
| 517 } | 517 } |
| 518 void test(Derived d) { | 518 void test(Derived d) { |
| 519 d.^ | 519 d.^ |
| 520 } | 520 } |
| 521 '''); | 521 '''); |
| 522 return computeFull((bool result) { | 522 return computeFull((bool result) { |
| 523 assertSuggestMethod('f', 'Base', 'void'); | 523 assertSuggestMethod('f', 'Base', 'void'); |
| 524 }); | 524 }); |
| 525 } | 525 } |
| 526 |
| 527 test_super() { |
| 528 // SimpleIdentifier MethodInvocation ExpressionStatement |
| 529 addTestSource(''' |
| 530 class C3 { |
| 531 int fi3; |
| 532 static int fs3; |
| 533 m() {} |
| 534 mi3() {} |
| 535 static ms3() {} |
| 526 } | 536 } |
| 537 class C2 { |
| 538 int fi2; |
| 539 static int fs2; |
| 540 m() {} |
| 541 mi2() {} |
| 542 static ms2() {} |
| 543 } |
| 544 class C1 extends C2 implements C3 { |
| 545 int fi1; |
| 546 static int fs1; |
| 547 m() {super.^} |
| 548 mi1() {} |
| 549 static ms1() {} |
| 550 }'''); |
| 551 return computeFull((bool result) { |
| 552 assertNotSuggested('fi1'); |
| 553 assertNotSuggested('fs1'); |
| 554 assertNotSuggested('mi1'); |
| 555 assertNotSuggested('ms1'); |
| 556 assertSuggestInvocationField('fi2', 'int'); |
| 557 assertNotSuggested('fs2'); |
| 558 assertSuggestInvocationMethod('mi2', 'C2', null); |
| 559 assertNotSuggested('ms2'); |
| 560 assertSuggestInvocationMethod('m', 'C2', null); |
| 561 assertNotSuggested('fi3'); |
| 562 assertNotSuggested('fs3'); |
| 563 assertNotSuggested('mi3'); |
| 564 assertNotSuggested('ms3'); |
| 565 }); |
| 566 } |
| 567 } |
| OLD | NEW |