Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Side by Side Diff: pkg/analysis_server/test/analysis/get_hover_test.dart

Issue 2394683006: Switch analysis_server to use 'package:test'. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698