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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/services/completion/local_reference_contributor_test.dart
diff --git a/pkg/analysis_server/test/services/completion/local_reference_contributor_test.dart b/pkg/analysis_server/test/services/completion/local_reference_contributor_test.dart
index 28ceb3d75b42a4564ae5faaca98154a4288c72bb..700f414a015758b255ba199da2da7ffe0e4a4878 100644
--- a/pkg/analysis_server/test/services/completion/local_reference_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/local_reference_contributor_test.dart
@@ -603,6 +603,38 @@ class B extends A {
assertNotSuggested('MC');
}
+ test_inComment_block_beforeNode() {
+ addTestSource('''
+main(aaa, bbb) {
+ /* text ^ */
+ print(42);
+}
+''');
+ expect(computeFast(), isTrue);
+ assertNoSuggestions();
+ }
+
+ test_inComment_endOfLine_beforeNode() {
+ addTestSource('''
+main(aaa, bbb) {
+ // text ^
+ print(42);
+}
+''');
+ expect(computeFast(), isTrue);
+ assertNoSuggestions();
+ }
+
+ test_inComment_endOfLine_beforeToken() {
+ addTestSource('''
+main(aaa, bbb) {
+ // text ^
+}
+''');
+ expect(computeFast(), isTrue);
+ assertNoSuggestions();
+ }
+
test_InstanceCreationExpression() {
addTestSource('''
class A {foo(){var f; {var x;}}}
« 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