| 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 'package:analyzer/dart/ast/ast.dart'; | 7 import 'package:analyzer/dart/ast/ast.dart'; |
| 8 import 'package:analyzer/dart/ast/standard_resolution_map.dart'; | 8 import 'package:analyzer/dart/ast/standard_resolution_map.dart'; |
| 9 import 'package:analyzer/dart/constant/value.dart'; | 9 import 'package:analyzer/dart/constant/value.dart'; |
| 10 import 'package:analyzer/dart/element/element.dart'; | 10 import 'package:analyzer/dart/element/element.dart'; |
| (...skipping 4327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4338 addSource('/b.dart', 'part of my.lib;'); | 4338 addSource('/b.dart', 'part of my.lib;'); |
| 4339 checkLibrary('library my.lib; part "a.dart"; part "b.dart";'); | 4339 checkLibrary('library my.lib; part "a.dart"; part "b.dart";'); |
| 4340 } | 4340 } |
| 4341 | 4341 |
| 4342 test_parts_invalidUri() { | 4342 test_parts_invalidUri() { |
| 4343 allowMissingFiles = true; | 4343 allowMissingFiles = true; |
| 4344 addSource('/foo/bar.dart', 'part of my.lib;'); | 4344 addSource('/foo/bar.dart', 'part of my.lib;'); |
| 4345 checkLibrary('library my.lib; part "foo/";'); | 4345 checkLibrary('library my.lib; part "foo/";'); |
| 4346 } | 4346 } |
| 4347 | 4347 |
| 4348 test_parts_invalidUri_nullStringValue() { |
| 4349 allowMissingFiles = true; |
| 4350 addSource('/foo/bar.dart', 'part of my.lib;'); |
| 4351 checkLibrary(r''' |
| 4352 library my.lib; |
| 4353 part "${foo}/bar.dart"; |
| 4354 '''); |
| 4355 } |
| 4356 |
| 4348 test_propagated_type_refers_to_closure() { | 4357 test_propagated_type_refers_to_closure() { |
| 4349 checkLibrary(''' | 4358 checkLibrary(''' |
| 4350 void f() { | 4359 void f() { |
| 4351 var x = () => 0; | 4360 var x = () => 0; |
| 4352 var y = x; | 4361 var y = x; |
| 4353 } | 4362 } |
| 4354 '''); | 4363 '''); |
| 4355 } | 4364 } |
| 4356 | 4365 |
| 4357 test_setter_documented() { | 4366 test_setter_documented() { |
| (...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4889 fail('Unexpectedly tried to get unlinked summary for $uri'); | 4898 fail('Unexpectedly tried to get unlinked summary for $uri'); |
| 4890 } | 4899 } |
| 4891 return serializedUnit; | 4900 return serializedUnit; |
| 4892 } | 4901 } |
| 4893 | 4902 |
| 4894 @override | 4903 @override |
| 4895 bool hasLibrarySummary(String uri) { | 4904 bool hasLibrarySummary(String uri) { |
| 4896 return true; | 4905 return true; |
| 4897 } | 4906 } |
| 4898 } | 4907 } |
| OLD | NEW |