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

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

Issue 635043002: show only type names in is expression RHS (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
« no previous file with comments | « pkg/analysis_server/test/services/completion/invocation_computer_test.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.dart.local; 5 library test.services.completion.dart.local;
6 6
7 import 'package:analysis_server/src/services/completion/local_computer.dart'; 7 import 'package:analysis_server/src/services/completion/local_computer.dart';
8 import 'package:unittest/unittest.dart'; 8 import 'package:unittest/unittest.dart';
9 9
10 import '../../reflective_tests.dart'; 10 import '../../reflective_tests.dart';
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 xtest_InstanceCreationExpression() { 305 xtest_InstanceCreationExpression() {
306 // SimpleIdentifier TypeName ConstructorName InstanceCreationExpression 306 // SimpleIdentifier TypeName ConstructorName InstanceCreationExpression
307 addTestSource('class A {a() {var f; {var x;} new ^}} class B { }'); 307 addTestSource('class A {a() {var f; {var x;} new ^}} class B { }');
308 expect(computeFast(), isTrue); 308 expect(computeFast(), isTrue);
309 assertSuggestClass('A'); 309 assertSuggestClass('A');
310 assertSuggestClass('B'); 310 assertSuggestClass('B');
311 assertNotSuggested('a'); 311 assertNotSuggested('a');
312 assertNotSuggested('f'); 312 assertNotSuggested('f');
313 assertNotSuggested('x'); 313 assertNotSuggested('x');
314 } 314 }
315
316 xtest_IsExpression_imported() {
317 // SimpleIdentifier TypeName IsExpression IfStatement
318 addSource('/testB.dart', '''
319 lib B;
320 class X {X.c(); X._d(); z() {}}''');
321 addTestSource('''
322 import "/testB.dart";
323 main() {var x; if (x is ^) { }}''');
324 return computeFull().then((_) {
325 assertNoSuggestions();
326 });
327 }
328
329 xtest_IsExpression_local() {
330 // SimpleIdentifier TypeName IsExpression IfStatement
331 addTestSource('''
332 class X {X.c(); X._d(); z() {}}
333 main() {var x; if (x is ^) { }}''');
334 return computeFull().then((_) {
335 assertSuggestConstructor('c');
336 assertNotSuggested('main');
337 assertNotSuggested('X');
338 assertNotSuggested('B');
339 assertNotSuggested('x');
340 });
341 }
342 } 315 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/services/completion/invocation_computer_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698