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

Unified Diff: pkg/analysis_server/test/domain_completion_test.dart

Issue 803913003: fix named constructor completion (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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/domain_completion_test.dart
diff --git a/pkg/analysis_server/test/domain_completion_test.dart b/pkg/analysis_server/test/domain_completion_test.dart
index ecd6e259a964e6bc13a3425fb04d75e4b9050359..34246b7c6f16f0c817ad47dfb51be3037396c573 100644
--- a/pkg/analysis_server/test/domain_completion_test.dart
+++ b/pkg/analysis_server/test/domain_completion_test.dart
@@ -403,6 +403,16 @@ class CompletionTest extends AbstractAnalysisTest {
});
}
+ test_local_named_constructor() {
+ addTestFile('class A {A.c(); x() {new A.^}}');
+ return getSuggestions().then((_) {
+ expect(replacementOffset, equals(completionOffset));
+ expect(replacementLength, equals(0));
+ assertHasResult(CompletionSuggestionKind.INVOCATION, 'c');
+ assertNoResult('A');
+ });
+ }
+
test_locals() {
addTestFile('class A {var a; x() {var b;^}}');
return getSuggestions().then((_) {

Powered by Google App Engine
This is Rietveld 408576698