| 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 786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 797 if (resynthesized is FieldFormalParameterElementImpl && | 797 if (resynthesized is FieldFormalParameterElementImpl && |
| 798 original is FieldFormalParameterElementImpl) { | 798 original is FieldFormalParameterElementImpl) { |
| 799 if (original.field == null) { | 799 if (original.field == null) { |
| 800 expect(resynthesized.field, isNull, reason: '$desc field'); | 800 expect(resynthesized.field, isNull, reason: '$desc field'); |
| 801 } else { | 801 } else { |
| 802 expect(resynthesized.field, isNotNull, reason: '$desc field'); | 802 expect(resynthesized.field, isNotNull, reason: '$desc field'); |
| 803 compareFieldElements( | 803 compareFieldElements( |
| 804 resynthesized.field, original.field, '$desc field'); | 804 resynthesized.field, original.field, '$desc field'); |
| 805 } | 805 } |
| 806 } | 806 } |
| 807 expect(resynthesized.defaultValueCode, original.defaultValueCode, |
| 808 reason: desc); |
| 807 } | 809 } |
| 808 | 810 |
| 809 void comparePrefixElements(PrefixElementImpl resynthesized, | 811 void comparePrefixElements(PrefixElementImpl resynthesized, |
| 810 PrefixElementImpl original, String desc) { | 812 PrefixElementImpl original, String desc) { |
| 811 compareElements(resynthesized, original, desc); | 813 compareElements(resynthesized, original, desc); |
| 812 } | 814 } |
| 813 | 815 |
| 814 void comparePropertyAccessorElements( | 816 void comparePropertyAccessorElements( |
| 815 PropertyAccessorElementImpl resynthesized, | 817 PropertyAccessorElementImpl resynthesized, |
| 816 PropertyAccessorElementImpl original, | 818 PropertyAccessorElementImpl original, |
| (...skipping 3096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3913 fail('Unexpectedly tried to get unlinked summary for $uri'); | 3915 fail('Unexpectedly tried to get unlinked summary for $uri'); |
| 3914 } | 3916 } |
| 3915 return serializedUnit; | 3917 return serializedUnit; |
| 3916 } | 3918 } |
| 3917 | 3919 |
| 3918 @override | 3920 @override |
| 3919 bool hasLibrarySummary(String uri) { | 3921 bool hasLibrarySummary(String uri) { |
| 3920 return true; | 3922 return true; |
| 3921 } | 3923 } |
| 3922 } | 3924 } |
| OLD | NEW |