| 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; | |
| 42 super.setUp(); | 41 super.setUp(); |
| 43 createProject(); | 42 createProject(); |
| 44 } | 43 } |
| 45 | 44 |
| 46 test_class() async { | 45 test_class() async { |
| 47 addTestFile(''' | 46 addTestFile(''' |
| 48 class A<E> {} | 47 class A<E> {} |
| 49 class I1<K, V> {} | 48 class I1<K, V> {} |
| 50 class I2<E> {} | 49 class I2<E> {} |
| 51 class M1 {} | 50 class M1 {} |
| (...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 addTestFile(''' | 523 addTestFile(''' |
| 525 library my.library; | 524 library my.library; |
| 526 main() { | 525 main() { |
| 527 // nothing | 526 // nothing |
| 528 } | 527 } |
| 529 '''); | 528 '''); |
| 530 HoverInformation hover = await prepareHover('nothing'); | 529 HoverInformation hover = await prepareHover('nothing'); |
| 531 expect(hover, isNull); | 530 expect(hover, isNull); |
| 532 } | 531 } |
| 533 } | 532 } |
| OLD | NEW |