| 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:convert'; | 7 import 'dart:convert'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
| 10 import 'package:analyzer/dart/constant/value.dart'; | 10 import 'package:analyzer/dart/constant/value.dart'; |
| (...skipping 3144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3155 checkLibrary('import "dart:async" hide Stream show Future; Future f;'); | 3155 checkLibrary('import "dart:async" hide Stream show Future; Future f;'); |
| 3156 } | 3156 } |
| 3157 | 3157 |
| 3158 test_import_prefixed() { | 3158 test_import_prefixed() { |
| 3159 addLibrarySource('/a.dart', 'library a; class C {}'); | 3159 addLibrarySource('/a.dart', 'library a; class C {}'); |
| 3160 checkLibrary('import "a.dart" as a; a.C c;'); | 3160 checkLibrary('import "a.dart" as a; a.C c;'); |
| 3161 } | 3161 } |
| 3162 | 3162 |
| 3163 test_import_show() { | 3163 test_import_show() { |
| 3164 addLibrary('dart:async'); | 3164 addLibrary('dart:async'); |
| 3165 checkLibrary('import "dart:async" show Future, Stream; Future f;'); | 3165 checkLibrary(''' |
| 3166 import "dart:async" show Future, Stream; |
| 3167 Future f; |
| 3168 Stream s; |
| 3169 '''); |
| 3166 } | 3170 } |
| 3167 | 3171 |
| 3168 test_imports() { | 3172 test_imports() { |
| 3169 addLibrarySource('/a.dart', 'library a; class C {}'); | 3173 addLibrarySource('/a.dart', 'library a; class C {}'); |
| 3170 addLibrarySource('/b.dart', 'library b; class D {}'); | 3174 addLibrarySource('/b.dart', 'library b; class D {}'); |
| 3171 checkLibrary('import "a.dart"; import "b.dart"; C c; D d;'); | 3175 checkLibrary('import "a.dart"; import "b.dart"; C c; D d;'); |
| 3172 } | 3176 } |
| 3173 | 3177 |
| 3174 test_inferred_function_type_for_variable_in_generic_function() { | 3178 test_inferred_function_type_for_variable_in_generic_function() { |
| 3175 // In the code below, `x` has an inferred type of `() => int`, with 2 | 3179 // In the code below, `x` has an inferred type of `() => int`, with 2 |
| (...skipping 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4313 fail('Unexpectedly tried to get unlinked summary for $uri'); | 4317 fail('Unexpectedly tried to get unlinked summary for $uri'); |
| 4314 } | 4318 } |
| 4315 return serializedUnit; | 4319 return serializedUnit; |
| 4316 } | 4320 } |
| 4317 | 4321 |
| 4318 @override | 4322 @override |
| 4319 bool hasLibrarySummary(String uri) { | 4323 bool hasLibrarySummary(String uri) { |
| 4320 return true; | 4324 return true; |
| 4321 } | 4325 } |
| 4322 } | 4326 } |
| OLD | NEW |