| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |