| OLD | NEW |
| 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.invocation; | 5 library test.services.completion.invocation; |
| 6 | 6 |
| 7 | 7 |
| 8 import 'dart:async'; | 8 import 'dart:async'; |
| 9 | 9 |
| 10 import 'package:analysis_server/src/protocol.dart'; | 10 import 'package:analysis_server/src/protocol.dart'; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 (CompletionSuggestion s) => s.completion == 'x').toList(); | 57 (CompletionSuggestion s) => s.completion == 'x').toList(); |
| 58 if (shouldBeShadowed) { | 58 if (shouldBeShadowed) { |
| 59 expect(suggestionsForX, hasLength(1)); | 59 expect(suggestionsForX, hasLength(1)); |
| 60 expect(suggestionsForX[0].declaringType, 'Derived'); | 60 expect(suggestionsForX[0].declaringType, 'Derived'); |
| 61 } else { | 61 } else { |
| 62 expect(suggestionsForX, hasLength(2)); | 62 expect(suggestionsForX, hasLength(2)); |
| 63 } | 63 } |
| 64 }); | 64 }); |
| 65 } | 65 } |
| 66 | 66 |
| 67 fail_test_PrefixedIdentifier_trailingStmt_const_untyped() { |
| 68 // SimpleIdentifier PrefixedIdentifier ExpressionStatement |
| 69 addTestSource('const g = "hello"; f() {g.^ int y = 0;}'); |
| 70 computeFast(); |
| 71 return computeFull((bool result) { |
| 72 assertSuggestInvocationGetter('length', 'int'); |
| 73 }); |
| 74 } |
| 75 |
| 67 @override | 76 @override |
| 68 void setUpComputer() { | 77 void setUpComputer() { |
| 69 computer = new InvocationComputer(); | 78 computer = new InvocationComputer(); |
| 70 } | 79 } |
| 71 | 80 |
| 72 test_generic_field() { | 81 test_generic_field() { |
| 73 addTestSource(''' | 82 addTestSource(''' |
| 74 class C<T> { | 83 class C<T> { |
| 75 T t; | 84 T t; |
| 76 } | 85 } |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 } | 495 } |
| 487 void test(Derived d) { | 496 void test(Derived d) { |
| 488 d.^ | 497 d.^ |
| 489 } | 498 } |
| 490 '''); | 499 '''); |
| 491 return computeFull((bool result) { | 500 return computeFull((bool result) { |
| 492 assertSuggestMethod('f', 'Base', 'void'); | 501 assertSuggestMethod('f', 'Base', 'void'); |
| 493 }); | 502 }); |
| 494 } | 503 } |
| 495 } | 504 } |
| OLD | NEW |