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

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: fix test 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
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 C2 {
531 int fi2;
532 static int fs2;
533 m() {}
534 mi2() {}
535 static ms2() {}
526 } 536 }
537 class C1 extends C2 {
538 int fi1;
539 static int fs1;
540 m() {super.^}
541 mi1() {}
542 static ms1() {}
543 }''');
544 return computeFull((bool result) {
545 assertNotSuggested('fi1');
546 assertNotSuggested('fs1');
547 assertNotSuggested('mi1');
548 assertNotSuggested('ms1');
549 assertSuggestInvocationField('fi2', 'int');
550 assertNotSuggested('fs2');
551 assertSuggestInvocationMethod('mi2', 'C2', null);
552 assertNotSuggested('ms2');
553 assertSuggestInvocationMethod('m', 'C2', null);
554 });
555 }
556 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698