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

Side by Side Diff: pkg/analysis_server/test/services/completion/completion_test_util.dart

Issue 832343002: fix top level getter suggestions (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 5 years, 11 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
« no previous file with comments | « pkg/analysis_server/lib/src/services/completion/local_computer.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after
1083 class H { } 1083 class H { }
1084 int T3; 1084 int T3;
1085 var _T4;'''); // not imported 1085 var _T4;'''); // not imported
1086 addTestSource(''' 1086 addTestSource('''
1087 import "/testAB.dart"; 1087 import "/testAB.dart";
1088 import "/testCD.dart" hide D; 1088 import "/testCD.dart" hide D;
1089 import "/testEEF.dart" show EE; 1089 import "/testEEF.dart" show EE;
1090 import "/testG.dart" as g; 1090 import "/testG.dart" as g;
1091 int T5; 1091 int T5;
1092 var _T6; 1092 var _T6;
1093 String get T7 => 'hello';
1093 Z D2() {int x;} 1094 Z D2() {int x;}
1094 class X { 1095 class X {
1095 a() { 1096 a() {
1096 var f; 1097 var f;
1097 localF(int arg1) { } 1098 localF(int arg1) { }
1098 {var x;} 1099 {var x;}
1099 ^ var r; 1100 ^ var r;
1100 } 1101 }
1101 void b() { }} 1102 void b() { }}
1102 class Z { }'''); 1103 class Z { }''');
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
1135 // 'num', 1136 // 'num',
1136 // false, 1137 // false,
1137 // CompletionRelevance.LOW); 1138 // CompletionRelevance.LOW);
1138 assertSuggestTopLevelVarGetterSetter('T1', 'String'); 1139 assertSuggestTopLevelVarGetterSetter('T1', 'String');
1139 assertNotSuggested('_T2'); 1140 assertNotSuggested('_T2');
1140 //assertSuggestImportedTopLevelVar('T3', 'int', CompletionRelevance.LOW); 1141 //assertSuggestImportedTopLevelVar('T3', 'int', CompletionRelevance.LOW);
1141 assertNotSuggested('_T4'); 1142 assertNotSuggested('_T4');
1142 assertSuggestLocalTopLevelVar('T5', 'int'); 1143 assertSuggestLocalTopLevelVar('T5', 'int');
1143 assertSuggestLocalTopLevelVar('_T6', null); 1144 assertSuggestLocalTopLevelVar('_T6', null);
1144 assertNotSuggested('=='); 1145 assertNotSuggested('==');
1146 assertSuggestLocalGetter('T7', 'String');
1145 // TODO (danrubel) suggest HtmlElement as low relevance 1147 // TODO (danrubel) suggest HtmlElement as low relevance
1146 assertNotSuggested('HtmlElement'); 1148 assertNotSuggested('HtmlElement');
1147 }); 1149 });
1148 } 1150 }
1149 1151
1150 test_Block_identifier_partial() { 1152 test_Block_identifier_partial() {
1151 addSource('/testAB.dart', ''' 1153 addSource('/testAB.dart', '''
1152 export "dart:math" hide max; 1154 export "dart:math" hide max;
1153 class A {int x;} 1155 class A {int x;}
1154 @deprecated D1() {int x;} 1156 @deprecated D1() {int x;}
(...skipping 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after
2494 assertNotSuggested('bar2'); 2496 assertNotSuggested('bar2');
2495 assertNotSuggested('_B'); 2497 assertNotSuggested('_B');
2496 assertSuggestLocalClass('Y'); 2498 assertSuggestLocalClass('Y');
2497 assertSuggestLocalClass('C'); 2499 assertSuggestLocalClass('C');
2498 assertSuggestLocalVariable('f', null); 2500 assertSuggestLocalVariable('f', null);
2499 assertNotSuggested('x'); 2501 assertNotSuggested('x');
2500 assertNotSuggested('e'); 2502 assertNotSuggested('e');
2501 }); 2503 });
2502 } 2504 }
2503 } 2505 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/services/completion/local_computer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698