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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library test.services.completion.util; 5 library test.services.completion.util;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/src/protocol.dart' as protocol show Element, 9 import 'package:analysis_server/src/protocol.dart' as protocol show Element,
10 ElementKind; 10 ElementKind;
(...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after
971 class X {X.c(); X._d(); z() {}}'''); 971 class X {X.c(); X._d(); z() {}}''');
972 addTestSource(''' 972 addTestSource('''
973 import "/testB.dart"; 973 import "/testB.dart";
974 class Y {Y.c(); Y._d(); z() {}} 974 class Y {Y.c(); Y._d(); z() {}}
975 main() {var ^}'''); 975 main() {var ^}''');
976 computeFast(); 976 computeFast();
977 return computeFull(true).then((_) { 977 return computeFull(true).then((_) {
978 assertNoSuggestions(); 978 assertNoSuggestions();
979 }); 979 });
980 } 980 }
981
982 test_BinaryExpression_LHS() {
983 // SimpleIdentifier BinaryExpression VariableDeclaration
984 // VariableDeclarationList VariableDeclarationStatement
985 addTestSource('main() {int a = 1, b = ^ + 2;}');
986 computeFast();
987 return computeFull(true).then((_) {
988 assertSuggestLocalVariable('a', 'int');
989 assertSuggestImportedClass('Object');
990 assertNotSuggested('b');
991 });
992 }
993
994 test_BinaryExpression_RHS() {
995 // SimpleIdentifier BinaryExpression VariableDeclaration
996 // VariableDeclarationList VariableDeclarationStatement
997 addTestSource('main() {int a = 1, b = 2 + ^;}');
998 computeFast();
999 return computeFull(true).then((_) {
1000 assertSuggestLocalVariable('a', 'int');
1001 assertSuggestImportedClass('Object');
1002 assertNotSuggested('b');
1003 });
1004 }
981 } 1005 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698