Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(929)

Side by Side Diff: pkg/analysis_server/test/services/completion/prefixed_element_contributor_test.dart

Issue 1127643003: suggest only superclass elements for "super." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/analysis_server/test/services/completion/completion_test_util.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/services/completion/completion_test_util.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698