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.domain.analysis.hover; | 5 library test.domain.analysis.hover; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 import 'package:analysis_server/protocol/protocol.dart'; | 9 import 'package:analysis_server/protocol/protocol.dart'; |
10 import 'package:analysis_server/protocol/protocol_generated.dart'; | 10 import 'package:analysis_server/protocol/protocol_generated.dart'; |
(...skipping 20 matching lines...) Expand all Loading... |
31 Request request = | 31 Request request = |
32 new AnalysisGetHoverParams(testFile, offset).toRequest('0'); | 32 new AnalysisGetHoverParams(testFile, offset).toRequest('0'); |
33 Response response = await waitResponse(request); | 33 Response response = await waitResponse(request); |
34 var result = new AnalysisGetHoverResult.fromResponse(response); | 34 var result = new AnalysisGetHoverResult.fromResponse(response); |
35 List<HoverInformation> hovers = result.hovers; | 35 List<HoverInformation> hovers = result.hovers; |
36 return hovers.isNotEmpty ? hovers.first : null; | 36 return hovers.isNotEmpty ? hovers.first : null; |
37 } | 37 } |
38 | 38 |
39 @override | 39 @override |
40 void setUp() { | 40 void setUp() { |
| 41 enableNewAnalysisDriver = true; |
41 super.setUp(); | 42 super.setUp(); |
42 createProject(); | 43 createProject(); |
43 } | 44 } |
44 | 45 |
45 test_class() async { | 46 test_class() async { |
46 addTestFile(''' | 47 addTestFile(''' |
47 class A<E> {} | 48 class A<E> {} |
48 class I1<K, V> {} | 49 class I1<K, V> {} |
49 class I2<E> {} | 50 class I2<E> {} |
50 class M1 {} | 51 class M1 {} |
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
523 addTestFile(''' | 524 addTestFile(''' |
524 library my.library; | 525 library my.library; |
525 main() { | 526 main() { |
526 // nothing | 527 // nothing |
527 } | 528 } |
528 '''); | 529 '''); |
529 HoverInformation hover = await prepareHover('nothing'); | 530 HoverInformation hover = await prepareHover('nothing'); |
530 expect(hover, isNull); | 531 expect(hover, isNull); |
531 } | 532 } |
532 } | 533 } |
OLD | NEW |