| 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/plugin/protocol/protocol.dart'; | 9 import 'package:analysis_server/plugin/protocol/protocol.dart'; |
| 10 import 'package:test/test.dart'; |
| 10 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 11 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
| 11 import 'package:unittest/unittest.dart'; | |
| 12 | 12 |
| 13 import '../analysis_abstract.dart'; | 13 import '../analysis_abstract.dart'; |
| 14 import '../utils.dart'; | 14 import '../utils.dart'; |
| 15 | 15 |
| 16 main() { | 16 main() { |
| 17 initializeTestEnvironment(); | 17 initializeTestEnvironment(); |
| 18 defineReflectiveTests(AnalysisHoverTest); | 18 defineReflectiveSuite(() { |
| 19 defineReflectiveTests(AnalysisHoverTest); |
| 20 }); |
| 19 } | 21 } |
| 20 | 22 |
| 21 @reflectiveTest | 23 @reflectiveTest |
| 22 class AnalysisHoverTest extends AbstractAnalysisTest { | 24 class AnalysisHoverTest extends AbstractAnalysisTest { |
| 23 Future<HoverInformation> prepareHover(String search) { | 25 Future<HoverInformation> prepareHover(String search) { |
| 24 int offset = findOffset(search); | 26 int offset = findOffset(search); |
| 25 return prepareHoverAt(offset); | 27 return prepareHoverAt(offset); |
| 26 } | 28 } |
| 27 | 29 |
| 28 Future<HoverInformation> prepareHoverAt(int offset) async { | 30 Future<HoverInformation> prepareHoverAt(int offset) async { |
| (...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 addTestFile(''' | 482 addTestFile(''' |
| 481 library my.library; | 483 library my.library; |
| 482 main() { | 484 main() { |
| 483 // nothing | 485 // nothing |
| 484 } | 486 } |
| 485 '''); | 487 '''); |
| 486 HoverInformation hover = await prepareHover('nothing'); | 488 HoverInformation hover = await prepareHover('nothing'); |
| 487 expect(hover, isNull); | 489 expect(hover, isNull); |
| 488 } | 490 } |
| 489 } | 491 } |
| OLD | NEW |