| 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 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 689 expect(rRuntimeType, oImpl.runtimeType); | 689 expect(rRuntimeType, oImpl.runtimeType); |
| 690 } | 690 } |
| 691 expect(resynthesized.kind, original.kind); | 691 expect(resynthesized.kind, original.kind); |
| 692 expect(resynthesized.location, original.location, reason: desc); | 692 expect(resynthesized.location, original.location, reason: desc); |
| 693 expect(resynthesized.name, original.name); | 693 expect(resynthesized.name, original.name); |
| 694 expect(resynthesized.nameOffset, original.nameOffset, reason: desc); | 694 expect(resynthesized.nameOffset, original.nameOffset, reason: desc); |
| 695 expect(rImpl.codeOffset, oImpl.codeOffset, reason: desc); | 695 expect(rImpl.codeOffset, oImpl.codeOffset, reason: desc); |
| 696 expect(rImpl.codeLength, oImpl.codeLength, reason: desc); | 696 expect(rImpl.codeLength, oImpl.codeLength, reason: desc); |
| 697 expect(resynthesized.documentationComment, original.documentationComment, | 697 expect(resynthesized.documentationComment, original.documentationComment, |
| 698 reason: desc); | 698 reason: desc); |
| 699 expect(resynthesized.docRange, original.docRange, reason: desc); | |
| 700 compareMetadata(resynthesized.metadata, original.metadata, desc); | 699 compareMetadata(resynthesized.metadata, original.metadata, desc); |
| 701 | 700 |
| 702 // Validate modifiers. | 701 // Validate modifiers. |
| 703 for (Modifier modifier in Modifier.values) { | 702 for (Modifier modifier in Modifier.values) { |
| 704 bool got = _hasModifier(resynthesized, modifier); | 703 bool got = _hasModifier(resynthesized, modifier); |
| 705 bool want = _hasModifier(original, modifier); | 704 bool want = _hasModifier(original, modifier); |
| 706 expect(got, want, | 705 expect(got, want, |
| 707 reason: 'Mismatch in $desc.$modifier: got $got, want $want'); | 706 reason: 'Mismatch in $desc.$modifier: got $got, want $want'); |
| 708 } | 707 } |
| 709 | 708 |
| (...skipping 3971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4681 fail('Unexpectedly tried to get unlinked summary for $uri'); | 4680 fail('Unexpectedly tried to get unlinked summary for $uri'); |
| 4682 } | 4681 } |
| 4683 return serializedUnit; | 4682 return serializedUnit; |
| 4684 } | 4683 } |
| 4685 | 4684 |
| 4686 @override | 4685 @override |
| 4687 bool hasLibrarySummary(String uri) { | 4686 bool hasLibrarySummary(String uri) { |
| 4688 return true; | 4687 return true; |
| 4689 } | 4688 } |
| 4690 } | 4689 } |
| OLD | NEW |