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

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

Issue 639183002: binary expression suggestion fix (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 6 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
Index: pkg/analysis_server/test/services/completion/completion_test_util.dart
diff --git a/pkg/analysis_server/test/services/completion/completion_test_util.dart b/pkg/analysis_server/test/services/completion/completion_test_util.dart
index 2153dfe0f9f8f4f2abfff8a57f97b00e1b12d93f..1255940a971e12c51c7d83ca0a9c0b8fcab4170f 100644
--- a/pkg/analysis_server/test/services/completion/completion_test_util.dart
+++ b/pkg/analysis_server/test/services/completion/completion_test_util.dart
@@ -978,4 +978,28 @@ class AbstractSelectorSuggestionTest extends AbstractCompletionTest {
assertNoSuggestions();
});
}
+
+ test_BinaryExpression_LHS() {
+ // SimpleIdentifier BinaryExpression VariableDeclaration
+ // VariableDeclarationList VariableDeclarationStatement
+ addTestSource('main() {int a = 1, b = ^ + 2;}');
+ computeFast();
+ return computeFull(true).then((_) {
+ assertSuggestLocalVariable('a', 'int');
+ assertSuggestImportedClass('Object');
+ assertNotSuggested('b');
+ });
+ }
+
+ test_BinaryExpression_RHS() {
+ // SimpleIdentifier BinaryExpression VariableDeclaration
+ // VariableDeclarationList VariableDeclarationStatement
+ addTestSource('main() {int a = 1, b = 2 + ^;}');
+ computeFast();
+ return computeFull(true).then((_) {
+ assertSuggestLocalVariable('a', 'int');
+ assertSuggestImportedClass('Object');
+ assertNotSuggested('b');
+ });
+ }
}

Powered by Google App Engine
This is Rietveld 408576698