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

Side by Side Diff: pkg/analysis_server/test/completion_test.dart

Issue 1001143002: remove duplicate completion suggestions (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge 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 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.completion.support; 5 library test.completion.support;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 9
10 import 'package:unittest/unittest.dart'; 10 import 'package:unittest/unittest.dart';
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 buildTests('testCommentSnippets004', ''' 64 buildTests('testCommentSnippets004', '''
65 class A {!1int x; !2mth() {!3int y = this.!5x!6;}}class B{}''', 65 class A {!1int x; !2mth() {!3int y = this.!5x!6;}}class B{}''',
66 <String>["1+A", "2+B", "3+x", "3-y", "5+mth", "6+x"]); 66 <String>["1+A", "2+B", "3+x", "3-y", "5+mth", "6+x"]);
67 67
68 buildTests('testCommentSnippets005', ''' 68 buildTests('testCommentSnippets005', '''
69 class Date { static Date JUN, JUL;}class X { m() { return Da!1te.JU!2L; }}''', 69 class Date { static Date JUN, JUL;}class X { m() { return Da!1te.JU!2L; }}''',
70 <String>["1+Date", "2+JUN", "2+JUL"]); 70 <String>["1+Date", "2+JUN", "2+JUL"]);
71 71
72 buildTests('testCommentSnippets007', ''' 72 buildTests('testCommentSnippets007', '''
73 class C {mth(Map x, !1) {}mtf(!2, Map x) {}m() {for (in!3t i=0; i<5; i++); A!4 x ;}}class int{}class Arrays{}''', 73 class C {mth(Map x, !1) {}mtf(!2, Map x) {}m() {for (in!3t i=0; i<5; i++); A!4 x ;}}class int{}class Arrays{}''',
74 <String>["1+bool", "2+bool", "3+int", "4+Arrays"], failingTests: '3'); 74 <String>["1+bool", "2+bool", "3+int", "4+Arrays"]);
75 75
76 buildTests('testCommentSnippets008', ''' 76 buildTests('testCommentSnippets008', '''
77 class Date{}final num M = Dat!1''', <String>["1+Date"]); 77 class Date{}final num M = Dat!1''', <String>["1+Date"]);
78 78
79 // space, char, eol are important 79 // space, char, eol are important
80 buildTests('testCommentSnippets009', ''' 80 buildTests('testCommentSnippets009', '''
81 class Maps{}class x extends!5 !2M!3 !4implements!6 !1\n{}''', <String>[ 81 class Maps{}class x extends!5 !2M!3 !4implements!6 !1\n{}''', <String>[
82 "1+Map", 82 "1+Map",
83 "2+Maps", 83 "2+Maps",
84 "3+Maps", 84 "3+Maps",
(...skipping 26 matching lines...) Expand all
111 buildTests('testCommentSnippets015', ''' 111 buildTests('testCommentSnippets015', '''
112 class D {f(){} g(){f!1(f!2);}}''', <String>["1+f", "2+f"]); 112 class D {f(){} g(){f!1(f!2);}}''', <String>["1+f", "2+f"]);
113 113
114 buildTests('testCommentSnippets016', ''' 114 buildTests('testCommentSnippets016', '''
115 class F {m() { m(); !1}}''', <String>["1+m"]); 115 class F {m() { m(); !1}}''', <String>["1+m"]);
116 116
117 buildTests('testCommentSnippets017', ''' 117 buildTests('testCommentSnippets017', '''
118 class F {var x = !1false;}''', <String>["1+true"], failingTests: '1'); 118 class F {var x = !1false;}''', <String>["1+true"], failingTests: '1');
119 119
120 buildTests('testCommentSnippets018', ''' 120 buildTests('testCommentSnippets018', '''
121 class Map{}class Arrays{}class C{ m(!1){} n(!2 x, q)''', <String>[ 121 class Map{}class Arrays{}class C{ m(!1){} n(!2 x, q)''',
122 "1+Map", 122 <String>["1+Map", "1-void", "1-null", "2+Arrays", "2-void", "2-null"]);
123 "1-void",
124 "1-null",
125 "2+Arrays",
126 "2-void",
127 "2-null"
128 ], failingTests: '1');
129 123
130 buildTests('testCommentSnippets019', ''' 124 buildTests('testCommentSnippets019', '''
131 class A{m(){Object x;x.!1/**/clear()''', <String>["1+toString"]); 125 class A{m(){Object x;x.!1/**/clear()''', <String>["1+toString"]);
132 126
133 buildTests('testCommentSnippets020', ''' 127 buildTests('testCommentSnippets020', '''
134 classMap{}class tst {var newt;void newf(){}test() {var newz;new!1/**/;}}''', 128 classMap{}class tst {var newt;void newf(){}test() {var newz;new!1/**/;}}''',
135 <String>["1+newt", "1+newf", "1+newz", "1-Map"]); 129 <String>["1+newt", "1+newf", "1+newz", "1-Map"]);
136 130
137 buildTests('testCommentSnippets021', ''' 131 buildTests('testCommentSnippets021', '''
138 class Map{}class tst {var newt;void newf(){}test() {var newz;new !1/**/;}}''', 132 class Map{}class tst {var newt;void newf(){}test() {var newz;new !1/**/;}}''',
139 <String>["1+Map", "1-newt"], failingTests: '1'); 133 <String>["1+Map", "1-newt"]);
140 134
141 buildTests('testCommentSnippets022', ''' 135 buildTests('testCommentSnippets022', '''
142 class Map{}class F{m(){new !1;}}''', <String>["1+Map"], failingTests: '1'); 136 class Map{}class F{m(){new !1;}}''', <String>["1+Map"]);
143 137
144 buildTests('testCommentSnippets022a', ''' 138 buildTests('testCommentSnippets022a', '''
145 class Map{}class F{m(){new !1''', <String>["1+Map"], failingTests: '1'); 139 class Map{}class F{m(){new !1''', <String>["1+Map"]);
146 140
147 buildTests('testCommentSnippets022b', ''' 141 buildTests('testCommentSnippets022b', '''
148 class Map{factory Map.qq(){return null;}}class F{m(){new Map.!1qq();}}''', 142 class Map{factory Map.qq(){return null;}}class F{m(){new Map.!1qq();}}''',
149 <String>["1+qq"]); 143 <String>["1+qq"]);
150 144
151 buildTests('testCommentSnippets023', ''' 145 buildTests('testCommentSnippets023', '''
152 class X {X c; X(this.!1c!3) : super() {c.!2}}''', 146 class X {X c; X(this.!1c!3) : super() {c.!2}}''',
153 <String>["1+c", "2+c", "3+c"], failingTests: '13'); 147 <String>["1+c", "2+c", "3+c"]);
154 148
155 buildTests('testCommentSnippets024', ''' 149 buildTests('testCommentSnippets024', '''
156 class q {m(Map q){var x;m(!1)}n(){var x;n(!2)}}''', <String>["1+x", "2+x"]); 150 class q {m(Map q){var x;m(!1)}n(){var x;n(!2)}}''', <String>["1+x", "2+x"]);
157 151
158 buildTests('testCommentSnippets025', ''' 152 buildTests('testCommentSnippets025', '''
159 class q {num m() {var q; num x=!1 q!3 + !2/**/;}}''', 153 class q {num m() {var q; num x=!1 q!3 + !2/**/;}}''',
160 <String>["1+q", "2+q", "3+q"], failingTests: '123'); 154 <String>["1+q", "2+q", "3+q"]);
161 155
162 buildTests('testCommentSnippets026', ''' 156 buildTests('testCommentSnippets026', '''
163 class List{}class a implements !1{}''', <String>["1+List"], failingTests: '1'); 157 class List{}class a implements !1{}''', <String>["1+List"]);
164 158
165 buildTests('testCommentSnippets027', ''' 159 buildTests('testCommentSnippets027', '''
166 class String{}class List{}class test <X extends !1String!2> {}''', 160 class String{}class List{}class test <X extends !1String!2> {}''',
167 <String>["1+List", "2+String", "2-List"], failingTests: '12'); 161 <String>["1+List", "2+String", "2-List"]);
168 162
169 buildTests('testCommentSnippets028', ''' 163 buildTests('testCommentSnippets028', '''
170 class String{}class List{}class DateTime{}typedef T Y<T extends !1>(List input); ''', 164 class String{}class List{}class DateTime{}typedef T Y<T extends !1>(List input); ''',
171 <String>["1+DateTime", "1+String"], failingTests: '1'); 165 <String>["1+DateTime", "1+String"]);
172 166
173 buildTests('testCommentSnippets029', ''' 167 buildTests('testCommentSnippets029', '''
174 interface A<X> default B<X extends !1List!2> {}''', 168 interface A<X> default B<X extends !1List!2> {}''',
175 <String>["1+DateTime", "2+List"]); 169 <String>["1+DateTime", "2+List"]);
176 170
177 buildTests('testCommentSnippets030', ''' 171 buildTests('testCommentSnippets030', '''
178 class Bar<T extends Foo> {const Bar(!1T!2 k);T!3 m(T!4 a, T!5 b){}final T!6 f = null;}''', 172 class Bar<T extends Foo> {const Bar(!1T!2 k);T!3 m(T!4 a, T!5 b){}final T!6 f = null;}''',
179 <String>["1+T", "2+T", "3+T", "4+T", "5+T", "6+T"], 173 <String>["1+T", "2+T", "3+T", "4+T", "5+T", "6+T"],
180 failingTests: '123456'); 174 failingTests: '123456');
181 175
182 buildTests('testCommentSnippets031', ''' 176 buildTests('testCommentSnippets031', '''
183 class Bar<T extends Foo> {m(x){if (x is !1) return;if (x is!!!2)}}''', 177 class Bar<T extends Foo> {m(x){if (x is !1) return;if (x is!!!2)}}''',
184 <String>["1+Bar", "1+T", "2+T", "2+Bar"], failingTests: '12'); 178 <String>["1+Bar", "1+T", "2+T", "2+Bar"], failingTests: '12');
185 179
186 buildTests('testCommentSnippets032', ''' 180 buildTests('testCommentSnippets032', '''
187 class Fit{}class Bar<T extends Fooa> {const !2F!1ara();}''', 181 class Fit{}class Bar<T extends Fooa> {const !2F!1ara();}''',
188 <String>["1+Fit", "1+Fara", "1-Bar", "2+Fit"], failingTests: '1'); 182 <String>["1+Fit", "1+Fara", "1-Bar", "2+Fit"], failingTests: '1');
189 183
190 // Type propagation 184 // Type propagation
191 buildTests('testCommentSnippets033', ''' 185 buildTests('testCommentSnippets033', '''
192 class List{add(){}length(){}}t1() {var x;if (x is List) {x.!1add(3);}}''', 186 class List{add(){}length(){}}t1() {var x;if (x is List) {x.!1add(3);}}''',
193 <String>["1+add", "1+length"]); 187 <String>["1+add", "1+length"]);
194 188
195 // Type propagation 189 // Type propagation
196 buildTests('testCommentSnippets035', ''' 190 buildTests('testCommentSnippets035', '''
197 class List{clear(){}length(){}}t3() {var x=new List(), y=x.!1length();x.!2clear( );}''', 191 class List{clear(){}length(){}}t3() {var x=new List(), y=x.!1length();x.!2clear( );}''',
198 <String>["1+length", "2+clear"]); 192 <String>["1+length", "2+clear"]);
199 193
200 buildTests('testCommentSnippets036', ''' 194 buildTests('testCommentSnippets036', '''
201 class List{}t3() {var x=new List!1}''', <String>["1+List"], failingTests: '1'); 195 class List{}t3() {var x=new List!1}''', <String>["1+List"]);
202 196
203 buildTests('testCommentSnippets037', ''' 197 buildTests('testCommentSnippets037', '''
204 class List{factory List.from(){}}t3() {var x=new List.!1}''', 198 class List{factory List.from(){}}t3() {var x=new List.!1}''',
205 <String>["1+from"]); 199 <String>["1+from"]);
206 200
207 buildTests('testCommentSnippets038', ''' 201 buildTests('testCommentSnippets038', '''
208 f(){int xa; String s = '\$x!1';}''', <String>["1+xa"]); 202 f(){int xa; String s = '\$x!1';}''', <String>["1+xa"]);
209 203
210 buildTests('testCommentSnippets038a', ''' 204 buildTests('testCommentSnippets038a', '''
211 int xa; String s = '\$x!1\'''', <String>["1+xa"]); 205 int xa; String s = '\$x!1\'''', <String>["1+xa"]);
(...skipping 14 matching lines...) Expand all
226 220
227 buildTests('testCommentSnippets042', ''' 221 buildTests('testCommentSnippets042', '''
228 class DateTime{static const int WED=3;int get day;}fd(){DateTime d=new DateTime. now();d.!1WED!2;}''', 222 class DateTime{static const int WED=3;int get day;}fd(){DateTime d=new DateTime. now();d.!1WED!2;}''',
229 <String>["1+day", "2-WED"]); 223 <String>["1+day", "2-WED"]);
230 224
231 buildTests('testCommentSnippets043', ''' 225 buildTests('testCommentSnippets043', '''
232 class L{var k;void.!1}''', <String>["1-k"]); 226 class L{var k;void.!1}''', <String>["1-k"]);
233 227
234 buildTests('testCommentSnippets044', ''' 228 buildTests('testCommentSnippets044', '''
235 class List{}class XXX {XXX.fisk();}main() {main(); new !1}}''', 229 class List{}class XXX {XXX.fisk();}main() {main(); new !1}}''',
236 <String>["1+List", "1+XXX.fisk"], failingTests: '1'); 230 <String>["1+List", "1+XXX.fisk"]);
237 231
238 buildTests('testCommentSnippets047', ''' 232 buildTests('testCommentSnippets047', '''
239 f(){int x;int y=!1;}''', <String>["1+x"]); 233 f(){int x;int y=!1;}''', <String>["1+x"]);
240 234
241 buildTests('testCommentSnippets048', ''' 235 buildTests('testCommentSnippets048', '''
242 import 'dart:convert' as json;f() {var x=new js!1}''', <String>["1+json"]); 236 import 'dart:convert' as json;f() {var x=new js!1}''', <String>["1+json"]);
243 237
244 buildTests('testCommentSnippets049', ''' 238 buildTests('testCommentSnippets049', '''
245 import 'dart:convert' as json; 239 import 'dart:convert' as json;
246 import 'dart:convert' as jxx; 240 import 'dart:convert' as jxx;
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 _x!1 586 _x!1
593 } 587 }
594 _x1(){} 588 _x1(){}
595 }''', <String>["1+_x1"]); 589 }''', <String>["1+_x1"]);
596 590
597 buildTests('testCommentSnippets075', ''' 591 buildTests('testCommentSnippets075', '''
598 p(x)=>0;var E;f(q)=>!1p(!2E);''', <String>["1+p", "2+E"]); 592 p(x)=>0;var E;f(q)=>!1p(!2E);''', <String>["1+p", "2+E"]);
599 593
600 buildTests('testCommentSnippets076', ''' 594 buildTests('testCommentSnippets076', '''
601 class Map<K,V>{}class List<E>{}class int{}main() {var m=new Map<Lis!1t<Map<int,i n!2t>>,List<!3int>>();}''', 595 class Map<K,V>{}class List<E>{}class int{}main() {var m=new Map<Lis!1t<Map<int,i n!2t>>,List<!3int>>();}''',
602 <String>["1+List", "2+int", "3+int"], failingTests: '123'); 596 <String>["1+List", "2+int", "3+int"]);
603 597
604 buildTests('testCommentSnippets076a', ''' 598 buildTests('testCommentSnippets076a', '''
605 class Map<K,V>{}class List<E>{}class int{}main() {var m=new Map<Lis!1t<Map<int,i n!2t>>,List<!3>>();}''', 599 class Map<K,V>{}class List<E>{}class int{}main() {var m=new Map<Lis!1t<Map<int,i n!2t>>,List<!3>>();}''',
606 <String>["1+List", "2+int", "3+int"], failingTests: '123'); 600 <String>["1+List", "2+int", "3+int"]);
607 601
608 buildTests('testCommentSnippets077', ''' 602 buildTests('testCommentSnippets077', '''
609 class FileMode { 603 class FileMode {
610 static const READ = const FileMode._internal(0); 604 static const READ = const FileMode._internal(0);
611 static const WRITE = const FileMode._internal(1); 605 static const WRITE = const FileMode._internal(1);
612 static const APPEND = const FileMode._internal(2); 606 static const APPEND = const FileMode._internal(2);
613 const FileMode._internal(int this._mode); 607 const FileMode._internal(int this._mode);
614 factory FileMode._internal1(int this._mode); 608 factory FileMode._internal1(int this._mode);
615 factory FileMode(_mode); 609 factory FileMode(_mode);
616 final int _mode; 610 final int _mode;
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
1020 "1-dart:_collection.dev" 1014 "1-dart:_collection.dev"
1021 ], failingTests: '1'); 1015 ], failingTests: '1');
1022 1016
1023 buildTests('testCompletion_export_noStringLiteral_noSemicolon', ''' 1017 buildTests('testCompletion_export_noStringLiteral_noSemicolon', '''
1024 import !1 1018 import !1
1025 1019
1026 class A {}''', <String>["1+'dart:!';", "1+'package:!';"], failingTests: '1'); 1020 class A {}''', <String>["1+'dart:!';", "1+'package:!';"], failingTests: '1');
1027 1021
1028 buildTests('testCompletion_forStmt_vars', ''' 1022 buildTests('testCompletion_forStmt_vars', '''
1029 class int{}class Foo { mth() { for (in!1t i = 0; i!2 < 5; i!3++); }}''', 1023 class int{}class Foo { mth() { for (in!1t i = 0; i!2 < 5; i!3++); }}''',
1030 <String>["1+int", "2+i", "3+i"], failingTests: '1'); 1024 <String>["1+int", "2+i", "3+i"]);
1031 1025
1032 buildTests('testCompletion_function', ''' 1026 buildTests('testCompletion_function', '''
1033 class Foo { int boo = 7; mth() { PNGS.sort((String a, Str!1) => a.compareTo(b)); }}''', 1027 class Foo { int boo = 7; mth() { PNGS.sort((String a, Str!1) => a.compareTo(b)); }}''',
1034 <String>["1+String"]); 1028 <String>["1+String"]);
1035 1029
1036 buildTests('testCompletion_function_partial', ''' 1030 buildTests('testCompletion_function_partial', '''
1037 class Foo { int boo = 7; mth() { PNGS.sort((String a, Str!1)); }}''', 1031 class Foo { int boo = 7; mth() { PNGS.sort((String a, Str!1)); }}''',
1038 <String>["1+String"]); 1032 <String>["1+String"]);
1039 1033
1040 buildTests('testCompletion_functionTypeParameter_namedArgument', ''' 1034 buildTests('testCompletion_functionTypeParameter_namedArgument', '''
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
1284 <String>["1+foo", "1-bar"], failingTests: '1'); 1278 <String>["1+foo", "1-bar"], failingTests: '1');
1285 1279
1286 buildTests('testCompletion_namedArgument_notNamed', ''' 1280 buildTests('testCompletion_namedArgument_notNamed', '''
1287 func([foo]) {} main() { func(fo!1); }''', <String>["1-foo"]); 1281 func([foo]) {} main() { func(fo!1); }''', <String>["1-foo"]);
1288 1282
1289 buildTests('testCompletion_namedArgument_unresolvedFunction', ''' 1283 buildTests('testCompletion_namedArgument_unresolvedFunction', '''
1290 main() { func(fo!1); }''', <String>["1-foo"]); 1284 main() { func(fo!1); }''', <String>["1-foo"]);
1291 1285
1292 buildTests('testCompletion_newMemberType1', ''' 1286 buildTests('testCompletion_newMemberType1', '''
1293 class Collection{}class List extends Collection{}class Foo { !1 }''', 1287 class Collection{}class List extends Collection{}class Foo { !1 }''',
1294 <String>["1+Collection", "1+List"], failingTests: '1'); 1288 <String>["1+Collection", "1+List"]);
1295 1289
1296 buildTests('testCompletion_newMemberType2', ''' 1290 buildTests('testCompletion_newMemberType2', '''
1297 class Collection{}class List extends Collection{}class Foo {!1}''', 1291 class Collection{}class List extends Collection{}class Foo {!1}''',
1298 <String>["1+Collection", "1+List"], failingTests: '1'); 1292 <String>["1+Collection", "1+List"]);
1299 1293
1300 buildTests('testCompletion_newMemberType3', ''' 1294 buildTests('testCompletion_newMemberType3', '''
1301 class Collection{}class List extends Collection{}class Foo {L!1}''', 1295 class Collection{}class List extends Collection{}class Foo {L!1}''',
1302 <String>["1-Collection", "1+List"], failingTests: '1'); 1296 <String>["1-Collection", "1+List"]);
1303 1297
1304 buildTests('testCompletion_newMemberType4', ''' 1298 buildTests('testCompletion_newMemberType4', '''
1305 class Collection{}class List extends Collection{}class Foo {C!1}''', 1299 class Collection{}class List extends Collection{}class Foo {C!1}''',
1306 <String>["1+Collection", "1-List"]); 1300 <String>["1+Collection", "1-List"]);
1307 1301
1308 buildTests('testCompletion_positionalArgument_constructor', ''' 1302 buildTests('testCompletion_positionalArgument_constructor', '''
1309 class A { 1303 class A {
1310 A([foo, bar]); 1304 A([foo, bar]);
1311 } 1305 }
1312 main() { 1306 main() {
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
1408 1402
1409 buildTests('testCompletion_return_withIdentifierPrefix', ''' 1403 buildTests('testCompletion_return_withIdentifierPrefix', '''
1410 f() { var vvv = 42; return v!1 }''', <String>["1+vvv"]); 1404 f() { var vvv = 42; return v!1 }''', <String>["1+vvv"]);
1411 1405
1412 buildTests('testCompletion_return_withoutExpression', ''' 1406 buildTests('testCompletion_return_withoutExpression', '''
1413 f() { var vvv = 42; return !1 }''', <String>["1+vvv"]); 1407 f() { var vvv = 42; return !1 }''', <String>["1+vvv"]);
1414 1408
1415 buildTests('testCompletion_staticField1', ''' 1409 buildTests('testCompletion_staticField1', '''
1416 class num{}class Sunflower {static final n!2um MAX_D = 300;nu!3m xc, yc;Sun!4flo wer() {x!Xc = y!Yc = MA!1 }}''', 1410 class num{}class Sunflower {static final n!2um MAX_D = 300;nu!3m xc, yc;Sun!4flo wer() {x!Xc = y!Yc = MA!1 }}''',
1417 <String>["1+MAX_D", "X+xc", "Y+yc", "2+num", "3+num", "4+Sunflower"], 1411 <String>["1+MAX_D", "X+xc", "Y+yc", "2+num", "3+num", "4+Sunflower"],
1418 failingTests: '23'); 1412 failingTests: '2');
1419 1413
1420 buildTests('testCompletion_super_superType', ''' 1414 buildTests('testCompletion_super_superType', '''
1421 class A { 1415 class A {
1422 var fa; 1416 var fa;
1423 ma() {} 1417 ma() {}
1424 } 1418 }
1425 class B extends A { 1419 class B extends A {
1426 var fb; 1420 var fb;
1427 mb() {} 1421 mb() {}
1428 main() { 1422 main() {
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
1493 class B extends A { 1487 class B extends A {
1494 var fb; 1488 var fb;
1495 mb() {} 1489 mb() {}
1496 main() { 1490 main() {
1497 this.!1 1491 this.!1
1498 } 1492 }
1499 }''', <String>["1+fa", "1+fb", "1+ma", "1+mb"]); 1493 }''', <String>["1+fa", "1+fb", "1+ma", "1+mb"]);
1500 1494
1501 buildTests('testCompletion_topLevelField_init2', ''' 1495 buildTests('testCompletion_topLevelField_init2', '''
1502 class DateTime{static var JUN;}final num M = Dat!1eTime.JUN;''', 1496 class DateTime{static var JUN;}final num M = Dat!1eTime.JUN;''',
1503 <String>["1+DateTime", "1-void"], failingTests: '1'); 1497 <String>["1+DateTime", "1-void"]);
1504 1498
1505 buildTests('testCompletion_while', ''' 1499 buildTests('testCompletion_while', '''
1506 class Foo { int boo = 7; mth() { while (b!1) {} }}''', <String>["1+boo"]); 1500 class Foo { int boo = 7; mth() { while (b!1) {} }}''', <String>["1+boo"]);
1507 } 1501 }
1508 1502
1509 void buildLibraryTests() { 1503 void buildLibraryTests() {
1510 Map<String, String> sources = new HashMap<String, String>(); 1504 Map<String, String> sources = new HashMap<String, String>();
1511 1505
1512 buildTests('test_export_ignoreIfThisLibraryExports', ''' 1506 buildTests('test_export_ignoreIfThisLibraryExports', '''
1513 export 'dart:math'; 1507 export 'dart:math';
(...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after
2296 } else { 2290 } else {
2297 ++expectedPassCount; 2291 ++expectedPassCount;
2298 tester(testName, () { 2292 tester(testName, () {
2299 CompletionTestCase test = new CompletionTestCase(); 2293 CompletionTestCase test = new CompletionTestCase();
2300 return test.runTest(spec, extraFiles); 2294 return test.runTest(spec, extraFiles);
2301 }); 2295 });
2302 } 2296 }
2303 } 2297 }
2304 } 2298 }
2305 } 2299 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698