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

Side by Side Diff: pkg/analyzer/test/src/summary/resynthesize_common.dart

Issue 2997473002: Add documentation comments for enum and enum values. Resynthesize in analyzer. (Closed)
Patch Set: Created 3 years, 4 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/analyzer/test/src/summary/resynthesize_kernel_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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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.src.serialization.elements_test; 5 library test.src.serialization.elements_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/ast/standard_resolution_map.dart'; 10 import 'package:analyzer/dart/ast/standard_resolution_map.dart';
(...skipping 5222 matching lines...) Expand 10 before | Expand all | Expand 10 after
5233 synthetic static const List<E> values; 5233 synthetic static const List<E> values;
5234 static const E v; 5234 static const E v;
5235 } 5235 }
5236 '''); 5236 ''');
5237 } 5237 }
5238 5238
5239 test_enum_value_documented() async { 5239 test_enum_value_documented() async {
5240 var library = await checkLibrary(''' 5240 var library = await checkLibrary('''
5241 enum E { 5241 enum E {
5242 /** 5242 /**
5243 * Docs 5243 * aaa
5244 */ 5244 */
5245 v 5245 a,
5246 /// bbb
5247 b
5246 }'''); 5248 }''');
5247 checkElementText(library, r''' 5249 checkElementText(library, r'''
5248 enum E { 5250 enum E {
5249 synthetic final int index; 5251 synthetic final int index;
5250 synthetic static const List<E> values; 5252 synthetic static const List<E> values;
5251 /** 5253 /**
5252 * Docs 5254 * aaa
5253 */ 5255 */
5254 static const E v; 5256 static const E a;
5257 /// bbb
5258 static const E b;
5255 } 5259 }
5256 '''); 5260 ''');
5257 } 5261 }
5258 5262
5259 test_enum_values() async { 5263 test_enum_values() async {
5260 var library = await checkLibrary('enum E { v1, v2 }'); 5264 var library = await checkLibrary('enum E { v1, v2 }');
5261 checkElementText(library, r''' 5265 checkElementText(library, r'''
5262 enum E { 5266 enum E {
5263 synthetic final int index; 5267 synthetic final int index;
5264 synthetic static const List<E> values; 5268 synthetic static const List<E> values;
(...skipping 4819 matching lines...) Expand 10 before | Expand all | Expand 10 after
10084 fail('Unexpectedly tried to get unlinked summary for $uri'); 10088 fail('Unexpectedly tried to get unlinked summary for $uri');
10085 } 10089 }
10086 return serializedUnit; 10090 return serializedUnit;
10087 } 10091 }
10088 10092
10089 @override 10093 @override
10090 bool hasLibrarySummary(String uri) { 10094 bool hasLibrarySummary(String uri) {
10091 return true; 10095 return true;
10092 } 10096 }
10093 } 10097 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/src/summary/resynthesize_kernel_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698