| 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 3124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3135 checkLibrary('import "dart:async" hide Stream show Future; Future f;'); | 3135 checkLibrary('import "dart:async" hide Stream show Future; Future f;'); |
| 3136 } | 3136 } |
| 3137 | 3137 |
| 3138 test_import_prefixed() { | 3138 test_import_prefixed() { |
| 3139 addLibrarySource('/a.dart', 'library a; class C {}'); | 3139 addLibrarySource('/a.dart', 'library a; class C {}'); |
| 3140 checkLibrary('import "a.dart" as a; a.C c;'); | 3140 checkLibrary('import "a.dart" as a; a.C c;'); |
| 3141 } | 3141 } |
| 3142 | 3142 |
| 3143 test_import_show() { | 3143 test_import_show() { |
| 3144 addLibrary('dart:async'); | 3144 addLibrary('dart:async'); |
| 3145 checkLibrary('import "dart:async" show Future, Stream; Future f;'); | 3145 checkLibrary(''' |
| 3146 import "dart:async" show Future, Stream; |
| 3147 Future f; |
| 3148 Stream s; |
| 3149 '''); |
| 3146 } | 3150 } |
| 3147 | 3151 |
| 3148 test_imports() { | 3152 test_imports() { |
| 3149 addLibrarySource('/a.dart', 'library a; class C {}'); | 3153 addLibrarySource('/a.dart', 'library a; class C {}'); |
| 3150 addLibrarySource('/b.dart', 'library b; class D {}'); | 3154 addLibrarySource('/b.dart', 'library b; class D {}'); |
| 3151 checkLibrary('import "a.dart"; import "b.dart"; C c; D d;'); | 3155 checkLibrary('import "a.dart"; import "b.dart"; C c; D d;'); |
| 3152 } | 3156 } |
| 3153 | 3157 |
| 3154 test_inferred_function_type_for_variable_in_generic_function() { | 3158 test_inferred_function_type_for_variable_in_generic_function() { |
| 3155 // In the code below, `x` has an inferred type of `() => int`, with 2 | 3159 // In the code below, `x` has an inferred type of `() => int`, with 2 |
| (...skipping 1143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4299 fail('Unexpectedly tried to get unlinked summary for $uri'); | 4303 fail('Unexpectedly tried to get unlinked summary for $uri'); |
| 4300 } | 4304 } |
| 4301 return serializedUnit; | 4305 return serializedUnit; |
| 4302 } | 4306 } |
| 4303 | 4307 |
| 4304 @override | 4308 @override |
| 4305 bool hasLibrarySummary(String uri) { | 4309 bool hasLibrarySummary(String uri) { |
| 4306 return true; | 4310 return true; |
| 4307 } | 4311 } |
| 4308 } | 4312 } |
| OLD | NEW |