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 4659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4670 checkLibrary('@foo() class C {}', allowErrors: true); | 4670 checkLibrary('@foo() class C {}', allowErrors: true); |
4671 } | 4671 } |
4672 | 4672 |
4673 test_unresolved_export() { | 4673 test_unresolved_export() { |
4674 allowMissingFiles = true; | 4674 allowMissingFiles = true; |
4675 checkLibrary("export 'foo.dart';", allowErrors: true); | 4675 checkLibrary("export 'foo.dart';", allowErrors: true); |
4676 } | 4676 } |
4677 | 4677 |
4678 test_unresolved_import() { | 4678 test_unresolved_import() { |
4679 allowMissingFiles = true; | 4679 allowMissingFiles = true; |
4680 checkLibrary("import 'foo.dart';", allowErrors: true); | |
4681 } | |
4682 | |
4683 test_unresolved_import_deferred() { | |
Paul Berry
2016/12/08 12:58:22
Why are we getting rid of this test?
scheglov
2016/12/08 15:53:09
I realized that this test does not add anything ne
| |
4684 allowMissingFiles = true; | |
4685 LibraryElementImpl library = | 4680 LibraryElementImpl library = |
4686 checkLibrary("import 'missing.dart' deferred as p;"); | 4681 checkLibrary("import 'foo.dart';", allowErrors: true); |
4687 expect(library.imports[0].importedLibrary.loadLibraryFunction, isNotNull); | 4682 LibraryElement importedLibrary = library.imports[0].importedLibrary; |
4683 expect(importedLibrary.loadLibraryFunction, isNotNull); | |
4684 expect(importedLibrary.publicNamespace, isNotNull); | |
4685 expect(importedLibrary.exportNamespace, isNotNull); | |
4688 } | 4686 } |
4689 | 4687 |
4690 test_unresolved_part() { | 4688 test_unresolved_part() { |
4691 allowMissingFiles = true; | 4689 allowMissingFiles = true; |
4692 checkLibrary("part 'foo.dart';", allowErrors: true); | 4690 checkLibrary("part 'foo.dart';", allowErrors: true); |
4693 } | 4691 } |
4694 | 4692 |
4695 test_unused_type_parameter() { | 4693 test_unused_type_parameter() { |
4696 checkLibrary(''' | 4694 checkLibrary(''' |
4697 class C<T> { | 4695 class C<T> { |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4841 fail('Unexpectedly tried to get unlinked summary for $uri'); | 4839 fail('Unexpectedly tried to get unlinked summary for $uri'); |
4842 } | 4840 } |
4843 return serializedUnit; | 4841 return serializedUnit; |
4844 } | 4842 } |
4845 | 4843 |
4846 @override | 4844 @override |
4847 bool hasLibrarySummary(String uri) { | 4845 bool hasLibrarySummary(String uri) { |
4848 return true; | 4846 return true; |
4849 } | 4847 } |
4850 } | 4848 } |
OLD | NEW |