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

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

Issue 1410893002: Disable completion in comment text. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « pkg/analysis_server/test/services/completion/keyword_contributor_test.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.dart.local; 5 library test.services.completion.dart.local;
6 6
7 import 'package:analysis_server/plugin/protocol/protocol.dart' as protocol 7 import 'package:analysis_server/plugin/protocol/protocol.dart' as protocol
8 show Element, ElementKind; 8 show Element, ElementKind;
9 import 'package:analysis_server/plugin/protocol/protocol.dart' 9 import 'package:analysis_server/plugin/protocol/protocol.dart'
10 hide Element, ElementKind; 10 hide Element, ElementKind;
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 expect(suggestion.hasNamedParameters, false); 596 expect(suggestion.hasNamedParameters, false);
597 } 597 }
598 598
599 test_ignore_symbol_being_completed() { 599 test_ignore_symbol_being_completed() {
600 addTestSource('class MyClass { } main(MC^) { }'); 600 addTestSource('class MyClass { } main(MC^) { }');
601 expect(computeFast(), isTrue); 601 expect(computeFast(), isTrue);
602 assertSuggestLocalClass('MyClass'); 602 assertSuggestLocalClass('MyClass');
603 assertNotSuggested('MC'); 603 assertNotSuggested('MC');
604 } 604 }
605 605
606 test_inComment_block_beforeNode() {
607 addTestSource('''
608 main(aaa, bbb) {
609 /* text ^ */
610 print(42);
611 }
612 ''');
613 expect(computeFast(), isTrue);
614 assertNoSuggestions();
615 }
616
617 test_inComment_endOfLine_beforeNode() {
618 addTestSource('''
619 main(aaa, bbb) {
620 // text ^
621 print(42);
622 }
623 ''');
624 expect(computeFast(), isTrue);
625 assertNoSuggestions();
626 }
627
628 test_inComment_endOfLine_beforeToken() {
629 addTestSource('''
630 main(aaa, bbb) {
631 // text ^
632 }
633 ''');
634 expect(computeFast(), isTrue);
635 assertNoSuggestions();
636 }
637
606 test_InstanceCreationExpression() { 638 test_InstanceCreationExpression() {
607 addTestSource(''' 639 addTestSource('''
608 class A {foo(){var f; {var x;}}} 640 class A {foo(){var f; {var x;}}}
609 class B {B(this.x, [String boo]) { } int x;} 641 class B {B(this.x, [String boo]) { } int x;}
610 class C {C.bar({boo: 'hoo', int z: 0}) { } } 642 class C {C.bar({boo: 'hoo', int z: 0}) { } }
611 main() {new ^ String x = "hello";}'''); 643 main() {new ^ String x = "hello";}''');
612 computeFast(); 644 computeFast();
613 return computeFull((bool result) { 645 return computeFull((bool result) {
614 CompletionSuggestion suggestion; 646 CompletionSuggestion suggestion;
615 647
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 assertSuggestLocalVariable('ab', null); 839 assertSuggestLocalVariable('ab', null);
808 assertSuggestLocalVariable('_ab', null, relevance: DART_RELEVANCE_DEFAULT); 840 assertSuggestLocalVariable('_ab', null, relevance: DART_RELEVANCE_DEFAULT);
809 } 841 }
810 842
811 test_shadowed_name() { 843 test_shadowed_name() {
812 addTestSource('var a; class A { var a; m() { ^ } }'); 844 addTestSource('var a; class A { var a; m() { ^ } }');
813 expect(computeFast(), isTrue); 845 expect(computeFast(), isTrue);
814 assertSuggestLocalField('a', null); 846 assertSuggestLocalField('a', null);
815 } 847 }
816 } 848 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/services/completion/keyword_contributor_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698