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); |
699 compareMetadata(resynthesized.metadata, original.metadata, desc); | 700 compareMetadata(resynthesized.metadata, original.metadata, desc); |
700 | 701 |
701 // Validate modifiers. | 702 // Validate modifiers. |
702 for (Modifier modifier in Modifier.values) { | 703 for (Modifier modifier in Modifier.values) { |
703 bool got = _hasModifier(resynthesized, modifier); | 704 bool got = _hasModifier(resynthesized, modifier); |
704 bool want = _hasModifier(original, modifier); | 705 bool want = _hasModifier(original, modifier); |
705 expect(got, want, | 706 expect(got, want, |
706 reason: 'Mismatch in $desc.$modifier: got $got, want $want'); | 707 reason: 'Mismatch in $desc.$modifier: got $got, want $want'); |
707 } | 708 } |
708 | 709 |
(...skipping 3957 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4666 fail('Unexpectedly tried to get unlinked summary for $uri'); | 4667 fail('Unexpectedly tried to get unlinked summary for $uri'); |
4667 } | 4668 } |
4668 return serializedUnit; | 4669 return serializedUnit; |
4669 } | 4670 } |
4670 | 4671 |
4671 @override | 4672 @override |
4672 bool hasLibrarySummary(String uri) { | 4673 bool hasLibrarySummary(String uri) { |
4673 return true; | 4674 return true; |
4674 } | 4675 } |
4675 } | 4676 } |
OLD | NEW |