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

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

Issue 1529593002: Fix for enum signatures. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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/analyzer/lib/src/dart/element/element.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/plugin/protocol/protocol.dart'; 9 import 'package:analysis_server/plugin/protocol/protocol.dart';
10 import 'package:test_reflective_loader/test_reflective_loader.dart'; 10 import 'package:test_reflective_loader/test_reflective_loader.dart';
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 library my.library; 89 library my.library;
90 /// doc aaa 90 /// doc aaa
91 /// doc bbb 91 /// doc bbb
92 main() { 92 main() {
93 } 93 }
94 '''); 94 ''');
95 HoverInformation hover = await prepareHover('main() {'); 95 HoverInformation hover = await prepareHover('main() {');
96 expect(hover.dartdoc, '''doc aaa\ndoc bbb'''); 96 expect(hover.dartdoc, '''doc aaa\ndoc bbb''');
97 } 97 }
98 98
99 test_enum() async {
100 addTestFile('''
101 enum MyEnum {AAA, BBB, CCC}
102 ''');
103 HoverInformation hover = await prepareHover('MyEnum');
104 expect(hover.elementDescription, 'enum MyEnum');
105 expect(hover.staticType, isNull);
106 expect(hover.propagatedType, isNull);
107 }
108
99 test_expression_function() async { 109 test_expression_function() async {
100 addTestFile(''' 110 addTestFile('''
101 library my.library; 111 library my.library;
102 /// doc aaa 112 /// doc aaa
103 /// doc bbb 113 /// doc bbb
104 List<String> fff(int a, String b) { 114 List<String> fff(int a, String b) {
105 } 115 }
106 '''); 116 ''');
107 HoverInformation hover = await prepareHover('fff(int a'); 117 HoverInformation hover = await prepareHover('fff(int a');
108 // element 118 // element
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 addTestFile(''' 394 addTestFile('''
385 library my.library; 395 library my.library;
386 main() { 396 main() {
387 // nothing 397 // nothing
388 } 398 }
389 '''); 399 ''');
390 HoverInformation hover = await prepareHover('nothing'); 400 HoverInformation hover = await prepareHover('nothing');
391 expect(hover, isNull); 401 expect(hover, isNull);
392 } 402 }
393 } 403 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/element/element.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698