OLD | NEW |
| (Empty) |
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 | |
3 // BSD-style license that can be found in the LICENSE file. | |
4 | |
5 library test.services.completion.invocation; | |
6 | |
7 | |
8 import 'package:analysis_services/src/completion/invocation_computer.dart'; | |
9 import 'package:analysis_testing/reflective_tests.dart'; | |
10 import 'package:unittest/unittest.dart'; | |
11 | |
12 import 'completion_test_util.dart'; | |
13 | |
14 main() { | |
15 groupSep = ' | '; | |
16 runReflectiveTests(InvocationComputerTest); | |
17 } | |
18 | |
19 @ReflectiveTestCase() | |
20 class InvocationComputerTest extends AbstractCompletionTest { | |
21 | |
22 @override | |
23 void setUp() { | |
24 super.setUp(); | |
25 computer = new InvocationComputer(); | |
26 } | |
27 | |
28 test_field() { | |
29 addTestSource('class A {A b;} main() {A a; a.^}'); | |
30 return computeFull().then((_) { | |
31 assertSuggestField('b'); | |
32 }); | |
33 } | |
34 | |
35 test_getter() { | |
36 addTestSource('class A {A get b => new A();} main() {A a; a.^}'); | |
37 return computeFull().then((_) { | |
38 assertSuggestGetter('b'); | |
39 }); | |
40 } | |
41 | |
42 test_method() { | |
43 addTestSource('class A {b(X x) {}} main() {A a; a.^}'); | |
44 return computeFull().then((_) { | |
45 assertSuggestMethod('b'); | |
46 }); | |
47 } | |
48 | |
49 test_setter() { | |
50 addTestSource('class A {set b(X x) {}} main() {A a; a.^}'); | |
51 return computeFull().then((_) { | |
52 assertSuggestSetter('b'); | |
53 }); | |
54 } | |
55 } | |
OLD | NEW |