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 9208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9219 enum E { | 9219 enum E { |
9220 synthetic final int index; | 9220 synthetic final int index; |
9221 synthetic static const List<E> values; | 9221 synthetic static const List<E> values; |
9222 static const E v; | 9222 static const E v; |
9223 } | 9223 } |
9224 E e; | 9224 E e; |
9225 '''); | 9225 '''); |
9226 } | 9226 } |
9227 | 9227 |
9228 test_type_reference_to_import() async { | 9228 test_type_reference_to_import() async { |
9229 addLibrarySource('/a.dart', 'class C {} enum E { v }; typedef F();'); | 9229 addLibrarySource('/a.dart', 'class C {} enum E { v } typedef F();'); |
9230 var library = await checkLibrary('import "a.dart"; C c; E e; F f;'); | 9230 var library = await checkLibrary('import "a.dart"; C c; E e; F f;'); |
9231 checkElementText(library, r''' | 9231 checkElementText(library, r''' |
9232 import 'a.dart'; | 9232 import 'a.dart'; |
9233 C c; | 9233 C c; |
9234 E e; | 9234 E e; |
9235 F f; | 9235 F f; |
9236 '''); | 9236 '''); |
9237 } | 9237 } |
9238 | 9238 |
9239 test_type_reference_to_import_export() async { | 9239 test_type_reference_to_import_export() async { |
(...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10084 fail('Unexpectedly tried to get unlinked summary for $uri'); | 10084 fail('Unexpectedly tried to get unlinked summary for $uri'); |
10085 } | 10085 } |
10086 return serializedUnit; | 10086 return serializedUnit; |
10087 } | 10087 } |
10088 | 10088 |
10089 @override | 10089 @override |
10090 bool hasLibrarySummary(String uri) { | 10090 bool hasLibrarySummary(String uri) { |
10091 return true; | 10091 return true; |
10092 } | 10092 } |
10093 } | 10093 } |
OLD | NEW |