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

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

Issue 1273773005: fix completion after dot-keyword - fixes #23882 (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: merge Created 5 years, 4 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
Index: pkg/analysis_server/test/services/completion/optype_test.dart
diff --git a/pkg/analysis_server/test/services/completion/optype_test.dart b/pkg/analysis_server/test/services/completion/optype_test.dart
index a6b99715f5c11698d9fe441654013ff25a391d0f..d3ff65dd97abadfe4a41c833c67b0ea8f9f7a175 100644
--- a/pkg/analysis_server/test/services/completion/optype_test.dart
+++ b/pkg/analysis_server/test/services/completion/optype_test.dart
@@ -43,14 +43,9 @@ class OpTypeTest {
visitor = new OpType.forCompletion(completionTarget, offset);
}
- void assertOpType(
- {bool prefixed: false,
- bool returnValue: false,
- bool typeNames: false,
- bool voidReturn: false,
- bool statementLabel: false,
- bool caseLabel: false,
- bool constructors: false}) {
+ void assertOpType({bool prefixed: false, bool returnValue: false,
+ bool typeNames: false, bool voidReturn: false, bool statementLabel: false,
+ bool caseLabel: false, bool constructors: false}) {
expect(visitor.includeReturnValueSuggestions, returnValue,
reason: 'returnValue');
expect(visitor.includeTypeNameSuggestions, typeNames, reason: 'typeNames');
@@ -243,6 +238,12 @@ class OpTypeTest {
assertOpType(returnValue: true, typeNames: true, voidReturn: true);
}
+ test_Block_keyword() {
+ addTestSource('class C { static C get instance => null; } main() {C.in^}');
+ assertOpType(
+ prefixed: true, returnValue: true, typeNames: true, voidReturn: true);
+ }
+
test_Break_after_label() {
addTestSource('main() { foo: while (true) { break foo ^ ; } }');
assertOpType(/* No valid completions */);

Powered by Google App Engine
This is Rietveld 408576698