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

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

Issue 1033333003: improve parser recovery for incomplete prefixed identifier in method/function parameter list (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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 | « no previous file | pkg/analysis_server/test/services/completion/completion_test_util.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/services/completion/completion_target_test.dart
diff --git a/pkg/analysis_server/test/services/completion/completion_target_test.dart b/pkg/analysis_server/test/services/completion/completion_target_test.dart
index 0bf95cf995c3bec72648fd83375475143727fe23..e673466207bf48bd6c9f29415f8fdd7fd96feb0e 100644
--- a/pkg/analysis_server/test/services/completion/completion_target_test.dart
+++ b/pkg/analysis_server/test/services/completion/completion_target_test.dart
@@ -138,6 +138,30 @@ class CompletionTargetTest extends AbstractContextTest {
assertTarget('}', '{}');
}
+ test_FormalParameter_partialType() {
+ // SimpleIdentifier PrefixedIdentifier TypeName
+ addTestSource('foo(b.^ f) { }');
+ assertTarget('f', 'b.f');
+ }
+
+ test_FormalParameter_partialType2() {
+ // SimpleIdentifier PrefixedIdentifier TypeName
+ addTestSource('foo(b.z^ f) { }');
+ assertTarget('z', 'b.z');
+ }
+
+ test_FormalParameter_partialType3() {
+ // SimpleIdentifier PrefixedIdentifier TypeName
+ addTestSource('foo(b.^) { }');
+ assertTarget('', 'b.');
+ }
+
+ test_FormalParameterList() {
+ // Token FormalParameterList FunctionExpression
+ addTestSource('foo(^) { }');
+ assertTarget(')', '()');
+ }
+
test_FunctionDeclaration_inLineComment() {
// Comment CompilationUnit
addTestSource('''
« no previous file with comments | « no previous file | pkg/analysis_server/test/services/completion/completion_test_util.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698