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

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

Issue 2868353002: Enable analysis driver in tests where possible (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « no previous file | pkg/analysis_server/test/domain_analysis_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/test/domain_analysis_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698