| 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/element/element.dart'; | 10 import 'package:analyzer/dart/element/element.dart'; |
| (...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 738 // TODO(paulberry): do we need to deal with | 738 // TODO(paulberry): do we need to deal with |
| 739 // MultiplyInheritedMethodElementImpl? | 739 // MultiplyInheritedMethodElementImpl? |
| 740 compareExecutableElements(resynthesized, original, desc); | 740 compareExecutableElements(resynthesized, original, desc); |
| 741 } | 741 } |
| 742 | 742 |
| 743 void compareNamespaceCombinators( | 743 void compareNamespaceCombinators( |
| 744 NamespaceCombinator resynthesized, NamespaceCombinator original) { | 744 NamespaceCombinator resynthesized, NamespaceCombinator original) { |
| 745 if (original is ShowElementCombinatorImpl && | 745 if (original is ShowElementCombinatorImpl && |
| 746 resynthesized is ShowElementCombinatorImpl) { | 746 resynthesized is ShowElementCombinatorImpl) { |
| 747 expect(resynthesized.shownNames, original.shownNames); | 747 expect(resynthesized.shownNames, original.shownNames); |
| 748 expect(resynthesized.offset, original.offset); |
| 749 expect(resynthesized.end, original.end); |
| 748 } else if (original is HideElementCombinatorImpl && | 750 } else if (original is HideElementCombinatorImpl && |
| 749 resynthesized is HideElementCombinatorImpl) { | 751 resynthesized is HideElementCombinatorImpl) { |
| 750 expect(resynthesized.hiddenNames, original.hiddenNames); | 752 expect(resynthesized.hiddenNames, original.hiddenNames); |
| 751 } else if (resynthesized.runtimeType != original.runtimeType) { | 753 } else if (resynthesized.runtimeType != original.runtimeType) { |
| 752 fail( | 754 fail( |
| 753 'Type mismatch: expected ${original.runtimeType}, got ${resynthesized.
runtimeType}'); | 755 'Type mismatch: expected ${original.runtimeType}, got ${resynthesized.
runtimeType}'); |
| 754 } else { | 756 } else { |
| 755 fail('Unimplemented comparison for ${original.runtimeType}'); | 757 fail('Unimplemented comparison for ${original.runtimeType}'); |
| 756 } | 758 } |
| 757 } | 759 } |
| (...skipping 3195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3953 fail('Unexpectedly tried to get unlinked summary for $uri'); | 3955 fail('Unexpectedly tried to get unlinked summary for $uri'); |
| 3954 } | 3956 } |
| 3955 return serializedUnit; | 3957 return serializedUnit; |
| 3956 } | 3958 } |
| 3957 | 3959 |
| 3958 @override | 3960 @override |
| 3959 bool hasLibrarySummary(String uri) { | 3961 bool hasLibrarySummary(String uri) { |
| 3960 return true; | 3962 return true; |
| 3961 } | 3963 } |
| 3962 } | 3964 } |
| OLD | NEW |