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

Unified Diff: pkg/analysis_server/test/services/completion/keyword_contributor_test.dart

Issue 1360123003: only suggest rethrow inside catch block - fixes #24214 (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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/lib/src/services/completion/keyword_contributor.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/keyword_contributor_test.dart
diff --git a/pkg/analysis_server/test/services/completion/keyword_contributor_test.dart b/pkg/analysis_server/test/services/completion/keyword_contributor_test.dart
index bf3c027f3d80f27ce01b6075a8666663dbec6aee..882efd911a78ef58f18bcd1edb24c93d25c8bd7e 100644
--- a/pkg/analysis_server/test/services/completion/keyword_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/keyword_contributor_test.dart
@@ -85,7 +85,6 @@ class KeywordContributorTest extends AbstractCompletionTest {
Keyword.FOR,
Keyword.IF,
Keyword.NEW,
- Keyword.RETHROW,
Keyword.RETURN,
Keyword.SUPER,
Keyword.SWITCH,
@@ -107,7 +106,6 @@ class KeywordContributorTest extends AbstractCompletionTest {
Keyword.FOR,
Keyword.IF,
Keyword.NEW,
- Keyword.RETHROW,
Keyword.RETURN,
Keyword.SUPER,
Keyword.SWITCH,
@@ -130,7 +128,6 @@ class KeywordContributorTest extends AbstractCompletionTest {
Keyword.FOR,
Keyword.IF,
Keyword.NEW,
- Keyword.RETHROW,
Keyword.RETURN,
Keyword.SUPER,
Keyword.SWITCH,
@@ -153,7 +150,6 @@ class KeywordContributorTest extends AbstractCompletionTest {
Keyword.FOR,
Keyword.IF,
Keyword.NEW,
- Keyword.RETHROW,
Keyword.RETURN,
Keyword.SWITCH,
Keyword.THROW,
@@ -171,7 +167,6 @@ class KeywordContributorTest extends AbstractCompletionTest {
Keyword.FOR,
Keyword.IF,
Keyword.NEW,
- Keyword.RETHROW,
Keyword.RETURN,
Keyword.SWITCH,
Keyword.THROW,
@@ -191,7 +186,6 @@ class KeywordContributorTest extends AbstractCompletionTest {
Keyword.FOR,
Keyword.IF,
Keyword.NEW,
- Keyword.RETHROW,
Keyword.RETURN,
Keyword.SWITCH,
Keyword.THROW,
@@ -613,6 +607,16 @@ class KeywordContributorTest extends AbstractCompletionTest {
relevance: DART_RELEVANCE_KEYWORD);
}
+ test_catch() {
+ addTestSource('main() {try {} catch (e) {^}}}');
+ expect(computeFast(), isTrue);
+ var keywords = <Keyword>[];
+ keywords.addAll(STMT_START_OUTSIDE_CLASS);
+ keywords.add(Keyword.RETHROW);
+ assertSuggestKeywords(keywords,
+ relevance: DART_RELEVANCE_KEYWORD);
+ }
+
test_for_break_continue2() {
addTestSource('class A {foo() {for (int x in myList) {^}}}');
expect(computeFast(), isTrue);
« no previous file with comments | « pkg/analysis_server/lib/src/services/completion/keyword_contributor.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698